liferay workflow in action

8
LIFERAY WORKFLOW IN ACTION A White Paper

Upload: chandra-sekhar

Post on 18-Apr-2015

201 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Liferay Workflow in Action

LIFERAY WORKFLOW IN ACTION

A White Paper

Page 2: Liferay Workflow in Action

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 company’s 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. The workflow is

applied out-of-the-box to the following Liferay entities: 1. Wiki Page 2. Web Content 3. Document Library Document 4. Blogs Entry 5. Comments 6. Message Boards Message

Page 3: Liferay Workflow in Action

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.

 

                           send request 

 

                   back to creator for modification 

                   

Content Reviewer

Approved

Published

Rejected

Content creator

 

 

 

 

 

 

 

Process Definitions

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.

              

Page 4: Liferay Workflow in Action

Configure the Environment 

Login as administrator go to Control Panel → Portal → Workflow 

Add our XML definitions here with title “Single Approver” 

        The roles tag in the XML definitions are shown below

             <roles>                     <role>           <role‐type>regular</role‐type>           <name>content‐creator</name>         </role>           <role>           <role‐type>regular</role‐type>           <name>content‐publisher</name>         </role>               </roles>       

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.

Page 5: Liferay Workflow in Action

Next assign our “Single Approver” workflow to the webcontent portlet.

Go to Control Panel →  Workflow Configura on

Assign our newly created “Single Approver” definitions to webcontent.

 

 

 

Creating the Content 

Login as the "Content Writer", go to the control panel‐> webcontent section and create a new web content.

Click "Submit for publication". 

 

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.

 

 

Page 6: Liferay Workflow in Action

Reviewing the content 

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".

 

Page 7: Liferay Workflow in Action

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.

 

 

Page 8: Liferay Workflow in Action

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.