Workflow Designer

Configuring Workflow Actions and Notifications

Subscription

Using the workflow designer, users can configure workflow actions and notifications for each node.

Workflow actions are operations that occur automatically as an entry moves through a workflow definition. You can use out-of-the-box (OOTB) actions to handle common status changes without writing code. This ensures workflow compatibility across all environments.

Important

To write Groovy scripts, enable scripting in System Settings → Security → Script Management. This option is available only for PaaS and Self-Hosted environments.

Workflow notifications alert assignees when a task requires attention and can update creators on a process’s status. You can send notifications for tasks, task timers, or any other node type.

You can add actions and notifications to task nodes.

Most workflow definitions use actions and notifications with task nodes. For example, in the Single Approver definition, the review and update task nodes contain both actions and notifications. Conversely, start and end nodes do not require them unless you want to notify the original author when a process begins or ends.

Adding Actions

Actions are triggered at specific points in a node’s life cycle. You can execute an action when an entry enters a node, exits a node, or once a task node is assigned. For example, if a reviewer rejects an entry, an action can set the status to Denied and return it to the author.

When configuring an action, use the Update Status type to apply a new status to an entry. While the following descriptions reflect the most common use cases for these statuses, their behavior may vary based on your workflow definition and business requirements.

Approved: The entry is finalized and visible to users with view permissions.

Denied: The entry is not approved and requires modifications before it can be resubmitted.

Draft: The entry is in its initial state and is not yet ready for review.

Expired: The entry is no longer valid or active.

In Recycle Bin: The entry is marked for deletion but still can be restored.

Inactive: The entry is disabled and hidden from the standard user interface.

Incomplete: The entry is missing required information for the current workflow step.

Pending: The entry is awaiting action, typically from a reviewer or the original author.

Scheduled: The entry is approved but set to become active at a future date.

Liferay provides several out-of-the-box (OOTB) workflow statuses.

To reject assets and ask the asset creator to make changes (like in the Single Approver definition), you can add actions to the Update task node, setting the asset’s status to denied and then pending.

  1. Go to the Global Menu (Global Menu) → ApplicationsProcess Builder.

  2. On the Workflows tab, click the workflow definition (for example, Single Approver).

  3. Click the Update node.

    Modify the Update node.

  4. Click an existing action or New if there are none currently defined.

  5. Enter deny in the Name field.

  6. Select Update Status from the Type drop-down menu.

  7. Select Denied from the Status drop-down menu.

  8. Select On Assignment from the Execution Type drop-down menu.

    Add the Deny action.

  9. Click New Action and repeat these steps to create a second action named pending with the Status set to Pending.

    Add the Pending action.

  10. Click the back arrow (Back) to finish.

The Update task now contains two actions that set the entry’s status to denied, then pending. This configuration mirrors the Reject action logic in the out-of-the-box Single Approver workflow. In this process, the denied status serves as a temporary state to signal that the submission is not acceptable, followed by a change to pending so the author can perform the required modifications.

Adding Notifications

You can add notifications to an Update task node to alert the asset creator/assignee that the submission requires modification.

  1. In the Update node’s properties sidebar, click an existing notification or New if none are defined yet.

    Notifications are found in the Properties tab.

  2. Enter Creator Modification Notification for Name.

  3. Select Freemarker from the Template Language drop-down menu.

  4. Enter a message in the Template field (e.g.,Your submission was rejected by ${userName}, please modify and resubmit.).

    See Workflow Notification Template Variables for more information on template variables.

  5. Select Email and User Notification for Notification Types.

  6. Select On Assignment from the Execution Type drop-down menu.

  7. Select who receives the notification (e.g., Asset Creator) from the Recipient Type drop-down menu.

    Notify the creator that the submission was rejected and requires updates.