Class WorkflowInstance
java.lang.Object
io.nflow.engine.model.ModelObject
io.nflow.engine.workflow.instance.WorkflowInstance
An instance of a workflow.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for workflow instance.static enumDescribes the status for workflow instance. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal List<WorkflowInstanceAction>The list of actions.final StringBusiness key.Child workflow instance IDs created by this workflow instance, grouped by instance action ID.final org.joda.time.DateTimeThe workflow instance creation time.final StringThe name of the executor group for this workflow instance.final IntegerThe id of executor that is currently processing this workflow.final StringExternal identifier of the workflow instance.final LongThe workflow instance identifier.final booleanTrue if this instance is archived.final org.joda.time.DateTimeThe last modification time of the workflow instance.final org.joda.time.DateTimeThe next activation time for the workflow instance.The state variable values before executor started processing the state.final LongThe id of the workflow action that created this sub workflow.final LongThe id of the workflow that created this sub workflow.final ShortThe priority of the workflow instance.final intNumber of retry attempts of the current state.The signal raised for this workflow instance.final org.joda.time.DateTimeTime when workflow processing was started, that is, time when processing of first action started.final StringThe name of the current state.final StringThe description of the last action executed by the workflow.The state variables.The current status of the workflow instance.final StringThe type of the workflow definition. -
Method Summary
Modifier and TypeMethodDescriptionReturn the state variables that have been added or modified during state processing.getStateVariable(String name) <T> TgetStateVariable(String name, Class<T> valueType) <T> TgetStateVariable(String name, Class<T> valueType, T defaultValue) getStateVariable(String name, String defaultValue) Methods inherited from class io.nflow.engine.model.ModelObject
equals, hashCode, toString
-
Field Details
-
id
The workflow instance identifier. -
executorId
The id of executor that is currently processing this workflow. May be null. -
parentWorkflowId
The id of the workflow that created this sub workflow. Is null for root workflows. -
parentActionId
The id of the workflow action that created this sub workflow. Is null for root workflows. -
status
The current status of the workflow instance. -
type
The type of the workflow definition. -
priority
The priority of the workflow instance. When an executor chooses from many available scheduled workflow instances it primarily (unfairly) schedules the workflow instance with the larger priority value, and for workflows with the same priority, the one scheduled first. Priority defaults to 0 and can also be negative. -
businessKey
Business key. -
externalId
External identifier of the workflow instance. Must be unique within the same executor group. -
state
The name of the current state. -
stateText
The description of the last action executed by the workflow. -
nextActivation
public final org.joda.time.DateTime nextActivationThe next activation time for the workflow instance. -
stateVariables
The state variables. Uses the variable name as the key and serialized variable value as value. -
originalStateVariables
The state variable values before executor started processing the state. -
actions
The list of actions. -
retries
public final int retriesNumber of retry attempts of the current state. Zero when the state is executed for the first time. -
created
public final org.joda.time.DateTime createdThe workflow instance creation time. -
modified
public final org.joda.time.DateTime modifiedThe last modification time of the workflow instance. -
started
public final org.joda.time.DateTime startedTime when workflow processing was started, that is, time when processing of first action started. -
executorGroup
The name of the executor group for this workflow instance. -
signal
The signal raised for this workflow instance. -
isArchived
public final boolean isArchivedTrue if this instance is archived. Archived instances are read-only, no modifications are allowed to them. -
childWorkflows
Child workflow instance IDs created by this workflow instance, grouped by instance action ID.
-
-
Method Details
-
getChangedStateVariables
Return the state variables that have been added or modified during state processing.- Returns:
- New and modified state variables.
-
getStateVariable
-
getStateVariable
-
getStateVariable
-
getStateVariable
-