com.ibm.bpe.clientmodel.bean
Class ProcessInstanceBean

java.lang.Object
  extended bycom.ibm.bpe.clientmodel.bean.ProcessInstanceBean
All Implemented Interfaces:
com.ibm.bpe.api.ProcessInstanceData, java.io.Serializable

public class ProcessInstanceBean
extends java.lang.Object
implements com.ibm.bpe.api.ProcessInstanceData

Accesses the properties of the original ProcessInstanceData object and adds metadata for national language support and converters.

A ProcessInstanceBean object can be instantiated from a QueryResultSet object or from an ProcessInstanceData object.
If the bean was instantiated from an original object returned by the Business Process Choreographer API, all properties are loaded. If the bean is instantiated from a query only the following properties are going to be loaded from the query result set:

If the property was not found in the query result set, the property will remain empty. Accessing an empty property requires the bean to load the missing information from the server.

Use the static method getLabel(String, Locale) to retrieve the localized label for a property. Use the static method getConverter(String) to retrieve a converter for a property. The return value may be null because converters are optional.

See Also:
ProcessInstanceData, QueryResultSet, Serialized Form

Field Summary
static java.lang.String AVAILABLEACTIONS_PROPERTY
          Use the property name to determine labels and converters for the property applicationName .
static java.lang.String COMPENSATIONSPHERENAME_PROPERTY
          Use the property name to determine labels and converters for the property compensationSphereName .
static java.lang.String COMPLETIONTIME_PROPERTY
          Use the property name to determine labels and converters for the property completionTime .
static java.lang.String COPYRIGHT
          (C) Copyright IBM Corporation 2004, 2005.
static java.lang.String CREATIONTIME_PROPERTY
          Use the property name to determine labels and converters for the property creationTime .
static java.lang.String CUSTOMPROPERTY_PROPERTY
          Use the property name to determine labels and converters for the property customProperty .
static java.lang.String DESCRIPTION_PROPERTY
          Use the property name to determine labels and converters for the property description .
static java.lang.String DISPLAYNAME_PROPERTY
          Use the property name to determine labels and converters for the property displayName .
static java.lang.String EXECUTIONSTATE_PROPERTY
          Use the property name to determine labels and converters for the property executionState .
static java.lang.String FAULTNAME_PROPERTY
          Use the property name to determine labels and converters for the property faultName .
static java.lang.String ID_PROPERTY
          Use the property name to determine labels and converters for the property ID .
static java.lang.String INPUTMESSAGETPYENAME_PROPERTY
          Use the property name to determine labels and converters for the property inputMessageTypeName .
static java.lang.String INPUTMESSAGETYPETYPESYSTEMNAME_PROPERTY
          Use the property name to determine labels and converters for the property inputMessageTypeTypeSystemName .
static java.lang.String ISCOMPENSATIONDEFINED_PROPERTY
          Use the property name to determine labels and converters for the property compensationDefined .
static java.lang.String LASTMODIFICATIONTIME_PROPERTY
          Use the property name to determine labels and converters for the property lastModificationTime .
static java.lang.String LASTSTATECHANGETIME_PROPERTY
          Use the property name to determine labels and converters for the property lastStateChange .
static java.lang.String NAME_PROPERTY
          Use the property name to determine labels and converters for the property name .
static java.lang.String OUTPUTMESSAGETPYENAME_PROPERTY
          Use the property name to determine labels and converters for the property outputMessageTypeName .
static java.lang.String OUTPUTMESSAGETYPETYPESYSTEMNAME_PROPERTY
          Use the property name to determine labels and converters for the property outputMessageTypeTypeSystemName .
static java.lang.String PROCESSADMINISTRATORS_PROPERTY
          Use the property name to determine labels and converters for the property processAdministrators .
static java.lang.String PROCESSTEMPLATEID_PROPERTY
          Use the property name to determine labels and converters for the property processTemplateID .
static java.lang.String PROCESSTEMPLATENAME_PROPERTY
          Use the property name to determine labels and converters for the property processTemplateName .
static java.lang.String STARTER_PROPERTY
          Use the property name to determine labels and converters for the property starter .
static java.lang.String STARTTIME_PROPERTY
          Use the property name to determine labels and converters for the property startTime .
static java.lang.String TOPLEVELPROCESSINSTANCEID_PROPERTY
          Use the property name to determine labels and converters for the property topLevelProcessInstanceID .
