Working with Kaleo Workflow in Liferay

Liferay portal used Kaleo workflow implementation to run their application through workflow management. Out of box Liferay support other workflow implementations which follows the JBPM notation.

Please follow previous post for basic understand about workflow management.


Enable Workflow in Liferay

Liferay by default workflow support to some assets like Web Content, Blogs, Wikis, User and Massage Boards apart from these we can also implement workflow to custom assets.
We will take web content as example for enable Kaleo workflow. We have different levels of workflow for now we will enable single approval workflow.

Step: 1

First we need to check whether Kaleo workflow available in Liferay portal or not. From Liferay 6.2 onwards Liferay Server Portal Bundle already deployed Kaleo-web workflow implementation web application so that we don’t need to deploy again.

If not deployed then download kaleo-web web application from Liferay market place and deploy into your portal server.

We have two types of licenced Liferay i.e.  Liferay CE and Liferay EE based on your portal download Kaleo-web from market place and also make sure your portal version.


Note:

I have written post based on Liferay 6.2 Version before version may have different UI and option to enable and work with workflow.

Checking Kaleo Workflow Available in Portal

Login as portal administrator in the Liferay Portal


Go to Control Panel


Configuration Section you can see workflow Feature. If not then look at what is problem while deploy Kaleo-web.


Details about Single Approval Workflow for Web content.

Asset Type:
Web Content
Workflow Definition
Single Approval Workflow

Kaleo Engine by default have single approval workflow definition so that we can directly use it. If you want new workflow then we need to create workflow definition and upload into Kaleo Workflow Engine so that it can be available. Now we will enable single approval workflow.

Concept in single level approval for web content is there is user i.e. content creatorwill create content and sent to review the content. Once reviewer review the content then he/she can approve or reject the content. If it approved then only Web content available for use otherwise it will be in draft mode.

Single Approval workflow is working based on roles so that in the definition specified roles will be create by workflow engine if roles not available.

As for single approval workflow we have new roles already available as follows.

Role
Description
Organization Content Reviewer
This role user review the web content published in the organization and   he/she can approve or reject content.
Site Content Reviewer
This role user review the web content published in the site and   he/she can approve or reject content

Behaviour of Web content without Workflow.

If the web content not have workflow then as soon as you create the content and you can publish content directly and it will be available for use.

Behaviour of Web content after enable Workflow

Once we enable workflow to web content then content creator cannot publish directly rather then he/she can send it for content reviewer who having the role of Site Content Reviewer/Organization Content Reviewer.

Step: 2

Now we will create new user for content review and we will assign role of Site Content review.

Site
Liferay/Global
User
Sitecontent_reviewer@liferay.com
Role
Site Content Reviewer
Task
Review the web content.

Go to control panel and click on users and organization link



Click on Add new User




Enter all required details and click on save then user will be created



Once save the use then Right side you can see many option, click on  password section give some password to user let’s say test and you should remember password for next login and save it.


Now assign this user to Liferay/Global Site. Click on sites then it will ask you to select the site from list of sites.



Select Liferay and save it now user is associated to Liferay Site.



Now assign site Roles to user. Click on role link and select site role that is Site Content Reviewer role.



Once you select the role click on save so that Site Content Reviewer Role is assigned to the user.




Step: 3

Enable Single Approval Workflow to Web Content

Login as Portal Admin and go to control panel and click on workflow



You can see 3 tabs Definitions, Default Configuration and Submissions


Definition Tab:

Definition tab will shows you what are the definitions are available in the workflow engine.


We can also upload new definition xml file through upload definition link and it will ask you to browse new xml definition file.


Default Configuration Tab:

Default Configuration tab will shows you the assets which can be configured by workflow. Click on Default Configuration tab you can see all assets.



Now select web content and in the workflow dropdown you can see list of workflow definition there you can select Single Approval Workflow and save it.


Now web content is enabled by singe level workflow and if we submit any web content it should be reviewed.

Submission Tab

