In this article I’ll explain about Worfklow in Liferay. In this part we will learn how to use workflow using Activiti Business Process Management in Liferay. Before this, I would like to introduce the environment which I used.
- Liferay Portal 6.2 CE ga3 bundle Tomcat
- Activity Core (Engine) : This will help us to apply workflow on any Business Process. (download here)
- Activity Explorer : This is drag and drop UI Workflow Designer. (download here)
Point 1 : About Kaleo and Activity
as default Kaleo has installed in Liferay bundling, Kaleo is also great to perform workflow business process management in liferay, but the main problem is Kaleo workflow designer doesn’t free. To check Kaleo is enabled in your liferay system you can login as superadmin then go to Admin -> Control Panel.
Figure 1.1 Kaleo is installed as default workflow
In this tutorial we will used Activiti Workflow, so uninstall Kaleo first. You can recheck Control Panel page to ensure Kaleo has successfully uninstalled in your Liferay System (Configuration -> Workflow will be disappear). Okay it’s time to installing Activity Workflow Engine & Activity Explorer. You can deploy activiti-web-184.108.40.206.war and activiti-explorer.war by place the war file into auto deploy directory (I assume you’ve basic knowledge about Liferay, so I don’t need to describe what is auto deploy directory in liferay). If deployment was successfully, you can go to Admin -> Control Panel (again) and see Configuration -> Workflow will appear (again).
Point 2 : Using Workflow
Download sample workflow here , I will explain how to create workflow process with activity explorer in next post (Insya Allah). After download sample workflow file, please upload workflow definition by go to Admin -> Control Panel -> Configuration -> Workflow -> Upload Definition.
Figure 1.2 Upload Workflow Definition
Fill up title and browse the xml workflow definition then click Save Button
Figure 1.3 Fill Up Title and Browse file
Your process definition will display in table grid
Figure 1.4 Workflow Definition has uploaded
Switch to Default Configuration tab and assign process definition to resources of your choice (Blog Entry for sample) and click Save button.
Figure 1.5 Assign Workflow to Resource (Portlet)
Point 3 : Trying Workflow Process
The last point in this post we will try to Add a Blog Entry and then we will see how the workflow is worked.
Add new blog post
Figure 1.6 Add New Blog Post
Fill up form Blog and click Submit for Publication
Figure 1.7 Fill Up Blog Post
Go to My Account ( Your Account Name at dockbar -> My Account) -> My Workflow Tasks
Figure 1.8 My Workflow Tasks
Click Action -> Assign to Me and fill up comment and click OK
Figure 1.9 Assign to Me
Task will move to Assign to Me, Click Action -> Approve
Figure 1.10 Approve Content
Figure 1.11 Give Comment
Sign Out and goto Blog Page, Content has published
Figure 1.12 Content has Published