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

NodeDescription
TaskTask nodes indicate the workflow task and its assignee.
Fork and JoinFork and Join are paired nodes for splitting the review process for multiple reviewers in parallel, and then rejoining when reviews are complete.
Join XORThe Join XOR node allows the workflow to proceed as long as the transition from one of the parallel reviewers is invoked.
ConditionThe Condition node establishes a condition before the review process can proceed.
StartThe Start node begins the workflow.
EndThe default End node by default sets the workflow status to Approved.
StateState 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:

import com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil;
import com.liferay.portal.kernel.workflow.WorkflowConstants;

WorkflowStatusManagerUtil.updateStatus(WorkflowConstants.getLabelStatus("expired"), workflowContext);

Condition Nodes

A Condition node checks an asset or its execution context, and depending on the result, sends it to the appropriate transition. This node requires a script that sets a value to one of the transitions.

In the Category Specific Definition is a script that looks up the asset in question, retrieves its asset category, and sets an initial returnValue. Then it checks to see if the asset has been marked with the legal category. If not it goes through Content Review (the content-review task in the workflow), and if it does it goes through Legal Review (the legal-review task in the workflow).

Task Nodes

Task nodes represent where all the work is done. See Creating Workflow Tasks and Using Task Nodes.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy