Low Code

Using Camunda Business Processes

Liferay 7.4+, and all quarterly releases

Liferay’s native workflow features are designed for business processes requiring basic review and approval. If your business process management (BPM) needs are more complex, you can connect Liferay to Camunda. Its advanced automated business processes use the Business Process Model and Notation (BPMN) standard and its decision rules use Decision Model and Notation (DMN).

Build workflows for Liferay in Camunda.

You can use these connector templates from the Camunda Modeler:

NameDescriptionOutbound or
Inbound
Camunda Element
Liferay ConnectorCall Liferay APIs from Camunda tasks.OutboundService Task
Liferay Webhook Connector *Receive events from Liferay’s object webhook actions (e.g., trigger the workflow in Camunda when a form is submitted in Liferay).InboundEvent (varies according to need; see below)
    Start EventUse the webhook payload to start a process without checking for uniqueness.InboundStart Event
    Message StartMake sure the same payload was not already used to start a process, then start one if it’s unique.InboundMessage Start Event
    IntermediateUse the payload to advance an already running process instance.InboundIntermediate Throw/Catch Event
    BoundaryUse the payload while a task is active to either change the workflow path or trigger a parallel path.InboundMessage Boundary Event

Connecting Liferay to Camunda

To connect Liferay to Camunda, install the Liferay connector templates into Camunda Modeler:

  1. Go to https://github.com/liferay/liferay-portal/tree/master/modules/integrations/camunda/element-templates

  2. For each template you want, click Download Raw File.

  3. In Camunda Modeler, open your project and click Create NewUpload File; then select the file you downloaded.

  4. Open the new connector and publish it.

The Liferay connector templates are currently available by manual upload only.

Reviewing Tasks in Liferay

If a process includes a user task, you can manage it from Liferay using the object entry’s Assignee field. With the assignee you can select users and roles. When used with the outbound connector from Camunda, you can use Liferay as the interaction hub from the Camunda process. For example, you can change the assignee in a Camunda process by calling the object’s PATCH API endpoint from the outbound connector. Additional useful features include sending notifications to assignees, adding an Assign to Me button to a data set, and filtering the data set by the assignee. See Assignee Fields for more information.

This example process for an Event object demonstrates using the assignee field:

  1. A webhook is sent when a draft object entry is added in Liferay.

    You can set the assignee from a Camunda process.

  2. A running Camunda instance receives the webhook from Liferay.

    A running Camunda instance receives the webhook.

  3. After processing, the Camunda process forks. Depending on the value of the Type field, a patch API request sets the assignee field to the appropriate role. Meanwhile, Camunda waits for another webhook payload when the entry is updated.

    Set the assignee with a PATCH API call.

  4. The assignee user receives a notification in Liferay and navigates to a pending tasks page.

    You can notify assignees.

  5. The user updates the event entry and publishes it.

    The assignee updates the event and submits it for publication.

  6. Back in Camunda, the entry is patched again, this time setting the status to approved.

    Set the status to approved.

You can set the assignee from a Camunda process.

The Assignee field is at the center of Liferay/Camunda processes that require specific Liferay users to interact with Camunda process tasks.