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 enumRepresents 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.intgetId()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 ornullif this step is not a sub-workflow invocation.Returns the end criteria of the user task.Returns the user task mode ornullif this step is not a user task.Returns the work item associated to the user task ornullif 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; returnsnullif this step is not a wait task.ReturnsBoolean.TRUEif the resumption has been done by an administration action; returnsnullif this step is not a wait task.Returns the parameters which were received when the wait task was resumed; returnsnullif this step is not a wait task.Returns the resumption identifier associated with the wait task; returnsnullif this step is not a wait task.Returns the current state of the wait task; returnsnullif this step is not a wait task.booleanReturnstrueif this step is a condition.booleanReturnstrueif this step is the current step of the process instance.booleanIndicates if the step has been defined as hidden in the progress view.booleanReturnstrueif this step is a script task.booleanReturnstrueif this step is a sub-workflow invocation.booleanReturnstrueif this step is a user task.booleanReturnstrueif 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()Returnstrueif this step is a script task. -
isUserTask
boolean isUserTask()Returnstrueif this step is a user task. -
isCondition
boolean isCondition()Returnstrueif this step is a condition. -
isSubWorkflowsInvocation
boolean isSubWorkflowsInvocation()Returnstrueif this step is a sub-workflow invocation.- Since:
- 5.5.0
-
isWaitTask
boolean isWaitTask()Returnstrueif this step is a wait task.- Since:
- 5.6.1
-
isCurrentStep
boolean isCurrentStep()Returnstrueif this step is the current step of the process instance. -
getConditionResult
Boolean getConditionResult()Returns the result of the condition.Returns
nullif this step is not a condition.- See Also:
-
getUserTaskWorkItems
List<UserTask.WorkItem> getUserTaskWorkItems()Returns the list of work items associated with the user task. Returnsnullif 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
ListofUserTask.WorkItem. - See Also:
-
getUserTaskWorkItem
UserTask.WorkItem getUserTaskWorkItem()Returns the work item associated to the user task ornullif 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 ornullif 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
nullif 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 ornullif 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
ListofProcessInstance. - Since:
- 5.5.0
-
getSubWorkflowsKeys
List<ProcessInstanceKey> getSubWorkflowsKeys()Returns the list including the key of each sub-workflow created by this step ornullif 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
ListofProcessInstanceKey. - Since:
- 5.7.0
-
getWaitTaskReceivedParameters
Returns the parameters which were received when the wait task was resumed; returnsnullif this step is not a wait task.- Returns:
- a
Mapof parameters (key: parameter name, value: parameter value). - Since:
- 5.6.1
-
getWaitTaskResumeId
String getWaitTaskResumeId()Returns the resumption identifier associated with the wait task; returnsnullif 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; returnsnullif this step is not a wait task.- Since:
- 5.6.1
-
getWaitTaskHasBeenForcedToResume
Boolean getWaitTaskHasBeenForcedToResume()ReturnsBoolean.TRUEif the resumption has been done by an administration action; returnsnullif this step is not a wait task.- Since:
- 5.6.1
-
getWaitTaskState
ProcessInstanceStep.WaitTaskState getWaitTaskState()Returns the current state of the wait task; returnsnullif 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
-