The ancient Greeks were pretty important, so we decided to name Liferay’s workflow engine Kaleo. In Greek, Kaleo means “called ones,” which is appropriate for a workflow engine that calls users to participate in a review process designed for them. Kaleo workflow allows a user to define any number of simple to complex business processes/workflows, deploy them, and manage them through a portal interface. The processes have knowledge of users, groups and roles. You don’t have to write a single line of code to accomplish this: all you have to do is create one XML document.
There are several aspects to workflow that you need to understand:
-
Enabling workflow
-
Designing review processes
-
Uploading workflow definitions
-
Configuring assets to use workflows
-
Using workflow with other applications
After all that, you should be familiar with how to use Liferay’s Kaleo workflow to set up approval process for any kind of content before it is published to your portal.
Embedded Workflows
In addition to the Single Approver definition, there are some workflow
definitions that ship with Liferay but are not pre-installed, since they’re
primarily included for test cases. They can be found in the Liferay source code
in
modules/aps/forms-and-workflow/portal-workflow/portal-workflow-kaleo-runtime-impl/src/main/resources/META-INF/definitions
,
or in your Liferay installation itself. Open your Liferay installation’s
osgi/marketplace/Liferay CE Forms and Workflow.lpkg
, and then find and open
the com.liferay.workflow.kaleo.runtime.impl-[version].jar
. The definitions are
in the META-INF/definitions
folder (see the diagrams
here).
Once you have the XML definition files locally, upload them into Liferay:
-
Navigate to Control Panel → Configuration → Workflow Definition.
-
Click the Add button ().
-
Give the workflow a descriptive title, then click Select File and find the XML file. Once uploaded it appears in the list of definitions.
Alternatively, you can look at the pre-existing definitions to get ideas while designing and building your own definition.
Workflow Assignees Have Implicit Asset Permissions
Users with permission to execute a workflow task (e.g., Users with the Portal Content Reviewer Role) have full resource action permissions over the assets they can review. These permissions apply in the My Workflow Tasks widget in the User’s personal page and anywhere else actions on the Asset can be performed.
For example, consider a User with two permissions:
- The Portal Content Reviewer Role enables Users to review workflow submissions and grants edit and delete permissions on the content they’re reviewing.
- Users also have permission to view Web Content Articles in the Site’s Content section.
Neither permission explicitly grants the User management permissions on Web Content Articles. Users cannot normally edit or delete a Web Content Article, for example. However, if a Web Content Article is sent to the workflow, Users can access the Web Content Article for review (in their Assigned to Me or Assigned to my Roles section of My Workflow Tasks), and they can edit or delete the content while reviewing it in the workflow. While it’s in the status Pending, they can also edit or delete the article from Site Administration → Content → Web Content because of their implicit permissions granted by the workflow system. This additional permission is temporary, and the normal resource permissions are activated once the Web Content Article exits the workflow process (for example, it’s rejected or approved).