Managing Workflows

With the workflow framework, Users manage asset publication in custom-built workflow processes. Users with permission to access workflow process definitions in the Control Panel can upload new workflow definitions, edit existing definitions, and delete definitions for processes no longer in use.

Workflow Definition Publication Permissions

Important

As of DXP 2024.Q3, scripting is disabled by default. You can enable it in System Settings → Script Management (under the Security category).

Users with permission to edit or publish workflow definitions can add Groovy scripts to the workflow. Access to the scripting engine means access to the server’s Java Virtual Machine (JVM). Users with permission to publish (or edit) can therefore access any data within the reach of the JVM, such as data contained in a separate Virtual Instance of Liferay DXP.

Because of this far-reaching access, permission to create or edit workflow definitions is limited to Regular Administrators of the Default Virtual Instance. For Liferay DXP customers, Users (e.g., Site Administrators) can also edit and publish workflows with their access to the Kaleo Designer and Kaleo Forms Admin applications.

To grant Users with these Roles the workflow publication access in additional Virtual Instances,

  1. Make sure you understand the access you’re granting these administrators.
  2. Navigate to Control Panel → System Settings → Workflow → Workflow Definition.
  3. Check the box for the setting Allow Administrators to Publish and Edit Workflows.

Explicit permission must be granted before administrators are allowed to publish and edit workflow definitions.

This only applies to Virtual Instances that have been added to the system. The Default Virtual Instance provides out of the box workflow publication access to Regular Administrators, via Control Panel → Workflow → Process Builder and for Liferay DXP subscribers via the Kaleo Forms Admin application.

Uploading a New Workflow Definition

Workflow process definitions can be built in Liferay or uploaded in XML format. DXP workflow definitions are written in XML format; see the Introduction to Crafting XML Workflow Definitions to learn more.

To upload a new definition:

  1. Navigate to the Control PanelWorkflowProcess Builder.

  2. Click the New Workflow button (Add).

  3. If you have a local XML definition file based on an embedded workflow, you can upload it to DXP. Click the Source tab.

  4. Enter a name for the new definition.

  5. Copy the content of the XML file and and overwrite the sample code or click “import a file” to upload the file.

    Adding a new definition by uploading one

  6. Click the Save button.

  7. Click the Publish button.

The newly added definition is ready to be used as a workflow process.

Task Assignee Notifications and Site Membership

Liferay DXP 2024.Q3+/Portal 7.4 GA125+

When workflow tasks are assigned to site roles and assignees are notified, role users in parent sites are notified along with child site role users. In some situations, this can lead to parent site members receiving notifications for workflow tasks they cannot resolve, because they are not members of the child site. You can make notifications follow Liferay’s site permission inheritance and only notify site roles with explicit access to the content and site in question:

  1. Navigate to Control Panel → System Settings → Workflow → Workflow Definition.

  2. Check the box for the setting Notifications must honor site membership rules.

You can make workflow notifications follow site membership rules.

Editing a Workflow Definition

  1. Navigate to the Control PanelWorkflowProcess Builder.

  2. Click the Actions button (Actions) for the workflow then Edit.

    Editing a definition

Changes to Workflow Definitions are tracked in the Details and Revision History menus.

Viewing and Restoring Workflow Revisions

To view the workflow definition details and the revision history:

  1. Click the Information button (Information)

  2. Next to a previous version on the Revision History tab, click the Actions button (Actions) and select either Preview or Restore.

    View and restore prior versions of a workflow.

  3. When you click Restore and see the success message, the prior version is the current version of the workflow. You can now edit the restored version of the workflow.

  4. If edits are necessary, edit and click Update. This creates another version of the workflow.

Deleting a Workflow Definition

There are two statuses for a workflow:

  • Published: Validation is complete, and the workflow can be assigned to assets.
  • Unpublished: Validation is not performed on the unpublished workflow, and it cannot be assigned to assets until it is published.

Only Unpublished workflows can be deleted.

Published workflow definitions cannot be deleted if they are current associated with an asset type. Users have to first deactivate the workflow process and then place the workflow in the Unpublished status.

  1. To deactivate an asset type’s workflow, reverse the steps found in the Activating Workflow article for each asset type and select No Workflow.

  2. Navigate to the Control PanelWorkflowProcess Builder.

  3. Click the Actions button (Actions) for the workflow then Unpublish.

    Unpublishing a Workflow

  4. The selected definition is now in the Unpublished section. Click the Actions button (Actions) for the workflow then Delete.

    Deleting a Workflow

Capabilities

Product

Contact Us

Connect

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