com.ibm.bpe.clientmodel.bean
Class ActivityInstanceBean

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

public class ActivityInstanceBean
extends java.lang.Object
implements com.ibm.bpe.api.ActivityInstanceData

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

An ActivityInstanceBean object can be instantiated from a QueryResultSet object or from an ActivityInstanceData 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:
ActivityInstanceData, QueryResultSet, Serialized Form

Field Summary
static java.lang.String ACTIVATIONTIME_PROPERTY
          Use the property name to determine labels and converters for the property activiation time.
static java.lang.String APPLICATIONNAME_PROPERTY
          Use the property name to determine labels and converters for the property application name.
static java.lang.String AVAILABLEACTIONS_PROPERTY
          Use the property name to determine labels and converters for the property available actions.
static java.lang.String COMPLETIONTIME_PROPERTY
          Use the property name to determine labels and converters for the property completion time.
static java.lang.String COPYRIGHT
          (C) Copyright IBM Corporation 2004, 2005.
static java.lang.String CUSTOMPROPERTY_PROPERTY
          Use the property name to determine labels and converters for the property custom properties.
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 display name.
static java.lang.String EXECUTIONSTATE_PROPERTY
          Use the property name to determine labels and converters for the property execution state.
static java.lang.String EXPIRATIONTIME_PROPERTY
          Use the property name to determine labels and converters for the property expiration time.
static java.lang.String FAULTNAMES_PROPERTY
          Use the property name to determine labels and converters for the property fault name.
static java.lang.String ID_PROPERTY
          Use the property name to determine labels and converters for the property ID.
static java.lang.String INPUTMESSAGETYPENAME_PROPERTY
          Use the property name to determine labels and converters for the property input message type name.
static java.lang.String INPUTMESSAGETYPETYPESYSTEMNAME_PROPERTY
          Use the property name to determine labels and converters for the property input message type system name.
static java.lang.String KIND_PROPERTY
          Use the property name to determine labels and converters for the property kind.
static java.lang.String LASTMODIFICATIONTIME_PROPERTY
          Use the property name to determine labels and converters for the property last modification time.
static java.lang.String LASTSTATECHANGETIME_PROPERTY
          Use the property name to determine labels and converters for the property last state change time.
static java.lang.String NAME_PROPERTY
          Use the property name to determine labels and converters for the property name.
static java.lang.String OUTPUTMESSAGETYPENAME_PROPERTY
          Use the property name to determine labels and converters for the property output message type name.
static java.lang.String OUTPUTMESSAGETYPETYPESYSTEMNAME_PROPERTY
          Use the property name to determine labels and converters for the property output message type system name.
static java.lang.String OWNER_PROPERTY
          Use the property name to determine labels and converters for the property owner.
static java.lang.String PROCESSADMINISTRATORS_PROPERTY
          Use the property name to determine labels and converters for the property process administrators.
static java.lang.String PROCESSINSTANCEID_PROPERTY
          Use the property name to determine labels and converters for the property process instance ID.
static java.lang.String PROCESSINSTANCENAME_PROPERTY
          Use the property name to determine labels and converters for the property process instance name.
static java.lang.String PROCESSTEMPLATEID_PROPERTY
          Use the property name to determine labels and converters for the property process template ID.
static java.lang.String PROCESSTEMPLATENAME_PROPERTY
          Use the property name to determine labels and converters for the property process template name.
static java.lang.String STARTTIME_PROPERTY
          Use the property name to determine labels and converters for the property start time.
static java.lang.String UNHANDLEDEXCEPTION_PROPERTY
          Use the property name to determine labels and converters for the property unhandled exception.
 
Fields inherited from interface com.ibm.bpe.api.ActivityInstanceData
KIND_ASSIGN, KIND_COMPENSATE, KIND_CUSTOM, KIND_EMPTY, KIND_FLOW, KIND_FLOW_END, KIND_INVOKE, KIND_INVOKE_END, KIND_PICK, KIND_PICK_END, KIND_RECEIVE, KIND_REPLY, KIND_RETHROW, KIND_SCOPE, KIND_SCOPE_END, KIND_SCRIPT, KIND_SEQUENCE, KIND_SEQUENCE_END, KIND_STAFF, KIND_SWITCH, KIND_SWITCH_END, KIND_TERMINATE, KIND_THROW, KIND_WAIT, KIND_WHILE, KIND_WHILE_END, STATE_CLAIMED, STATE_EXPIRED, STATE_FAILED, STATE_FAILING, STATE_FINISHED, STATE_INACTIVE, STATE_PROCESSING_UNDO, STATE_READY, STATE_RUNNING, STATE_SKIPPED, STATE_STOPPED, STATE_TERMINATED, STATE_TERMINATING, STATE_WAITING
 
Constructor Summary
ActivityInstanceBean(com.ibm.bpe.api.ActivityInstanceData activity, BFMConnection bfmConnection)
          Constructs a new ActivityInstanceBean from an original ActivityInstanceData object.
