Forums de discussion
Kaleo Workflow
Kathryn Brewer, modifié il y a 9 années.
Kaleo Workflow
New Member Publications: 2 Date d'inscription: 09/01/14 Publications récentes
Does anyone have good documentation on the Kaleo Designer and workflow within Liferay? The Liferay documentation is pretty light, and I need to develop something for our client to manage the notifications better.
Patrick Wolf, modifié il y a 9 années.
RE: Kaleo Workflow
Regular Member Publications: 127 Date d'inscription: 15/09/10 Publications récentes
Jayaram pokuri, modifié il y a 9 années.
RE: Kaleo Workflow
New Member Publications: 22 Date d'inscription: 03/07/13 Publications récentes
Hi Kathryn,
Liferay doesn't have proper documentation for Kaleo workflow. In one of my projects, I designed workflow with notifications, task timers. Please see the below sample code for task node that contains actions, notification,tasktimer, tasktimernotifications and assignments, you can understands task node terminology while designing workflow.
Refer this link also : https://github.com/liferay/liferay-plugins/blob/master/webs/kaleo-web/docroot/WEB-INF/src/META-INF/definitions/category-specific-definition.xml
Thanks,
Jayaram
Liferay doesn't have proper documentation for Kaleo workflow. In one of my projects, I designed workflow with notifications, task timers. Please see the below sample code for task node that contains actions, notification,tasktimer, tasktimernotifications and assignments, you can understands task node terminology while designing workflow.
Refer this link also : https://github.com/liferay/liferay-plugins/blob/master/webs/kaleo-web/docroot/WEB-INF/src/META-INF/definitions/category-specific-definition.xml
<task>
<name>ItemReview</name>
<metadata>{"transitions":{"NotPlanned":{"bendpoints":[]},"CurrentlyPlanned":{"bendpoints":[]},"UnderReview":{"bendpoints":[]},"Delivered":{"bendpoints":[]}},"xy":[380,275]}</metadata>
<actions>
<notification>
<name>NewItemCreated</name>
<description>New Item Submission</description> // Notification email header, which is static
<template>
<#assign url = serviceContext.portalURL>
[b]<#assign communityName =serviceContext.getAttribute("communityName")>
<#assign title = serviceContext.getAttribute("title")> <
<#assign entryURL = serviceContext.getAttribute("entryURL")>[/b]
<!--communityName, title and entryURL are custom variable, which I injected into the serviceContext/workflowContext. so that we can access these variables in kaleo workflow-->
<#assign layoutURL = serviceContext.layoutURL>
<#assign classPK = serviceContext.getAttribute("entryId")>
<#assign groupId = serviceContext.getAttribute("group")>
<#assign userId = serviceContext.getAttribute("user")>
<p> Dear Administrator,<br/><br/>
<p>A new Item has been created in the community "<strong>${communityName}</strong>" and is now pending review. <br/><br/><br/>
Title = "${title}" <br/> <br/>
Please <a href="${entryURL}">Click</a> here to view the Item.
<br/><br/>
** Please be sure to update the Status in a timely manner for our customers.
<br/><br/>
Thank you,<br/><br/>
</p>
</template>
<template-language>freemarker</template-language>
<notification-type>email</notification-type>
<execution-type>onEntry</execution-type>
</notification>
</actions>
<assignments>
<roles>
<role>
<role-type>site</role-type>
<name>Site Administrator</name>
</role>
</roles>
</assignments>
<task-timers>
<task-timer>
<name>TimerNewStatus</name>
<description>if flow with new status is 60 days then send a notification</description>
<delay>
<duration>60</duration>
<scale>day</scale>
</delay>
<blocking>true</blocking>
<timer-actions>
<timer-notification>
<name>Item is waiting for review from 60days</name>
<description>Item approval Reminder</description>
<template>
<#assign url = serviceContext.portalURL>
<#assign communityName =serviceContext.getAttribute("communityName")>
<#assign title = serviceContext.getAttribute("title")>
<#assign entryURL = serviceContext.getAttribute("entryURL")>
<#assign layoutURL = serviceContext.layoutURL>
<#assign classPK = serviceContext.getAttribute("entryId")>
<#assign groupId = serviceContext.getAttribute("group")>
<#assign userId = serviceContext.getAttribute("user")>
<p>Dear Administrator,<br/><br/>
<u>Community:</u> ${communityName} <br/>
<u> Title:</u> ${title}<br/></p>
<p>A new Item with status "New" has been waiting for approval from 60 days. Please review it and update the status.
<br/> Please <a href="${entryURL}">Click</a> here to see the Item.
<br/><br/>
Thank you,<br/><br/>
</p>
</template>
<template-language>freemarker</template-language>
<notification-type>email</notification-type>
</timer-notification>
</timer-actions>
</task-timer>
</task-timers>
</task>
Thanks,
Jayaram