Content Publishing Workflow configuration in Liferay

By Tennyson Varghese on June 26, 2010

Liferay Portal is an enterprise web platform for building business solutions that deliver immediate results and long-term value. Liferay 6 is capable of integrating many workflow engines like jBPM , Kaleo etc. The workflow can be used for different assets or Liferay built-in controls like Web content, Blog, Forums, Document library, Image gallery, Wiki, Comment etc. This will help users with different roles in an organization to create, edit, review, approve and publish the content, seamlessly.

How to install workflow engine in Liferay?

Installation of workflow engine in Liferay 6 is pretty straight forward. Let’s have a look at the installation of Kaleo workflow engine. The precondition is, Liferay 6.0.2 should be installed in the machine and general awareness of a portal solution or even better, Liferay portal.

Download liferay 6.0.2 from http://sourceforge.net/projects/lportal/. Liferay comes with various appserver and web container bundles (Tomcat, Jetty, Resin etc.).

Download liferay-portal-tomcat-6.0.2.zip which is the bundle of Liferay and Tomcat. Run the Liferay portal by executing startup file in $PORTAL_HOME/tomcat/bin. ($PORTAL_HOME is the extracted or installation directory).

The next step is to deploy the Kaleo workflow engine.

For this, download Kaleo from http://liferay.cignex.com/palm_tree/book/0387/chapter09/kaleo-web-6.0.2.1.war . Put the war file in $PORTAL_HOME/deploy and this will hot deploy the workflow engine. Liferay portal is now workflow enabled.

How to configure workflow engine?

The Workflow Definitions section under Control Panel | Portal allows you to add/edit workflow definitions (Note: make sure that you have proper privileges for configuring workflows). A sample workflow definition file named single-approver-definition.xml can be found under $PORTAL_HOME/tomcat-6.0.26/webapps/kaleo-web/WEB-INF/classes/META-INF/definitions directory.
This example will demonstrate how workflow works with the built-in Liferay Web Content asset in a typical organization.
For Kaleo workflow demonstration, please login as an admin user.

Create an organization named pitsolutions. Add sample page called “welcome” for this organization.

Create a role named Organization Content Creator and give proper permission for managing webcontent for this role.

Create the following users and assign the roles mentioned below.

1)    Screen Name  – tom
User Name – Tom Creator
Roles – Power User, Organization Content Creator

2)    Screen name –  james
User Name – James Reviewer
Roles – Power User, Organization Content Reviewer

3)    Screen name –  steve
User Name – Steve Admin
Roles – Power User, Administrator

Assign the above users to the organization, in this case PIT Solutions. Next is to configure workflow for web content. For this, log in as Steve Admin and go to PIT Solutions public page (http://localhost:8O8O/web/pitsolutions)

Figure1

Figure 1

Then go to Manage| Control Panel| Portal| Workflow Configuration. Select Single Approver definition for Web Content resource and save.

Figure 2

Figure 2

Now you can submit the article for checking the workflow.  Log in as Tom Creator; go to PIT Solutions public page and select Control Panel.  You can create a test Web Content and publish the test article.  The article created shows the status as “Pending” as in (Figure 3).

Figure 3

Figure 3

As per the workflow definition, the content created is now ready for the review process.
Review the content by logging in as James Reviewer.  Go to PIT Solutions public page | Control Panel| My Workflow Tasks. Now you can see article(s) in section ‘Assigned to My Roles’. A reviewer can review the article by assigning the article to himself.

Figure 4

Figure 4

A reviewer can approve or reject the article with his comments. The approved article is ready to be published in the website and the rejected article will go to the content creator basket for editing and re-submission.

Figure 5Figure 5

The above example is based on simple workflow definition with single approval definition. You can create complex definitions that can be applied for others assets.

Conclusion

The process of integration of workflow engine is simple in Liferay 6. Like Kaleo integration, other workflow engines like jBPM can be integrated.  The other significant aspect is that the workflow related tasks are placed centrally under Control Panel and are only visible to people with corresponding rights for Workflow Configuration, Workflow Definition and Workflow Tasks.

2 responses to “Content Publishing Workflow configuration in Liferay”

Leave a Reply

Contact us!
SCROLL TO TOP