Foros de discusión

Liferay WorkFlow Definition

thumbnail
Hamidul Islam, modificado hace 10 años.

Liferay WorkFlow Definition

Regular Member Mensajes: 111 Fecha de incorporación: 22/05/08 Mensajes recientes
Hi All,
I have some problems regarding multi level approver in Liferay Kaleo Web

1. Work Flow is enabled for Web Content
2. When the web content is created it goes to the first approver for review (Its working fine)
3. When the first approver approved the content it goes to the second level (its working fine)
4. If the second approver approves the content then the content should be in approved state (which is not working). Instead the content shows the pending state.

Below is my work flow definition.


<!--?xml version="1.0"?-->

<workflow-definition xmlns="urn:liferay.com:liferay-workflow_6.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="urn:liferay.com:liferay-workflow_6.1.0 http://www.liferay.com/dtd/liferay-workflow-definition_6_1_0.xsd">
	<name>Multi Level Approver</name>
	<description>A Multi Level approver can approve a workflow content.</description>
	<version>1</version>
	<state>
		<name>created</name>
		<metadata>
			{"xy":[78,53]}
		</metadata>
		<initial>true</initial>
		<transitions>
			<transition>
				<name>review</name>
				<target>review</target>
			</transition>
		</transitions>
	</state>
	<task>
		<name>update</name>
		<metadata>
			{"xy":[397,191]}
		</metadata>
		<actions>
			<notification>
				<name>Creator Modification Notification</name>
				<template>Your submission was rejected by a reviewer, please modify and resubmit.</template>
				<template-language>text</template-language>
				<notification-type>email</notification-type>
				<execution-type>onAssignment</execution-type>
			</notification>
		</actions>
		<assignments>
			<user />
		</assignments>
		<transitions>
			<transition>
				<name>resubmit</name>
				<target>review</target>
			</transition>
		</transitions>
	</task>
	<task>
		<name>review</name>
		<metadata>
			{"xy":[225,45]}
		</metadata>
		<actions>
			<notification>
				<name>Review Notification</name>
				<template>You have a new submission waiting for your review in the workflow.</template>
				<template-language>text</template-language>
				<notification-type>email</notification-type>
				<execution-type>onAssignment</execution-type>
			</notification>
			<notification>
				<name>Review Completion Notification</name>
				<template>
					Your submission has been reviewed and the reviewer has applied the following ${taskComments}.</template>
				<template-language>freemarker</template-language>
				<notification-type>email</notification-type>
				<recipients>
					<user />
				</recipients>
				<execution-type>onExit</execution-type>
			</notification>
		</actions>
		<assignments>
			<roles>
				<role>
					<role-type>organization</role-type>
					<name>Organization Administrator</name>
				</role>
				<role>
					<role-type>organization</role-type>
					<name>Organization Content Reviewer</name>
				</role>
				<role>
					<role-type>organization</role-type>
					<name>Organization Owner</name>
				</role>
				<role>
					<role-type>regular</role-type>
					<name>Administrator</name>
				</role>
				<role>
					<role-type>regular</role-type>
					<name>Portal Content Reviewer</name>
				</role>
				<role>
					<role-type>site</role-type>
					<name>Site Administrator</name>
				</role>
				<role>
					<role-type>site</role-type>
					<name>Site Content Reviewer</name>
				</role>
				<role>
					<role-type>site</role-type>
					<name>Site Owner</name>
				</role>
			</roles>
		</assignments>
		<transitions>
			<transition>
				<name>Next Level</name>
				<target>next</target>
			</transition>
			<transition>
				<name>reject</name>
				<target>update</target>
				<default>false</default>
			</transition>
		</transitions>
	</task>



	<task>
		<name>next</name>
		<metadata>
			{"xy":[225,45]}
		</metadata>
		
		<assignments>
			<roles>
				
				<role>
					<role-type>regular</role-type>
					<name>Document Reviewer</name>
				</role>
			</roles>
		</assignments>
		<transitions>
			<transition>
				<name>approve</name>
				<target>approved</target>
				<default>true</default>
			</transition>
			<transition>
				<name>reject</name>
				<target>update</target>
				<default>false</default>
			</transition>
		</transitions>
	</task>


	<state>
		<name>approved</name>
		<metadata>
			{"xy":[422,56]}
		</metadata>
		<actions>
			<action>
				<name>approve</name>
				<script>
					<![CDATA[
						Packages.com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil.updateStatus(Packages.com.liferay.portal.kernel.workflow.WorkflowConstants.toStatus("approved"), workflowContext);
					]]>
				</script>
				<script-language>javascript</script-language>
				<execution-type>onEntry</execution-type>
			</action>
		</actions>
	</state>
</workflow-definition>



Can anybody please tell me is there any mistake in the definition?

Thanks & Regards
Hamidul Islam
thumbnail
jaid shaik, modificado hace 10 años.

RE: Liferay WorkFlow Definition

Regular Member Mensajes: 171 Fecha de incorporación: 8/10/10 Mensajes recientes
Hi Hamidul,

As per my understand working on two level approval in workflow....

Long time back I have worked on two level approval, Am sharing xml file please look into this...I think it will help you.



Thanks
Jaid.Shaik
Abdul Majid P, modificado hace 10 años.

RE: Liferay WorkFlow Definition

New Member Mensajes: 7 Fecha de incorporación: 26/05/08 Mensajes recientes
I have tried with your workflow definition. Web content status is changed to approved after final approval.

Please download the latest kaleo web from market place and try again.