kaleo workflow in liferay
TRANSCRIPT
Slide 1
Kaleo Workflow and Liferay portal
Overview and lessons learnt
Willem Vermeer
Worth IT Den Haag
Kaleo Workflow
allows a user to define any number of simple to complex business processes/workflows, deploy them, and manage them through a portal interface. The processes have knowledge of users, groups and roles. You dont have to write a single line of code to accomplish this: all you have to do is create a single XML document.
Terminology
A workflow
- is executed by an asynchronous engine
- can be applied to Liferay Assets (including your own)
- consists of states, tasks, transitions, actions and notifications
Insert User Group Logo (please resize)
Task assignation
A task can be assigned to- a certain user
- a role
Important: only user with assigned task can transition it to the next task or state
Insert User Group Logo (please resize)
Example
Insert User Group Logo (please resize)
startsubmitreviewaccepted
submitaccept
reject
userreviewerstatetasktransition
role
Workflow in action
Insert User Group Logo (please resize)
demo
Workflow Definition
Liferay EE has a graphical editor to create/modify workflows
Liferay CE has XML
Insert User Group Logo (please resize)
Workflow definition part 1
LNLUG Demo
Two role, two tasks workflow example
1
created
true
submit
submit
Insert User Group Logo (please resize)
Workflow definition part 2
submit
submit
Packages.com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil.updateStatus(Packages.com.liferay.portal.kernel.workflow.WorkflowConstants.toStatus("pending"), workflowContext);
]]>
javascript
onAssignment
submit
review
Insert User Group Logo (please resize)
Workflow definition part 3
review
Review Notification
You have a new submission waiting for your review in the workflow.
text
onAssignment
regular
Application Reviewer
approve
approved
reject
submit
false
Insert User Group Logo (please resize)
Workflow definition part 4
approved
approve
Packages.com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil.updateStatus(Packages.com.liferay.portal.kernel.workflow.WorkflowConstants.toStatus("approved"), workflowContext);
]]>
javascript
onEntry
Insert User Group Logo (please resize)
How to apply a workflow to a custom asset
Insert User Group Logo (please resize)
Workflow engineYour portlet app
WorkflowHandler
Workflow handler
public abstract interface WorkflowHandler {
public abstract java.lang.String getTitle(long assetId, Locale locale);
public abstract java.lang.Object updateStatus(int status, Map workflowContext) throws PortalException, SystemException;
// more...}Insert User Group Logo (please resize)
Demo app
CreateApplication portlet to make and submit an application
ListApplication portlet to display overview of applications
Uses control panel for task transitions
Insert User Group Logo (please resize)
demo
Things to like about Kaleo workflow
Nice, deep integration with Liferay (users, roles)
Control panel access to workflow tasks
Simplicity
Insert User Group Logo (please resize)
Room for improvement
Extensibility
- limited to scripting in workflow definition
Flexibility
- can't change definition once a workflow has started
Thread safety
- workflow engine is 100% thread UNsafe
Error recovery
- What's wrong with my XML?
Insert User Group Logo (please resize)
Questions?
Insert User Group Logo (please resize)
@willemvermeer
03/25/13
03/25/13
WWW.LIFERAY.COM
WWW.FACEBOOK.COOM/LIFERAY
@LIFERAY
03/25/13
03/25/13
WWW.LIFERAY.COM
WWW.FACEBOOK.COOM/LIFERAY
@LIFERAY
03/25/13
WWW.LIFERAY.COM
WWW.FACEBOOK.COOM/LIFERAY
@LIFERAY
03/25/13
WWW.LIFERAY.COM
WWW.FACEBOOK.COOM/LIFERAY
@LIFERAY
03/25/13
WWW.LIFERAY.COM
WWW.FACEBOOK.COOM/LIFERAY
@LIFERAY
03/25/13
WWW.LIFERAY.COM
WWW.FACEBOOK.COOM/LIFERAY
@LIFERAY
03/25/13
WWW.LIFERAY.COM
WWW.FACEBOOK.COOM/LIFERAY
@LIFERAY
03/25/13
WWW.LIFERAY.COM
WWW.FACEBOOK.COOM/LIFERAY
@LIFERAY
03/25/13
WWW.LIFERAY.COM
WWW.FACEBOOK.COOM/LIFERAY
@LIFERAY
03/25/13
WWW.LIFERAY.COM
WWW.FACEBOOK.COOM/LIFERAY
@LIFERAY
03/25/13
WWW.LIFERAY.COM
WWW.FACEBOOK.COOM/LIFERAY
@LIFERAY
03/25/13
WWW.LIFERAY.COM
WWW.FACEBOOK.COOM/LIFERAY
@LIFERAY
03/25/13
WWW.LIFERAY.COM
WWW.FACEBOOK.COOM/LIFERAY
@LIFERAY
03/25/13