static java.lang.String TOPLEVELPROCESSINSTANCENAME_PROPERTY
          Use the property name to determine labels and converters for the property topLevelProcessInstanceName .
 
Fields inherited from interface com.ibm.bpe.api.ProcessInstanceData
STATE_COMPENSATED, STATE_COMPENSATING, STATE_COMPENSATION_FAILED, STATE_FAILED, STATE_FAILING, STATE_FINISHED, STATE_INDOUBT, STATE_READY, STATE_RUNNING, STATE_SUSPENDED, STATE_TERMINATED, STATE_TERMINATING
 
Constructor Summary
ProcessInstanceBean(com.ibm.bpe.api.ProcessInstanceData processInstance, BFMConnection bfmConnection)
          Constructs a new ProcessInstanceBean from an original ProcessInstanceData object.
ProcessInstanceBean(com.ibm.bpe.api.QueryResultSet resultSet, BFMConnection bfmConnection)
          Constructs a new ProcessInstanceBean from a QueryResultSet.
 
Method Summary
 com.ibm.task.api.TKIID getAdminTaskID()
          Returns the property adminTaskID.
 int[] getAvailableActions()
          Returns the property availableActions.
 java.lang.String getCompensationSphereName()
          Returns the property compensationSphereName.
 java.util.Calendar getCompletionTime()
          Returns the property completionTime.
static SimpleConverter getConverter(java.lang.String propertyName)
          Returns the default converter for a given property.
 java.util.Calendar getCreationTime()
          Returns the property creationTime.
 java.lang.String getCustomProperty(java.lang.String propertyName)
          Returns the property customProperty.
 java.lang.String getDescription()
          Returns the property description.
 java.lang.String getDisplayName()
          Returns the property displayName.
 int getExecutionState()
          Returns the property executionState.
 MessageWrapper getFaultMessageWrapper()
          Retrieves the fault message.
 java.lang.String getFaultName()
          Returns the property faultName.
 com.ibm.bpe.api.PIID getID()
          Returns the property ID.
 java.lang.String getInputMessageTypeName()
          Returns the property inputMessageTypeName.
 java.lang.String getInputMessageTypeTypeSystemName()
          Returns the property inputMessageTypeTypeSystemName.
 MessageWrapper getInputMessageWrapper()
          Retrieves the input message.
static java.lang.String getLabel(java.lang.String propertyName)
          Returns the resource bundle key for a property
static java.lang.String getLabel(java.lang.String propertyName, java.util.Locale locale)
          Returns the label for a property from the resource bundle.
 java.util.Calendar getLastModificationTime()
          Returns the property lastModificationTime.
 java.util.Calendar getLastStateChangeTime()
          Returns the property lastStateChangeTime.
 java.lang.String getName()
          Returns the property name.
 java.util.List getNamesOfCustomProperties()
          Returns the property namesOfCustomProperties.
 java.lang.String getOutputMessageTypeName()
          Returns the property outputMessageTypeName.
 java.lang.String getOutputMessageTypeTypeSystemName()
          Returns the property outputMessageTypeTypeSystemName.
 MessageWrapper getOutputMessageWrapper()
          Retrieves the output message.
 com.ibm.bpe.api.StaffResultSet getProcessAdministrators()
          Returns the property processAdministrators.
 com.ibm.bpe.api.PTID getProcessTemplateID()
          Returns the property processTemplateID.
 java.lang.String getProcessTemplateName()
          Returns the property processTemplateName.
 java.lang.String getStarter()
          Returns the property starter.
 java.util.Calendar getStartTime()
          Returns the property startTime.
 com.ibm.bpe.api.PIID getTopLevelProcessInstanceID()
          Returns the property topLevelProcessInstanceID.
 java.lang.String getTopLevelProcessInstanceName()
          Returns the property topLevelProcessInstanceName.
 java.util.Calendar getValidFromTime()
          Returns the property validFromTime.
 boolean isBusinessRelevant()
          Returns the property businessRelevant.
 boolean isCompensationDefined()
          Returns the property compensationDefined.
static boolean isValid(java.lang.String propertyName)
          Checks if the property is valid.
 void setExecutionState(int state)
          Changes the property executionState of the process instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
(C) Copyright IBM Corporation 2004, 2005.

See Also:
Constant Field Values

AVAILABLEACTIONS_PROPERTY

public static final java.lang.String AVAILABLEACTIONS_PROPERTY
Use the property name to determine labels and converters for the property applicationName .

See Also:
Constant Field Values

COMPENSATIONSPHERENAME_PROPERTY

