Workflow Nodes
Subscription
A Workflow Node represents a specific point in an approval process, whether it begins the review process, approves or rejects the asset, or reassigns the task.
Below are the different types of nodes and the possible actions associated with each node.
Types of Nodes
| Node | Description |
|---|---|
| Task | Task nodes indicate the workflow task and its assignee. |
| Fork and Join | Fork and Join are paired nodes for splitting the review process for multiple reviewers in parallel, and then rejoining when reviews are complete. |
| Join XOR | The Join XOR node allows the workflow to proceed as long as the transition from one of the parallel reviewers is invoked. |
| Condition | The Condition node establishes a condition before the review process can proceed. |
| Start | The Start node begins the workflow. |
| End | The default End node by default sets the workflow status to Approved. |
| State | State nodes place the review process in a particular mode, or state. Start and End nodes are special types of state nodes. |
Start and End Nodes
Start and end nodes kick off workflow processing and bring the asset to its final, approved state. Often you can use the default start and end nodes without modification.
End nodes have a default action that sets the workflow status to Approved using the Groovy scripting language:
import com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil;
import com.liferay.portal.kernel.workflow.WorkflowConstants;
WorkflowStatusManagerUtil.updateStatus(WorkflowConstants.getLabelStatus("approved"), workflowContext);
State Nodes
State nodes can have Actions and Notifications. For example, you can create a node that sets the status to Expired, using this Groovy script: