Module io.automatiko.engine.api
Interface WorkflowProcessInstance
- All Superinterfaces:
EventListener,NodeInstanceContainer,ProcessInstance
A workflow process instance represents one specific instance of a workflow
process that is currently executing. It is an extension of a
ProcessInstance and contains all runtime state related to the
execution of workflow processes.- See Also:
-
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
Modifier and TypeMethodDescriptionvoidAdds new tagerrors()Returns list of errors for this process instance.Evaluates all tags to apply any changes of the variablesReturns optional correlation key assigned to process instanceReturns end date (either completed or aborted) of this process instancegetMetaData(String name) Returns start date of this process instancegetTags()Returns current collection of tags.getVariable(String name) Returns the value of the variable with the given name.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 nameMethods inherited from interface io.automatiko.engine.api.runtime.process.EventListener
getEventDescriptions, getEventTypes, signalEventMethods inherited from interface io.automatiko.engine.api.runtime.process.NodeInstanceContainer
getNodeInstance, getNodeInstancesMethods inherited from interface io.automatiko.engine.api.runtime.process.ProcessInstance
getId, getParentProcessInstanceId, getProcess, getProcessId, getProcessName, getPublicVariables, getReferenceId, getRootProcessId, getRootProcessInstanceId, getState, getVariables
-
Method Details
-
getVariable
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.- Specified by:
getVariablein interfaceProcessInstance- Parameters:
name- the name of the variable- Returns:
- the value of the variable, or
nullif it cannot be found
-
setVariable
Sets process variable with given value under given name- Specified by:
setVariablein interfaceProcessInstance- 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
-
errors
List<ExecutionsErrorInfo> errors()Returns list of errors for this process instance.- Returns:
- list of errors if the process instance is in error state
-
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
Adds new tag- Parameters:
tag- new tag to be added
-
removedTag
Removes the tag associated with given id- Parameters:
id- identifier of the tag
-
getMetaData
-