ActivityInstanceBean(com.ibm.bpe.api.QueryResultSet resultSet, BFMConnection bfmConnection)
          Constructs a new ActivityInstanceBean from a QueryResultSet.
 
Method Summary
 java.util.Calendar getActivationTime()
          Returns the property activationTime.
 com.ibm.task.api.TKIID getAdminTaskID()
          Returns the property adminTaskID.
 java.lang.String getApplicationName()
          Returns the property applicationName.
 int[] getAvailableActions()
          Returns the property availableActions.
 java.util.Calendar getCompletionTime()
          Returns the property completionTime.
static SimpleConverter getConverter(java.lang.String propertyName)
          Returns the default converter for a given property.
 java.lang.String getCustomProperty(java.lang.String arg)
          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.
 java.util.Calendar getExpirationTime()
          Returns the property expirationTime.
 MessageWrapper getFaultMessageWrapper()
          Retrieves the fault message.
 java.util.List getFaultNames()
          Returns the property faultNames.
 com.ibm.bpe.api.AIID 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.
 int getKind()
          Returns the property kind.
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.
 java.lang.String getOwner()
          Returns the property owner.
 com.ibm.bpe.api.StaffResultSet getProcessAdministrators()
          Returns the property processAdministrators.
 com.ibm.bpe.api.PIID getProcessInstanceID()
          Returns the property processInstanceID.
 java.lang.String getProcessInstanceName()
          Returns the property processInstanceName.
 com.ibm.bpe.api.PTID getProcessTemplateID()
          Returns the property processTemplateID.
 java.lang.String getProcessTemplateName()
          Returns the property processTemplateName.
 java.util.Calendar getStartTime()
          Returns the property startTime.
 com.ibm.task.api.TKIID getTaskID()
          Returns the property taskID.
 com.ibm.bpe.api.ProcessException getUnhandledException()
          Returns the property unhandledException.
 boolean isBusinessRelevant()
          Returns the property businessRelevant.
static boolean isValid(java.lang.String propertyName)
          Checks if the property is valid.
 void setExecutionState(int state)
          Changes the property executionState of the activity.
 
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

ACTIVATIONTIME_PROPERTY

public static java.lang.String ACTIVATIONTIME_PROPERTY
Use the property name to determine labels and converters for the property activiation time.


APPLICATIONNAME_PROPERTY

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


AVAILABLEACTIONS_PROPERTY

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


COMPLETIONTIME_PROPERTY

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


CUSTOMPROPERTY_PROPERTY

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


DESCRIPTION_PROPERTY

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


DISPLAYNAME_PROPERTY

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


EXECUTIONSTATE_PROPERTY

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


EXPIRATIONTIME_PROPERTY

public static java.lang.String EXPIRATIONTIME_PROPERTY
Use the property name to determine labels and converters for the property expiration time.


FAULTNAMES_PROPERTY

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


ID_PROPERTY

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


INPUTMESSAGETYPENAME_PROPERTY

public static java.lang.String INPUTMESSAGETYPENAME_PROPERTY
Use the property name to determine labels and converters for the property input message type name.


INPUTMESSAGETYPETYPESYSTEMNAME_PROPERTY

public static java.lang.String INPUTMESSAGETYPETYPESYSTEMNAME_PROPERTY
Use the property name to determine labels and converters for the property input message type system name.


KIND_PROPERTY

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


LASTMODIFICATIONTIME_PROPERTY

public static java.lang.String LASTMODIFICATIONTIME_PROPERTY
Use the property name to determine labels and converters for the property last modification time.


LASTSTATECHANGETIME_PROPERTY

public static java.lang.String LASTSTATECHANGETIME_PROPERTY
Use the property name to determine labels and converters for the property last state change time.


NAME_PROPERTY

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


OUTPUTMESSAGETYPENAME_PROPERTY

public static java.lang.String OUTPUTMESSAGETYPENAME_PROPERTY
Use the property name to determine labels and converters for the property output message type name.


OUTPUTMESSAGETYPETYPESYSTEMNAME_PROPERTY

public static java.lang.String OUTPUTMESSAGETYPETYPESYSTEMNAME_PROPERTY
Use the property name to determine labels and converters for the property output message type system name.


OWNER_PROPERTY

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


PROCESSADMINISTRATORS_PROPERTY

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


PROCESSINSTANCEID_PROPERTY

public static java.lang.String PROCESSINSTANCEID_PROPERTY
Use the property name to determine labels and converters for the property process instance ID.


PROCESSINSTANCENAME_PROPERTY

public static java.lang.String PROCESSINSTANCENAME_PROPERTY
Use the property name to determine labels and converters for the property process instance name.


PROCESSTEMPLATEID_PROPERTY

public static java.lang.String PROCESSTEMPLATEID_PROPERTY
Use the property name to determine labels and converters for the property process template ID.


PROCESSTEMPLATENAME_PROPERTY

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