public static final java.lang.String COMPENSATIONSPHERENAME_PROPERTY
Use the property name to determine labels and converters for the property compensationSphereName .

See Also:
Constant Field Values

COMPLETIONTIME_PROPERTY

public static final java.lang.String COMPLETIONTIME_PROPERTY
Use the property name to determine labels and converters for the property completionTime .

See Also:
Constant Field Values

CREATIONTIME_PROPERTY

public static final java.lang.String CREATIONTIME_PROPERTY
Use the property name to determine labels and converters for the property creationTime .

See Also:
Constant Field Values

CUSTOMPROPERTY_PROPERTY

public static final java.lang.String CUSTOMPROPERTY_PROPERTY
Use the property name to determine labels and converters for the property customProperty .

See Also:
Constant Field Values

DESCRIPTION_PROPERTY

public static final java.lang.String DESCRIPTION_PROPERTY
Use the property name to determine labels and converters for the property description .

See Also:
Constant Field Values

DISPLAYNAME_PROPERTY

public static final java.lang.String DISPLAYNAME_PROPERTY
Use the property name to determine labels and converters for the property displayName .

See Also:
Constant Field Values

EXECUTIONSTATE_PROPERTY

public static final java.lang.String EXECUTIONSTATE_PROPERTY
Use the property name to determine labels and converters for the property executionState .

See Also:
Constant Field Values

FAULTNAME_PROPERTY

public static final java.lang.String FAULTNAME_PROPERTY
Use the property name to determine labels and converters for the property faultName .

See Also:
Constant Field Values

ID_PROPERTY

public static final java.lang.String ID_PROPERTY
Use the property name to determine labels and converters for the property ID .

See Also:
Constant Field Values

INPUTMESSAGETPYENAME_PROPERTY

public static final java.lang.String INPUTMESSAGETPYENAME_PROPERTY
Use the property name to determine labels and converters for the property inputMessageTypeName .

See Also:
Constant Field Values

INPUTMESSAGETYPETYPESYSTEMNAME_PROPERTY

public static final java.lang.String INPUTMESSAGETYPETYPESYSTEMNAME_PROPERTY
Use the property name to determine labels and converters for the property inputMessageTypeTypeSystemName .

See Also:
Constant Field Values

ISCOMPENSATIONDEFINED_PROPERTY

public static final java.lang.String ISCOMPENSATIONDEFINED_PROPERTY
Use the property name to determine labels and converters for the property compensationDefined .

See Also:
Constant Field Values

LASTMODIFICATIONTIME_PROPERTY

public static final java.lang.String LASTMODIFICATIONTIME_PROPERTY
Use the property name to determine labels and converters for the property lastModificationTime .

See Also:
Constant Field Values

LASTSTATECHANGETIME_PROPERTY

public static final java.lang.String LASTSTATECHANGETIME_PROPERTY
Use the property name to determine labels and converters for the property lastStateChange .

See Also:
Constant Field Values

NAME_PROPERTY

public static final java.lang.String NAME_PROPERTY
Use the property name to determine labels and converters for the property name .

See Also:
Constant Field Values

OUTPUTMESSAGETPYENAME_PROPERTY

public static final java.lang.String OUTPUTMESSAGETPYENAME_PROPERTY
Use the property name to determine labels and converters for the property outputMessageTypeName .

See Also:
Constant Field Values

OUTPUTMESSAGETYPETYPESYSTEMNAME_PROPERTY

public static final java.lang.String OUTPUTMESSAGETYPETYPESYSTEMNAME_PROPERTY
Use the property name to determine labels and converters for the property outputMessageTypeTypeSystemName .

See Also:
Constant Field Values

PROCESSADMINISTRATORS_PROPERTY

public static final java.lang.String PROCESSADMINISTRATORS_PROPERTY
Use the property name to determine labels and converters for the property processAdministrators .

See Also:
Constant Field Values

PROCESSTEMPLATEID_PROPERTY

public static final java.lang.String PROCESSTEMPLATEID_PROPERTY
Use the property name to determine labels and converters for the property processTemplateID .

See Also:
Constant Field Values

PROCESSTEMPLATENAME_PROPERTY

public static final java.lang.String PROCESSTEMPLATENAME_PROPERTY
Use the property name to determine labels and converters for the property processTemplateName .

See Also:
Constant Field Values

STARTER_PROPERTY

public static final java.lang.String STARTER_PROPERTY
Use the property name to determine labels and converters for the property starter .

