Forums de discussion

Kaleo Workflow

thumbnail
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.
thumbnail
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
Did you look at this documentation page?
thumbnail
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

<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>
					
						&lt;#assign url = serviceContext.portalURL&gt;
						[b]&lt;#assign communityName =serviceContext.getAttribute("communityName")&gt; 
						&lt;#assign title = serviceContext.getAttribute("title")&gt;	&lt;
						&lt;#assign entryURL = serviceContext.getAttribute("entryURL")&gt;[/b] 
						&lt;!--communityName, title and entryURL are custom variable, which I injected into the serviceContext/workflowContext. so that we can access these 		variables in kaleo workflow--&gt;
						&lt;#assign layoutURL = serviceContext.layoutURL&gt;
						&lt;#assign classPK = serviceContext.getAttribute("entryId")&gt;
						&lt;#assign groupId = serviceContext.getAttribute("group")&gt;
						&lt;#assign userId = serviceContext.getAttribute("user")&gt;
						 &lt;p&gt; Dear  Administrator,&lt;br/&gt;&lt;br/&gt;
							&lt;p&gt;A new Item has been created in the community "&lt;strong&gt;${communityName}&lt;/strong&gt;" and is now pending review. &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
							  Title = "${title}" &lt;br/&gt; &lt;br/&gt;
					 		Please &lt;a href="${entryURL}"&gt;Click&lt;/a&gt; here to view the Item.
							&lt;br/&gt;&lt;br/&gt; 
							** Please be sure to update the  Status in a timely manner for our customers. 
							&lt;br/&gt;&lt;br/&gt;
							Thank you,&lt;br/&gt;&lt;br/&gt;
							
						&lt;/p&gt;
						
				</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>
							
						&lt;#assign url = serviceContext.portalURL&gt;
						&lt;#assign communityName =serviceContext.getAttribute("communityName")&gt;
						&lt;#assign title = serviceContext.getAttribute("title")&gt;
						&lt;#assign entryURL = serviceContext.getAttribute("entryURL")&gt;
						&lt;#assign layoutURL = serviceContext.layoutURL&gt;
						&lt;#assign classPK = serviceContext.getAttribute("entryId")&gt;
						&lt;#assign groupId = serviceContext.getAttribute("group")&gt;
						&lt;#assign userId = serviceContext.getAttribute("user")&gt;
						
						  &lt;p&gt;Dear  Administrator,&lt;br/&gt;&lt;br/&gt;
						  	&lt;u&gt;Community:&lt;/u&gt; ${communityName} &lt;br/&gt;
						    &lt;u&gt; Title:&lt;/u&gt;  ${title}&lt;br/&gt;&lt;/p&gt;
						  	&lt;p&gt;A new Item with status "New" has been waiting for approval from 60 days. Please review it and update the status.  
							&lt;br/&gt; Please &lt;a href="${entryURL}"&gt;Click&lt;/a&gt; here to see the Item.
							&lt;br/&gt;&lt;br/&gt;
						Thank you,&lt;br/&gt;&lt;br/&gt;
										&lt;/p&gt;
						
						</template>
						<template-language>freemarker</template-language>
						<notification-type>email</notification-type>
					</timer-notification>
				</timer-actions>
			</task-timer>
		</task-timers>
	</task>


Thanks,
Jayaram