org.ow2.bonita.facade.runtime
Interface ActivityInstance<T extends ActivityBody>

All Superinterfaces:
RuntimeRecord, java.io.Serializable

public interface ActivityInstance<T extends ActivityBody>
extends RuntimeRecord

Runtime (recorded) data concerning activities is divided in a common part and a body.
This interface concerns the common part for the activity.


Method Summary
 java.lang.String getActivityId()
          Returns the value of the id attribute of the Activity element defined into the XPDL file.
 java.lang.String getActivityInstanceId()
          Returns the activity instance id of this activity (in case of multi instantiation)
 T getBody()
           The body of the activity depends on some XPDL definition elements within the Activity element like: Implementation (No, Subflow), StartMode (Manual/Automatic) or Route.
 java.lang.String getIterationId()
          Returns the iteration id of this activity
 java.util.Map<java.lang.String,java.lang.Object> getLastKnownVariableValues()
          Returns the map containing all variables with the last updated value.
 ActivityInstanceUUID getUUID()
          Returns the UUID of the activity instance.
 java.util.Map<java.lang.String,java.lang.Object> getVariablesBeforeStarted()
          Returns all variables for the recorded activity before the activity has been started.
 java.util.List<VariableUpdate> getVariableUpdates()
          Gives access to the historic of variables updates.
 java.lang.Object getVariableValueBeforeStarted(java.lang.String variableId)
          Returns the value of the variable with the specified key before the activity has been started.
 
Methods inherited from interface org.ow2.bonita.facade.runtime.RuntimeRecord
getPackageDefinitionUUID, getProcessDefinitionUUID, getProcessInstanceUUID
 

Method Detail

getUUID

ActivityInstanceUUID getUUID()
Returns the UUID of the activity instance.

Returns:
The UUID of the activity instance.

getActivityId

java.lang.String getActivityId()
Returns the value of the id attribute of the Activity element defined into the XPDL file.


getIterationId

java.lang.String getIterationId()
Returns the iteration id of this activity


getActivityInstanceId

java.lang.String getActivityInstanceId()
Returns the activity instance id of this activity (in case of multi instantiation)


getVariablesBeforeStarted

java.util.Map<java.lang.String,java.lang.Object> getVariablesBeforeStarted()
Returns all variables for the recorded activity before the activity has been started. If a hook with an OnReady event name has been defined, this hook has been executed. The map returned by this method contains both global variables (for the process) and local variables (for this activity). Key is the variable processDefinitionUUID and value is the variable object. An empty map is returned if no variable is found.

Returns:
The map containing activity variables.

getVariableValueBeforeStarted

java.lang.Object getVariableValueBeforeStarted(java.lang.String variableId)
Returns the value of the variable with the specified key before the activity has been started. If a hook with an OnReady event name has been defined, this hook has been executed.

Parameters:
variableId - the variable processDefinitionUUID.
Returns:
The value of the variable with the specified key.

getBody

T getBody()

The body of the activity depends on some XPDL definition elements within the Activity element like: Implementation (No, Subflow), StartMode (Manual/Automatic) or Route.

The returned body gives access to the recorded informations that are specific to the type of the body.

Returns:
The recorded informations depending on the type of the body.

getVariableUpdates

java.util.List<VariableUpdate> getVariableUpdates()
Gives access to the historic of variables updates.

Returns:
The list of recorded informations for the variable updates.

getLastKnownVariableValues

java.util.Map<java.lang.String,java.lang.Object> getLastKnownVariableValues()
Returns the map containing all variables with the last updated value.

Returns:
The map containing all variables with the last updated value.


Copyright © 2008 OW2 Consortium. All Rights Reserved.