See Also:
Constant Field Values

STARTTIME_PROPERTY

public static final java.lang.String STARTTIME_PROPERTY
Use the property name to determine labels and converters for the property startTime .

See Also:
Constant Field Values

TOPLEVELPROCESSINSTANCEID_PROPERTY

public static final java.lang.String TOPLEVELPROCESSINSTANCEID_PROPERTY
Use the property name to determine labels and converters for the property topLevelProcessInstanceID .

See Also:
Constant Field Values

TOPLEVELPROCESSINSTANCENAME_PROPERTY

public static final java.lang.String TOPLEVELPROCESSINSTANCENAME_PROPERTY
Use the property name to determine labels and converters for the property topLevelProcessInstanceName .

See Also:
Constant Field Values
Constructor Detail

ProcessInstanceBean

public ProcessInstanceBean(com.ibm.bpe.api.ProcessInstanceData processInstance,
                           BFMConnection bfmConnection)
Constructs a new ProcessInstanceBean from an original ProcessInstanceData object.

Parameters:
processInstance - The original data object.
bfmConnection - The connection to the BusinessFlowManagerService API.

ProcessInstanceBean

public ProcessInstanceBean(com.ibm.bpe.api.QueryResultSet resultSet,
                           BFMConnection bfmConnection)
Constructs a new ProcessInstanceBean from a QueryResultSet.

Parameters:
resultSet - The result object of a query.
bfmConnection - The connection to the BusinessFlowManagerService API.
Method Detail

getConverter

public static SimpleConverter getConverter(java.lang.String propertyName)
Returns the default converter for a given property.

Parameters:
propertyName - The name for the property.
Returns:
The converter instance if one has been registered with propertyName, null otherwise.

getLabel

public static java.lang.String getLabel(java.lang.String propertyName)
Returns the resource bundle key for a property

Parameters:
propertyName - The name for the property.
Returns:
The resource bundle key for the property.

getLabel

public static java.lang.String getLabel(java.lang.String propertyName,
                                        java.util.Locale locale)
Returns the label for a property from the resource bundle. If no label is found in the resource bundle the resource bundle key for the property is returned.

Parameters:
propertyName - The name for the property.
locale - The locale.
Returns:
The label or the resource bundle key for the property.

isValid

public static boolean isValid(java.lang.String propertyName)
Checks if the property is valid.

Parameters:
propertyName - The name of the property to be checked.
Returns:
True, if the propertyName is a known property for an object of this class.

getAdminTaskID

public com.ibm.task.api.TKIID getAdminTaskID()
Returns the property adminTaskID.

Specified by:
getAdminTaskID in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getAdminTaskID()

getAvailableActions

public int[] getAvailableActions()
Returns the property availableActions.

Specified by:
getAvailableActions in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getAvailableActions()

getCompensationSphereName

public java.lang.String getCompensationSphereName()
Returns the property compensationSphereName.

Specified by:
getCompensationSphereName in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getCompensationSphereName()

getCompletionTime

public java.util.Calendar getCompletionTime()
Returns the property completionTime.

Specified by:
getCompletionTime in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getCompletionTime()

getCreationTime

public java.util.Calendar getCreationTime()
Returns the property creationTime.

Specified by:
getCreationTime in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getCreationTime()

getCustomProperty

public java.lang.String getCustomProperty(java.lang.String propertyName)
Returns the property customProperty.

Specified by:
getCustomProperty in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getCustomProperty(java.lang.String)

getDescription

public java.lang.String getDescription()
Returns the property description.

Specified by:
getDescription in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getDescription()

getDisplayName

public java.lang.String getDisplayName()
Returns the property displayName.

Specified by:
getDisplayName in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getDisplayName()

getExecutionState

public int getExecutionState()
Returns the property executionState.

Specified by:
getExecutionState in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getExecutionState()

getFaultName

public java.lang.String getFaultName()
Returns the property faultName.

Specified by:
getFaultName in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getFaultName()

getID

public com.ibm.bpe.api.PIID getID()
Returns the property ID.

Specified by:
getID in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getID()

getInputMessageTypeName

public java.lang.String getInputMessageTypeName()
Returns the property inputMessageTypeName.

Specified by:
getInputMessageTypeName in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getInputMessageTypeName()

getInputMessageTypeTypeSystemName

public java.lang.String getInputMessageTypeTypeSystemName()
Returns the property inputMessageTypeTypeSystemName.

Specified by:
getInputMessageTypeTypeSystemName in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getInputMessageTypeTypeSystemName()