Submission tab shows list of tasks the user submitted through workflow process. Here you can see two sub tabs pending and completed

Pending

Till workflow process is completed then it will be under pending state list.

Completed

if task completed entire workflow means task is approved then it will be part of completed list.

Pending Sub Tab:


Completed Sub Tab:

Remind Previous Steps

Step: 1 we have cheeked workflow is available in the portal or not it not then how to download and deploy

Step: 2 we have created user and assigned site and required role which is part of workflow definition.

Step: 3 we have enabled workflow to web content and we also have looked into options available in workflow.

Step: 4

Now we will create web content and sent it for review and here we will use portal administrator to create content.

Login as Portal Admin and In the Site Administrator click on Content so that he/she can navigate to dash board there he/she can create web content.


Click on web content so that it will launch web content creation page.



Click on Add Basic Web content so that you can see CKEditor to design you web content


Provide your desired title and design your content finally click on Submit for Publication so that content will be created and it will be enable by workflow and sent to for approval. If approved then only it will be available for use.


Note:

If workflow not enable then you can see button “publish” so that it’s directly available for use.

After Click on send it for publication web content will be created and it will show the status pending



Now go to workflow option see the submission tab then you see newly created web content is under pending list because still content not approved.

Workflow engine also send notification when content is created that you see in the docbar notification and this notification.



Step: 5

Now we will login as content reviewer we already created new user in the step: 2
Site
Liferay/Global
User
Password
test
Role
Site Content Reviewer
Task
Review the web content.

Login as content reviewer



First login it will ask to accept terms and condition then it will ask to change password. Please do all steps finally it will be login into Liferay site.


When the user in the workflow process he/she will be notified with task notification that you can see in the docbar notification



To see workflow tasks go to user My Account page there you can see My Workflow Tasks Tab


My workflow tasks it will be appeared in the pending task list because still he did not do any action the task



Here we can see two sections

Assigned to Me

When workflow task defection based Users assignment then task will be comes under Assigned to Me List.

Assigned to My Role

When workflow task defection based on roles assignment then task will be comes under Assigned to Me List.

Now our workflow definition is based on roles that is why task comes under Assigned to my Rile list.

When task under Assigned My Role then we need to first assign the task to yourself or we can also assign to other user.

Now click on Action you can see tow actions Assign to Me and Assign to..



For now the user is responsible to review the content so we will use Assigned to Me action. As soon as you clicked on assigned to me then task is moved to Assigned to me section and before it ask some comment dialog and give some comments and click on ok.



Now task moved to Assigned to me section now he/she can review the task based on that he/she can Approve/reject the task


Click on the task so that he/she cans see full details of the task and also see the web content.


Actions:

Approve

After review the content everything fine then user can click on Approve Action so that task will be completed and it will be available udder completed list and content will be published then we can use the web content article where ever we need.


Reject

After review content need to add some more addition things then reject content then content will not publish and it will be under draft mode.


Assign to..

Here if the user want to delegate task to some one else then he can click on Assign to then it will ask you the select user to assign this task.


Update Due Date

Some time each workflow task have certain time to review if you want update due date then we can perform due date action so that we can update date for task.



Note:

For each action it will open popup/dialog will ask you the comments so that it will be used as notification and history for each action.

Assume content is everything is fine now reviewer approved the content. Once approved the content then it will be published and it will be available for use.



Once task is approved no more action will be available



Finally task was moved to completed task list of the user.


Once workflow task action is performed he/she will be notified with massage in the docbar notification about workflow task.


Click on completed task list in My Workflow task in the task details you can see Activity panel there you can see history of workflow task.



Now task was approved by content reviewer and it will be available for use.

Now login as Portal Admin go to site administration then click on content, now you can see the web content list. Before we have pending option for newly created web content but this time it won’t be visible because content already approved.



Now go to control panel and click on workflow now task will be in the completed submission list because task is completed.





Share on Google Plus

About Meera Prince

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment