Class WorkflowInstance
- java.lang.Object
-
- io.nflow.engine.model.ModelObject
-
- io.nflow.engine.workflow.instance.WorkflowInstance
-
public class WorkflowInstance extends ModelObject
An instance of a workflow.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWorkflowInstance.BuilderBuilder for workflow instance.static classWorkflowInstance.WorkflowInstanceStatusDescribes the status for workflow instance.
-
Field Summary
Fields Modifier and Type Field Description List<WorkflowInstanceAction>actionsThe list of actions.StringbusinessKeyBusiness key.Map<Long,List<Long>>childWorkflowsChild workflow instance IDs created by this workflow instance, grouped by instance action ID.org.joda.time.DateTimecreatedThe workflow instance creation time.StringexecutorGroupThe name of the executor group for this workflow instance.IntegerexecutorIdThe id of executor that is currently processing this workflow.StringexternalIdExternal identifier of the workflow instance.LongidThe workflow instance identifier.booleanisArchivedTrue if this instance is archived.org.joda.time.DateTimemodifiedThe last modification time of the workflow instance.org.joda.time.DateTimenextActivationThe next activation time for the workflow instance.Map<String,String>originalStateVariablesThe state variable values before executor started processing the state.LongparentActionIdThe id of the workflow action that created this sub workflow.LongparentWorkflowIdThe id of the workflow that created this sub workflow.ShortpriorityThe priority of the workflow instance.intretriesNumber of retry attempts of the current state.Optional<Integer>signalThe signal raised for this workflow instance.org.joda.time.DateTimestartedTime when workflow processing was started, that is, time when processing of first action started.StringstateThe name of the current state.StringstateTextThe description of the last action executed by the workflow.Map<String,String>stateVariablesThe state variables.WorkflowInstance.WorkflowInstanceStatusstatusThe current status of the workflow instance.StringtypeThe type of the workflow definition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getChangedStateVariables()Return the state variables that have been added or modified during state processing.StringgetStateVariable(String name)<T> TgetStateVariable(String name, Class<T> valueType)<T> TgetStateVariable(String name, Class<T> valueType, T defaultValue)StringgetStateVariable(String name, String defaultValue)-
Methods inherited from class io.nflow.engine.model.ModelObject
equals, hashCode, toString
-
-
-
-
Field Detail
-
id
public final Long id
The workflow instance identifier.
-
executorId
public final Integer executorId
The id of executor that is currently processing this workflow. May be null.
-
parentWorkflowId
public final Long parentWorkflowId
The id of the workflow that created this sub workflow. Is null for root workflows.
-
parentActionId
public final Long parentActionId
The id of the workflow action that created this sub workflow. Is null for root workflows.
-
status
public final WorkflowInstance.WorkflowInstanceStatus status
The current status of the workflow instance.
-
type
public final String type
The type of the workflow definition.
-
priority
public final Short 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
public final String businessKey
Business key.
-
externalId
public final String externalId
External identifier of the workflow instance. Must be unique within the same executor group.
-
state
public final String state
The name of the current state.
-
stateText
public final String stateText
The description of the last action executed by the workflow.
-
nextActivation
public final org.joda.time.DateTime nextActivation
The next activation time for the workflow instance.
-
stateVariables
public final Map<String,String> stateVariables
The state variables. Uses the variable name as the key and serialized variable value as value.
-
originalStateVariables
public final Map<String,String> originalStateVariables
The state variable values before executor started processing the state.
-
actions
public final List<WorkflowInstanceAction> actions
The list of actions.
-
retries
public final int retries
Number of retry attempts of the current state. Zero when the state is executed for the first time.
-
created
public final org.joda.time.DateTime created
The workflow instance creation time.
-
modified
public final org.joda.time.DateTime modified
The last modification time of the workflow instance.
-
started
public final org.joda.time.DateTime started
Time when workflow processing was started, that is, time when processing of first action started.
-
executorGroup
public final String executorGroup
The name of the executor group for this workflow instance.
-
isArchived
public final boolean isArchived
True if this instance is archived. Archived instances are read-only, no modifications are allowed to them.
-
-