Liferay DXP Kaleo Workflow configuration
In this tutorial, we will see how to enable workflow for custom entity in the control panel. Liferay allows developers to load the workflow definition file via control panel and enable workflow with custom entity.
Installations:
- Liferay DXP
- Liferay Portal 7
Prerequisite:
- Entity must be configured with Asset Renderer configuration
- Entity should be registered with workflow handler to update the status
- Entity should be configured with workflow columns
- Design workflow definition using Kaleo workflow designer tool. For now, we will use Liferay Out of the box workflow definition already loaded into system i.e Single Workflow Definition
- In Liferay DXP you can find Single Workflow Definition in : “modules/app/forms-and-workflow/portal-workflow-kaleo-runtime-impl/src/main/resources/META-INF/definitions”
- In Liferay 6 : liferay-portal-6.2-ce-ga6\tomcat-7.0.62\webapps\kaleo-web\WEB-INF\src\META-INF\definitions
High Level Steps:
- Design the workflow definition. In this case we will use the existing “single-approver-definition” file
- If you want to use custom workflow then upload in the control panel.
- In this tutorial, We will use the preloaded workflow definition : Single Approver
- Next step, We will enable to Single Workflow Definition with Leave Custom Entity.
- Custom Entity should follow above mentioned prerequisites to access the custom entity in workflow configuration window.
- Navigate to Workflow Configuration under Control Panel -> Configuration .
- In this case,modal.resource.org.javasavvy.leave.model.Leave entity is visible in Workflow Configuration screen since Leave Entity is already configured with Asset Renderer Factory. Don’t worry about lengthy name, you just need to add the key in language properties to get the proper display name
- Click on Actions -> Edit and then you will get below screen. Select “Single Approver” from the drop down and click on save
- Now you can see that Leave entity is mapped with Single Approver Workflow Definition.
One thought on “Liferay DXP Kaleo Workflow configuration”
Comments are closed.
Hi ,
I would like know how to configure the workflow for Custom Entity instead of control panel