Package com.orchestranetworks.workflow
Interface ProcessInstance
public interface ProcessInstance
Represents a workflow and provides
related information.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the creation date of this workflow.Returns the user that created this workflow.Returns the list of the current sub-workflows; if no current sub-workflows exist, returns an empty list.Returns the data context of this workflow.Returns the description of this workflow.getLabel()
Returns the label of this workflow.Returns the last modified date of this workflow.Returns the parent of the sub-workflow if the process instance is a sub-workflow, otherwise returnsnull
.Returns the current priority of this workflow if defined, otherwise returnsnull
.Returns the current priority of this workflow or the default priority if defined, elsenull
.Returns the identifier of this workflow.Returns the identifier of the associated workflow publication.Returns the identifier of a sub-workflow in the case of a dynamic sub-workflow invocation.Returns the list of all the sub-workflows (past or current) of this workflow; if no sub-workflows exist, returns an empty list.Returns the list of the current work items if this workflow is currently executing a user task.boolean
Returnstrue
if this workflow is completed, returnsfalse
otherwise.boolean
Returnstrue
if this workflow has errors, otherwise returnsfalse
.boolean
Returnstrue
if the process instance is a sub-workflow, otherwise returnsfalse
.
-
Method Details
-
getProcessInstanceKey
ProcessInstanceKey getProcessInstanceKey()Returns the identifier of this workflow. -
getPublishProcessKey
PublishedProcessKey getPublishProcessKey()Returns the identifier of the associated workflow publication.In the case of a sub-workflow, this method returns the key of the publication associated with the main workflow.
-
getLabel
UserMessage getLabel()Returns the label of this workflow. -
getDescription
UserMessage getDescription()Returns the description of this workflow. -
getCreator
UserReference getCreator()Returns the user that created this workflow. -
getCreationDate
Date getCreationDate()Returns the creation date of this workflow. -
getLastModificationDate
Date getLastModificationDate()Returns the last modified date of this workflow. -
getPriority
Integer getPriority()Returns the current priority of this workflow if defined, otherwise returnsnull
. -
getPriorityOrDefaultPriority
Integer getPriorityOrDefaultPriority()Returns the current priority of this workflow or the default priority if defined, elsenull
. -
isCompleted
boolean isCompleted()Returnstrue
if this workflow is completed, returnsfalse
otherwise. -
isInError
boolean isInError()Returnstrue
if this workflow has errors, otherwise returnsfalse
.- Since:
- 5.4.1
-
getWorkItems
List<UserTask.WorkItem> getWorkItems()Returns the list of the current work items if this workflow is currently executing a user task.If this workflow is complete, or the current step is not a user task, this method returns an empty list.
- Returns:
- a
List
ofUserTask.WorkItem
.
-
getDataContext
DataContextReadOnly getDataContext()Returns the data context of this workflow. -
getSubWorkflows
List<ProcessInstance> getSubWorkflows()Returns the list of all the sub-workflows (past or current) of this workflow; if no sub-workflows exist, returns an empty list.The returned sub-workflows may be active or completed (@link
isCompleted()
.- Returns:
- a
List
ofProcessInstance
. - Since:
- 5.5.0
-
getCurrentSubWorkflows
List<ProcessInstance> getCurrentSubWorkflows()Returns the list of the current sub-workflows; if no current sub-workflows exist, returns an empty list.The current sub-workflows are the sub-workflows for which the workflow is waiting; this is to say the sub-workflows matching with the current sub-workflows invocation step.
The returned sub-workflows may be active or completed (@link
isCompleted()
.- Returns:
- a
List
ofProcessInstance
. - Since:
- 5.5.0
-
getSubWorkflowName
String getSubWorkflowName()Returns the identifier of a sub-workflow in the case of a dynamic sub-workflow invocation.- Since:
- 5.5.0
-
getParentKey
ProcessInstanceKey getParentKey()Returns the parent of the sub-workflow if the process instance is a sub-workflow, otherwise returnsnull
.- Since:
- 5.5.0
- See Also:
-
isSubWorkflow
boolean isSubWorkflow()Returnstrue
if the process instance is a sub-workflow, otherwise returnsfalse
.- Since:
- 5.5.0
-