getLastModificationTime

public java.util.Calendar getLastModificationTime()
Returns the property lastModificationTime.

Specified by:
getLastModificationTime in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getLastModificationTime()

getLastStateChangeTime

public java.util.Calendar getLastStateChangeTime()
Returns the property lastStateChangeTime.

Specified by:
getLastStateChangeTime in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getLastStateChangeTime()

getName

public java.lang.String getName()
Returns the property name.

Specified by:
getName in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getName()

getNamesOfCustomProperties

public java.util.List getNamesOfCustomProperties()
Returns the property namesOfCustomProperties.

Specified by:
getNamesOfCustomProperties in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getNamesOfCustomProperties()

getOutputMessageTypeName

public java.lang.String getOutputMessageTypeName()
Returns the property outputMessageTypeName.

Specified by:
getOutputMessageTypeName in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getOutputMessageTypeName()

getOutputMessageTypeTypeSystemName

public java.lang.String getOutputMessageTypeTypeSystemName()
Returns the property outputMessageTypeTypeSystemName.

Specified by:
getOutputMessageTypeTypeSystemName in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getOutputMessageTypeTypeSystemName()

getProcessAdministrators

public com.ibm.bpe.api.StaffResultSet getProcessAdministrators()
                                                        throws com.ibm.bpe.api.WorkItemManagerException,
                                                               com.ibm.bpe.api.InvalidLengthException
Returns the property processAdministrators.

Specified by:
getProcessAdministrators in interface com.ibm.bpe.api.ProcessInstanceData
Throws:
com.ibm.bpe.api.WorkItemManagerException
com.ibm.bpe.api.InvalidLengthException
See Also:
ProcessInstanceData.getProcessAdministrators()

getProcessTemplateID

public com.ibm.bpe.api.PTID getProcessTemplateID()
Returns the property processTemplateID.

Specified by:
getProcessTemplateID in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getProcessTemplateID()

getProcessTemplateName

public java.lang.String getProcessTemplateName()
Returns the property processTemplateName.

Specified by:
getProcessTemplateName in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getProcessTemplateName()

getStarter

public java.lang.String getStarter()
Returns the property starter.

Specified by:
getStarter in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getStarter()

getStartTime

public java.util.Calendar getStartTime()
Returns the property startTime.

Specified by:
getStartTime in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getStartTime()

getTopLevelProcessInstanceID

public com.ibm.bpe.api.PIID getTopLevelProcessInstanceID()
Returns the property topLevelProcessInstanceID.

Specified by:
getTopLevelProcessInstanceID in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getTopLevelProcessInstanceID()

getTopLevelProcessInstanceName

public java.lang.String getTopLevelProcessInstanceName()
Returns the property topLevelProcessInstanceName.

Specified by:
getTopLevelProcessInstanceName in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getTopLevelProcessInstanceName()

getValidFromTime

public java.util.Calendar getValidFromTime()
Returns the property validFromTime.

Specified by:
getValidFromTime in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.getValidFromTime()

isBusinessRelevant

public boolean isBusinessRelevant()
Returns the property businessRelevant.

Specified by:
isBusinessRelevant in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.isBusinessRelevant()

isCompensationDefined

public boolean isCompensationDefined()
Returns the property compensationDefined.

Specified by:
isCompensationDefined in interface com.ibm.bpe.api.ProcessInstanceData
See Also:
ProcessInstanceData.isCompensationDefined()

setExecutionState

public void setExecutionState(int state)
Changes the property executionState of the process instance. This may happen for example when aprocess instance was terminated, suspended or restarted through the BPC Explorer.
Be aware that the ProcessInstanceBean object and the ProcessInstanceData server object may differ and the object should be refreshed if necessary.

Parameters:
state - The new state of the process instance.

getInputMessageWrapper

public MessageWrapper getInputMessageWrapper()
                                      throws ClientException
Retrieves the input message. If web client settings are available the context root and the URL are retrieved.

Returns:
The wrapped message and web client settings.
Throws:
ClientException

getOutputMessageWrapper

public MessageWrapper getOutputMessageWrapper()
                                       throws ClientException
Retrieves the output message. If web client settings are available the context root and the URL are retrieved.

Returns:
The wrapped message and web client settings.
Throws:
ClientException

getFaultMessageWrapper

public MessageWrapper getFaultMessageWrapper()
                                      throws ClientException
Retrieves the fault message.

Returns:
The wrapped message.
Throws:
ClientException