STARTTIME_PROPERTY

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


UNHANDLEDEXCEPTION_PROPERTY

public static java.lang.String UNHANDLEDEXCEPTION_PROPERTY
Use the property name to determine labels and converters for the property unhandled exception.

Constructor Detail

ActivityInstanceBean

public ActivityInstanceBean(com.ibm.bpe.api.ActivityInstanceData activity,
                            BFMConnection bfmConnection)
Constructs a new ActivityInstanceBean from an original ActivityInstanceData object.

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

ActivityInstanceBean

public ActivityInstanceBean(com.ibm.bpe.api.QueryResultSet resultSet,
                            BFMConnection bfmConnection)
Constructs a new ActivityInstanceBean 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.

getActivationTime

public java.util.Calendar getActivationTime()
Returns the property activationTime.

Specified by:
getActivationTime in interface com.ibm.bpe.api.ActivityInstanceData
See Also:
ActivityInstanceData.getActivationTime()

getAdminTaskID

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

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

getApplicationName

public java.lang.String getApplicationName()
Returns the property applicationName.

Specified by:
getApplicationName in interface com.ibm.bpe.api.ActivityInstanceData
See Also:
ActivityInstanceData.getApplicationName()

getAvailableActions

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

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

getCompletionTime

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

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

getCustomProperty

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

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

getDescription

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

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

getDisplayName

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

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

getExecutionState

public int getExecutionState()
Returns the property executionState. This property may be set by a client application therefore the local property has precedence over the object's property originally retrieved from the server.

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

setExecutionState

public void setExecutionState(int state)
Changes the property executionState of the activity. This may happen for example when an activity was claimed through the BPC Explorer.
Be aware that the ActivityInstanceBean object and the ActivityInstanceData server object may differ and the object should be refreshed if necessary.

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

getExpirationTime

public java.util.Calendar getExpirationTime()
Returns the property expirationTime.

Specified by:
getExpirationTime in interface com.ibm.bpe.api.ActivityInstanceData
See Also:
ActivityInstanceData.getExpirationTime()

getFaultNames

public java.util.List getFaultNames()
Returns the property faultNames.

Specified by:
getFaultNames in interface com.ibm.bpe.api.ActivityInstanceData
See Also:
ActivityInstanceData.getFaultNames()

getID

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

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

getInputMessageTypeName

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

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

getInputMessageTypeTypeSystemName

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

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

getKind

public int getKind()
Returns the property kind.

Specified by:
getKind in interface com.ibm.bpe.api.ActivityInstanceData
See Also:
ActivityInstanceData.getKind()

getLastModificationTime

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

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

getLastStateChangeTime

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

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

getName

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

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

getNamesOfCustomProperties

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

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

getOutputMessageTypeName

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

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

getOutputMessageTypeTypeSystemName

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

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

getOwner

public java.lang.String getOwner()
Returns the property owner.

Specified by:
getOwner in interface com.ibm.bpe.api.ActivityInstanceData
See Also:
ActivityInstanceData.getOwner()

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.ActivityInstanceData
Throws:
com.ibm.bpe.api.WorkItemManagerException
com.ibm.bpe.api.InvalidLengthException
See Also:
ActivityInstanceData.getProcessAdministrators()

getProcessInstanceID

public com.ibm.bpe.api.PIID getProcessInstanceID()
Returns the property processInstanceID.

Specified by:
getProcessInstanceID in interface com.ibm.bpe.api.ActivityInstanceData
See Also:
ActivityInstanceData.getProcessInstanceID()

getProcessInstanceName

public java.lang.String getProcessInstanceName()
Returns the property processInstanceName.

Specified by:
getProcessInstanceName in interface com.ibm.bpe.api.ActivityInstanceData
See Also:
ActivityInstanceData.getProcessInstanceName()

getProcessTemplateID

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

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

getProcessTemplateName

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

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

getStartTime

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

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

getTaskID

public com.ibm.task.api.TKIID getTaskID()
Returns the property taskID.

Specified by:
getTaskID in interface com.ibm.bpe.api.ActivityInstanceData
See Also:
ActivityInstanceData.getTaskID()

getUnhandledException

public com.ibm.bpe.api.ProcessException getUnhandledException()
Returns the property unhandledException.

Specified by:
getUnhandledException in interface com.ibm.bpe.api.ActivityInstanceData
See Also:
ActivityInstanceData.getUnhandledException()

isBusinessRelevant

public boolean isBusinessRelevant()
Returns the property businessRelevant.

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

getInputMessageWrapper

public MessageWrapper getInputMessageWrapper()
                                      throws ClientException
Retrieves the input message.

Returns:
The wrapped message.
Throws:
ClientException

getOutputMessageWrapper

public MessageWrapper getOutputMessageWrapper()
                                       throws ClientException
Retrieves the output message.

Returns:
The wrapped message.
Throws:
ClientException

getFaultMessageWrapper

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

Returns:
The wrapped message.
Throws:
ClientException