Interface ProcessInstanceStep
- a script task,
- a condition,
- a user task,
- a sub-workflows invocation.
- Since:
- 5.4.1
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Represents the different states of a wait task. -
Method Summary
Modifier and TypeMethodDescriptionReturns the result of the condition.Returns the state of the data context just after the execution of the step.Returns the state of the data context just before the execution of the step.Returns the description of this step.Returns the end date of this step.int
getId()
Returns the identifier of this step.getLabel()
Returns the label of this step.Returns the start date of this step.Deprecated.Since 5.7.0.Returns the list including the key of each sub-workflow created by this step ornull
if this step is not a sub-workflow invocation.Returns the end criteria of the user task.Returns the user task mode ornull
if this step is not a user task.Returns the work item associated to the user task ornull
if this step is not a user task.Returns the list of work items associated with the user task.Returns the profile authorized to resume the wait task; returnsnull
if this step is not a wait task.ReturnsBoolean.TRUE
if the resumption has been done by an administration action; returnsnull
if this step is not a wait task.Returns the parameters which were received when the wait task was resumed; returnsnull
if this step is not a wait task.Returns the resumption identifier associated with the wait task; returnsnull
if this step is not a wait task.Returns the current state of the wait task; returnsnull
if this step is not a wait task.boolean
Returnstrue
if this step is a condition.boolean
Returnstrue
if this step is the current step of the process instance.boolean
Indicates if the step has been defined as hidden in the progress view.boolean
Returnstrue
if this step is a script task.boolean
Returnstrue
if this step is a sub-workflow invocation.boolean
Returnstrue
if this step is a user task.boolean
Returnstrue
if this step is a wait task.
-
Method Details
-
getId
int getId()Returns the identifier of this step.- Since:
- 5.6.0
-
getStartDate
Date getStartDate()Returns the start date of this step. -
getEndDate
Date getEndDate()Returns the end date of this step. -
getLabel
UserMessage getLabel()Returns the label of this step. -
getDescription
UserMessage getDescription()Returns the description of this step. -
getDataContextBefore
DataContext getDataContextBefore()Returns the state of the data context just before the execution of the step.- Since:
- 5.6.1
-
getDataContextAfter
DataContext getDataContextAfter()Returns the state of the data context just after the execution of the step.- Since:
- 5.6.1
-
isScriptTask
boolean isScriptTask()Returnstrue
if this step is a script task. -
isUserTask
boolean isUserTask()Returnstrue
if this step is a user task. -
isCondition
boolean isCondition()Returnstrue
if this step is a condition. -
isSubWorkflowsInvocation
boolean isSubWorkflowsInvocation()Returnstrue
if this step is a sub-workflow invocation.- Since:
- 5.5.0
-
isWaitTask
boolean isWaitTask()Returnstrue
if this step is a wait task.- Since:
- 5.6.1
-
isCurrentStep
boolean isCurrentStep()Returnstrue
if this step is the current step of the process instance. -
getConditionResult
Boolean getConditionResult()Returns the result of the condition.Returns
null
if this step is not a condition.- See Also:
-
getUserTaskWorkItems
List<UserTask.WorkItem> getUserTaskWorkItems()Returns the list of work items associated with the user task. Returnsnull
if this step is not a user task. In the default user task mode (single work item), this method returns a list with a single work item.For the default single work item mode, it is recommended to use instead
getUserTaskWorkItem()
.- Returns:
- a
List
ofUserTask.WorkItem
. - See Also:
-
getUserTaskWorkItem
UserTask.WorkItem getUserTaskWorkItem()Returns the work item associated to the user task ornull
if this step is not a user task.In the legacy user task mode, this method throws an exception if user tasks have several work items.
- Throws:
IllegalStateException
- if user tasks have several work items.- Since:
- 5.7.0
-
getUserTaskMode
UserTask.UserTaskMode getUserTaskMode()Returns the user task mode ornull
if this step is not a user task.This method is useful to know which method must be called (
getUserTaskWorkItem()
orgetUserTaskWorkItems()
).- Since:
- 5.7.0
-
getUserTaskCompletionStrategy
UserTask.CompletionStrategy getUserTaskCompletionStrategy()Returns the end criteria of the user task.Returns
null
if the step is not a user task.In the default user task mode (single work item), this method always returns the criteria
UserTask.CompletionStrategy.ALL_WORK_ITEMS_COMPLETED
.- See Also:
-
getSubWorkflowsInvocationSubWorkflows
Deprecated.Since 5.7.0. This method is replaced bygetSubWorkflowsKeys()
Returns the list of sub-workflows created by this step ornull
if this step is not a sub-workflow invocation.This method will return an empty list if the sub-workflows were deleted.
To get the history of a sub-workflow, use
WorkflowEngine.getProcessInstanceHistory(ProcessInstanceKey)
with the key of the sub-workflow.- Returns:
- a
List
ofProcessInstance
. - Since:
- 5.5.0
-
getSubWorkflowsKeys
List<ProcessInstanceKey> getSubWorkflowsKeys()Returns the list including the key of each sub-workflow created by this step ornull
if this step is not a sub-workflow invocation.To get the history of a sub workflow, use
WorkflowEngine.getProcessInstanceHistory(ProcessInstanceKey)
with the key of the sub-workflow.- Returns:
- a
List
ofProcessInstanceKey
. - Since:
- 5.7.0
-
getWaitTaskReceivedParameters
Returns the parameters which were received when the wait task was resumed; returnsnull
if this step is not a wait task.- Returns:
- a
Map
of parameters (key: parameter name, value: parameter value). - Since:
- 5.6.1
-
getWaitTaskResumeId
String getWaitTaskResumeId()Returns the resumption identifier associated with the wait task; returnsnull
if this step is not a wait task.This identifier is required to resume a wait task.
- Since:
- 5.6.1
-
getWaitTaskExpectedProfile
Profile getWaitTaskExpectedProfile()Returns the profile authorized to resume the wait task; returnsnull
if this step is not a wait task.- Since:
- 5.6.1
-
getWaitTaskHasBeenForcedToResume
Boolean getWaitTaskHasBeenForcedToResume()ReturnsBoolean.TRUE
if the resumption has been done by an administration action; returnsnull
if this step is not a wait task.- Since:
- 5.6.1
-
getWaitTaskState
ProcessInstanceStep.WaitTaskState getWaitTaskState()Returns the current state of the wait task; returnsnull
if this step is not a wait task.- Since:
- 5.6.1
-
isHiddenInProgressView
boolean isHiddenInProgressView()Indicates if the step has been defined as hidden in the progress view.- Since:
- 6.0.0
-