Interface WorkflowProcessInstance
-
- All Superinterfaces:
EventListener,NodeInstanceContainer,ProcessInstance
public interface WorkflowProcessInstance extends ProcessInstance, NodeInstanceContainer
A workflow process instance represents one specific instance of a workflow process that is currently executing. It is an extension of aProcessInstanceand contains all runtime state related to the execution of workflow processes.- See Also:
ProcessInstance
-
-
Field Summary
-
Fields inherited from interface io.automatiko.engine.api.runtime.process.ProcessInstance
SLA_ABORTED, SLA_MET, SLA_NA, SLA_PENDING, SLA_VIOLATED, STATE_ABORTED, STATE_ACTIVE, STATE_COMPLETED, STATE_ERROR, STATE_PENDING, STATE_SUSPENDED
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddTag(String value)Adds new tagCollection<AdHocFragment>adHocFragments()Collection<Tag>evaluateTags()Evaluates all tags to apply any changes of the variablesStringgetCorrelationKey()Returns optional correlation key assigned to process instanceDategetEndDate()Returns end date (either completed or aborted) of this process instanceStringgetErrorMessage()Returns error message associated with this process instance in case it is in an error state.ObjectgetMetaData(String name)StringgetNodeIdInError()Returns node definition id associated with node instance that failed in case this process instance is in an errorDategetStartDate()Returns start date of this process instanceCollection<Tag>getTags()Returns current collection of tags.ObjectgetVariable(String name)Returns the value of the variable with the given name.Collection<Milestone>milestones()Returns the list of Milestones and their status in the current process instancesbooleanremovedTag(String id)Removes the tag associated with given idvoidsetVariable(String name, Object value)Sets process variable with given value under given name-
Methods inherited from interface io.automatiko.engine.api.runtime.process.EventListener
getEventDescriptions, getEventTypes, signalEvent
-
Methods inherited from interface io.automatiko.engine.api.runtime.process.NodeInstanceContainer
getNodeInstance, getNodeInstances
-
Methods inherited from interface io.automatiko.engine.api.runtime.process.ProcessInstance
getId, getParentProcessInstanceId, getProcess, getProcessId, getProcessName, getReferenceId, getRootProcessId, getRootProcessInstanceId, getState, getVariables
-
-
-
-
Method Detail
-
getVariable
Object getVariable(String name)
Returns the value of the variable with the given name. Note that only variables in the process-level scope will be searched. Returnsnullif the value of the variable is null or if the variable cannot be found.- Parameters:
name- the name of the variable- Returns:
- the value of the variable, or
nullif it cannot be found
-
setVariable
void setVariable(String name, Object value)
Sets process variable with given value under given name- Parameters:
name- name of the variablevalue- value of the variable
-
getStartDate
Date getStartDate()
Returns start date of this process instance- Returns:
- actual start date
-
getEndDate
Date getEndDate()
Returns end date (either completed or aborted) of this process instance- Returns:
- actual end date
-
getNodeIdInError
String getNodeIdInError()
Returns node definition id associated with node instance that failed in case this process instance is in an error- Returns:
- node definition id of the failed node instance
-
getErrorMessage
String getErrorMessage()
Returns error message associated with this process instance in case it is in an error state. It will consists of- unique error id (uuid)
- fully qualified class name of the root cause
- error message of the root cause
- Returns:
- error message
-
getCorrelationKey
String getCorrelationKey()
Returns optional correlation key assigned to process instance- Specified by:
getCorrelationKeyin interfaceProcessInstance- Returns:
- correlation key if present otherwise null
-
milestones
Collection<Milestone> milestones()
Returns the list of Milestones and their status in the current process instances- Returns:
- Milestones defined in the process
-
adHocFragments
Collection<AdHocFragment> adHocFragments()
- Returns:
- AdHocFragments from the process instances
-
getTags
Collection<Tag> getTags()
Returns current collection of tags.- Returns:
- collection of tags
-
evaluateTags
Collection<Tag> evaluateTags()
Evaluates all tags to apply any changes of the variables- Returns:
- collection of tags
-
addTag
void addTag(String value)
Adds new tag- Parameters:
tag- new tag to be added
-
removedTag
boolean removedTag(String id)
Removes the tag associated with given id- Parameters:
id- identifier of the tag
-
-