org.ow2.bonita.facade.runtime
Interface ProcessInstance

All Superinterfaces:
RuntimeRecord, java.io.Serializable
All Known Subinterfaces:
ProcessFullInstance
All Known Implementing Classes:
ProcessFullInstanceImpl, ProcessInstanceImpl

public interface ProcessInstance
extends RuntimeRecord

Interface for getting recorded (runtime) information on process instance.


Method Summary
 java.util.Set<ProcessInstanceUUID> getChildrenInstanceUUID()
          If this instance is a parent execution, it returns UUID of children instances otherwise an empty set
 java.lang.String getEndedBy()
          Returns the user finishing the instance of the workflow process.
 java.util.Date getEndedDate()
          Returns the date recorded when the instance is finished.
 java.lang.Object getInitialVariableValue(java.lang.String variableId)
          Returns the value of the variable with the specified key recorded at the instance creation.
 java.util.Map<java.lang.String,java.lang.Object> getInitialVariableValues()
          Returns all global variables (for the process instance) defined within the xml definition file and also optionally added as parameter (variable map) of the instantiateProcess() method.
 InstanceState getInstanceState()
          Returns the current instance state.
 java.util.List<InstanceStateUpdate> getInstanceStateUpdates()
          Returns the list of recorded state changes.
 java.util.Map<java.lang.String,java.lang.Object> getLastKnownVariableValues()
          Returns the map containing all variables with the last updated value.
 ProcessInstanceUUID getParentInstanceUUID()
          If the instance is created to execute a subflow it returns the instance processDefinitionUUID of the instance creating this instance of subflow, otherwise it returns null.
 java.lang.String getStartedBy()
          Returns the user creating and starting the instance of the workflow process.
 java.util.Date getStartedDate()
          Returns the date recorded when the instance has been created and started.
 ProcessInstanceUUID getUUID()
          Returns the UUID of the process instance.
 java.util.List<VariableUpdate> getVariableUpdates()
          Gives access to the historic of variables updates.
 
Methods inherited from interface org.ow2.bonita.facade.runtime.RuntimeRecord
getProcessDefinitionUUID, getProcessInstanceUUID
 

Method Detail

getUUID

ProcessInstanceUUID getUUID()
Returns the UUID of the process instance.

Returns:
The UUID of the process instance.

getParentInstanceUUID

ProcessInstanceUUID getParentInstanceUUID()
If the instance is created to execute a subflow it returns the instance processDefinitionUUID of the instance creating this instance of subflow, otherwise it returns null.

Returns:
the ProcessInstanceUUID of the parent instance (case of subflow) otherwise null.

getChildrenInstanceUUID

java.util.Set<ProcessInstanceUUID> getChildrenInstanceUUID()
If this instance is a parent execution, it returns UUID of children instances otherwise an empty set

Returns:
If this instance is a parent execution, it returns UUID of children instances otherwise an empty set

getStartedDate

java.util.Date getStartedDate()
Returns the date recorded when the instance has been created and started.

Returns:
the date recorded when the instance has been created and started.

getEndedDate

java.util.Date getEndedDate()
Returns the date recorded when the instance is finished.

Returns:
the date recorded when the instance is finished.

getStartedBy

java.lang.String getStartedBy()
Returns the user creating and starting the instance of the workflow process.

Returns:
the user creating and starting the instance of the workflow process.

getEndedBy

java.lang.String getEndedBy()
Returns the user finishing the instance of the workflow process.

Returns:
the user finishing the instance of the workflow process.

getInitialVariableValues

java.util.Map<java.lang.String,java.lang.Object> getInitialVariableValues()
Returns all global variables (for the process instance) defined within the xml definition file and also optionally added as parameter (variable map) of the instantiateProcess() method. Variable values are ones recorded at instance creation. Map Key is the variable processDefinitionUUID. Map Object is the variable value. An empty map is returned if no variable is found.

Returns:
the map containing global (for process instance) variables recorded at instance creation. The variable object (can be: an Enumeration, a plain String, a Boolean, a Date, a Long or a Double).

getInitialVariableValue

java.lang.Object getInitialVariableValue(java.lang.String variableId)
Returns the value of the variable with the specified key recorded at the instance creation.

Parameters:
variableId - the variable processDefinitionUUID.
Returns:
the value of the variable with the specified key recorded at the instance creation. (can be: an Enumeration, a plain String, a Boolean, a Date, a Long or a Double).

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. the variable object can be: an Enumeration, a plain String, a Boolean, a Date, a Long or a Double.

getInstanceState

InstanceState getInstanceState()
Returns the current instance state.

Returns:
the current instance state.

getInstanceStateUpdates

java.util.List<InstanceStateUpdate> getInstanceStateUpdates()
Returns the list of recorded state changes.

Returns:
The list of recorded state changes.

getVariableUpdates

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

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


Copyright © 2009 OW2 Consortium. All Rights Reserved.