Vous êtes sur la page 1sur 8

LIFERAY WORKFLOW IN ACTION

A White Paper

What is a WorkFlow ? A workflow can be defined as a business process in which information can be passed from one participant to another for action according to a set of procedural rules. The workflow consist of a series of steps and each steps contains tasks where the participant can perform different activites like review, approve, reject, or update an assignement.

Automated workflow is important inside an organization because it ensures maximum throughput and accuracy when distributing work or tasks. It improves the control of a process with less manual intervention, eliminating misplaced work, reducing delays, and ensuring tasks are performed according to your companys policies and procedures. Workflows automate the flow of employee tasks and activities, reducing the time the process took to complete as well as potential errors caused by human interaction.
Liferay Workflow System

Liferay Portal is one of the leading open source portal frameworks.Liferay have the following features

Runs on all major application servers and Servlet containers, databases, and operating systems, and over 700 deployment combinations.
Uses the latest in Java, J2EE, and Web 2.0 technologies. Uses an open SOA framework. JSR-168/JSR-286 compliant. Out of the box usability over 60 portlets. AJAX-enabled user interface. Full LDAP synchronization and secure Single Sign On (SSO) support.

Liferay portal includes a default workflow engined called Kaleo. Kaleo workflow allows to define any

number of simple to complex business processes/workflows by defining everything inside a single


XML file.Liferay 6 also provide integration mechanism with the JBPM workflow engine. applied out-of-the-box to the following Liferay entities: The workflow is

1. 2. 3. 4. 5. 6.

Wiki Page Web Content Document Library Document Blogs Entry Comments Message Boards Message

There are four portlets related to the workflow that allows the users to manage this system. My Submissions My Workflow Tasks Workflow Configuration Workflow Portlet.

How to Implement a Simple Workflow In this example I create two user a content creator who will create content and a content publisher who will publish the content. Content creator
Process Definitions send request

Content Reviewer

backtocreatorformodification

Approved

Rejected

Published

Each workflow definitions is defined by a single XML file.The XML file has several parts which define the workflow. The key parts of the workflow definition are the asset, states, transitions, and tasks. The asset is whatever piece of content is being reviewed and approved in the workflow. States represent stages of the workflow; for example: created, rejected, or approved. Transitions occur between states, and indicate what the next state should be. Tasks are steps in the workflow that require user action.

ConfiguretheEnvironment Login as administrator go toControlPanelPortalWorkow

Add our XML definitions here with titleSingleApprover


The roles tag in the XML definitions are shown below


<roles> <role> </role> <role> </role> </roles>

<roletype>regular</roletype> <name>contentcreator</name> <roletype>regular</roletype> <name>contentpublisher</name>

Once we added the XML definitions two roles content-creator and content-publisher are automatically created by liferay. Assign these roles to our newly created user.

Next assign our Single Approver workflow to the webcontent portlet.

Go to ControlPanelWorkowCongura on Assign our newly created SingleApprover definitions to webcontent.

CreatingtheContent Login as the"ContentWriter",go to thecontrolpanel>webcontentsection and create a new web content. Click "Submitforpublication".

In this moment, the workflow engine starts. The user can see that the content status is "pending" and he can't modify the content till it's reviewed.

Reviewingthecontent Login as the Content Reviewer, go to the Control Panel My Workflow Tasks . In the "Assigned to my
roles" view, you'd see the pending tasks and you can assign the task to another user or yourself.

In the detail view of the task, you can view and edit the content, read the recent activity of the task, view the status and change its status.In this moment, there are two possibilities: a) The reviewer rejects the content: he writes the reason in a popup and the content goes back to the writer, so that he can edit/fix/improve it b) The reviewer approves the content: he (maybe after editing the content so that it fits the portal's rules) approve the content and the content's status is updated to "approved".

Once he approves the content we can show it using the webcontent display portlet. Benefits: Ability to define simple to complex level of work flow by defining everything inside the XML process definition and without writing single line of code. In addition to the default workflow engine Kaleo, it also support the integration with JBPM workflow engine. Automatic role creation when the workflow definition deployed. Ability to enable workflow for six out of box portlets Wiki Page, Web Content, Document Library ,Blogs Entry, Comments, Message Boards and also extends the functionality to custom portlets by coding. Notification : - As the Workflow advances the assigned users are automatically notified using the corporate email system. Due date :- Due date management functions allow due dates to be set for the entire workflow, as well as for each step in a workflow. Activities & Comments :- Ability to view each participant activities and adding comments on each steps.

Summary: Liferay Portal allows to incorporate workflow into six out of box portlets and custom portlets by leveraging the liferay workflow APIs. This provide administrator an easy way to assign workflow, save development team a lot of effort by extending the workflow API, and provide seameless intergration with all supported workflow engines.