Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Ankur Agarwal
Not able to create Custom Workflow
28 de marzo de 2012 2:27
Respuesta

Ankur Agarwal

Ranking: New Member

Mensajes: 20

Fecha de incorporación: 27 de marzo de 2012

Mensajes recientes

Hi,
I am trying to create a workflow with two levels of aproval
When I am uploading the two-approver-definition.xml, its gives an error


My workflow definition xml looks like

<?xml version="1.0" encoding="UTF-8"?>

<workflow-definition
xmlns="urn:liferay.com:liferay-workflow_6.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:liferay.com:liferay-workflow_6.0.0 http://www.liferay.com/dtd/liferay-workflow-definition_6_0_0.xsd"
>
<name>Two Stage Approval</name>
<description>Two step approval will be required for getting the workflow approved.</description>
<version>1</version>
<state>
<name>created</name>
<initial>true</initial>
<transitions>
<transition>
<name>review1</name>
<target>review1</target>
<default>true</default>
</transition>
</transitions>
</state>
<task>
<name>update</name>
<actions>
<notification>
<name>Creator Modification Notification</name>
<execution-type>onAssignment</execution-type>
<template>Your submission was rejected by a reviewer, please modify and resubmit.</template>
<template-language>text</template-language>
<notification-type>email</notification-type>
</notification>
</actions>
<assignments>
<user />
</assignments>
<transitions>
<transition>
<name>resubmit</name>
<target>review</target>
<default>true</default>
</transition>
</transitions>
</task>
<task>
<name>review1</name>
<actions>
<notification>
<name>Review Notification</name>
<execution-type>onAssignment</execution-type>
<template>You have a new submission waiting for your review in the workflow.</template>
<template-language>text</template-language>
<notification-type>email</notification-type>
</notification>
</actions>
<assignments>
<roles>
<role>
<role-type>regular</role-type>
<name>WebContentReviewer1</name>
</role>
</roles>
</assignments>
<transitions>
<transition>
<name>review2</name>
<target>review2</target>
<default>true</default>
</transition>
<transition>
<name>reject</name>
<target>update</target>
<default>false</default>
</transition>
</transitions>
</task>
<task>
<name>review2</name>
<actions>
<notification>
<name>Review Notification</name>
<execution-type>onAssignment</execution-type>
<template>You have a new submission waiting for your review in the workflow.</template>
<template-language>text</template-language>
<notification-type>email</notification-type>
</notification>
</actions>
<assignments>
<roles>

<role>
<role-type>regular</role-type>
<name>WebContentReviewer1</name>
</role>
<role>
<role-type>regular</role-type>
<name>Administrator</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>
<actions>
<action>
<name>approve</name>
<execution-type>onEntry</execution-type>
<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>
</action>
</actions>
</state>
</workflow-definition>

The Eclipse console also does not show any error messages and neither the logs.
I have pointed my Liferay to use MySql DB configured on my system.

Can any body provide help on this?
Thanks in advance
Preeti Deshpande
RE: Not able to create Custom Workflow
5 de abril de 2012 22:45
Respuesta

Preeti Deshpande

Ranking: New Member

Mensajes: 3

Fecha de incorporación: 5 de abril de 2012

Mensajes recientes

Hi..
I guess you have assigned task to same role in both the levels of approval.. may be that is the reason for error..
Ankur Agarwal
RE: Not able to create Custom Workflow
6 de abril de 2012 3:20
Respuesta

Ankur Agarwal

Ranking: New Member

Mensajes: 20

Fecha de incorporación: 27 de marzo de 2012

Mensajes recientes

Thanks preeti,
the file got uploaded, actually i was not able to upload my definition.xml file, i removed the kaleo-web from the installation and replaced it with a fresh one. The Issue got solved.
The Same Name is not a problem... actually you can have multiple notifiactions at each level.
Preeti Deshpande
RE: Not able to create Custom Workflow
6 de abril de 2012 4:26
Respuesta

Preeti Deshpande

Ranking: New Member

Mensajes: 3

Fecha de incorporación: 5 de abril de 2012

Mensajes recientes

Hi Ankur... Glad your problem got solved emoticon even I am trying for a two level workflow, but am not able to implement it, could you have a look and let me know where m i goign wrong?

<?xml version="1.0" encoding="UTF-8"?>

<workflow-definition
xmlns="urn:liferay.com:liferay-workflow_6.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:liferay.com:liferay-workflow_6.0.0 http://www.liferay.com/dtd/liferay-workflow-definition_6_0_0.xsd"
>
<name>Single EPIC Approver</name>
<description>A single approver can approve a workflow content.</description>
<version>1</version>
<state>
<name>created</name>
<initial>true</initial>
<transitions>
<transition>
<name>review</name>
<target>review</target>
<default>true</default>
</transition>
</transitions>
</state>
<task>
<name>update</name>
<actions>
<notification>
<name>Creator Modification Notification</name>
<execution-type>onAssignment</execution-type>
<template>Your submission was rejected by a reviewer, please modify and resubmit.</template>
<template-language>text</template-language>
<notification-type>email</notification-type>
</notification>
</actions>
<assignments>
<user />
</assignments>
<transitions>
<transition>
<name>resubmit</name>
<target>review</target>
<default>true</default>
</transition>
</transitions>
</task>
<task>
<name>PreetiChange</name>
<actions>
<notification>
<name>Creator Modification Notification</name>
<execution-type>onAssignment</execution-type>
<template>Your submission was rejected by a reviewer, please modify and resubmit.</template>
<template-language>text</template-language>
<notification-type>email</notification-type>
</notification>
</actions>
<assignments>
<user />
</assignments>
<transitions>
<transition>
<name>resubmit</name>
<target>review</target>
<default>true</default>
</transition>
</transitions>
</task>


<task>
<name>review</name>
<actions>
<notification>
<name>Review Notification</name>
<execution-type>onAssignment</execution-type>
<template>You have a new submission waiting for your review in the workflow.</template>
<template-language>text</template-language>
<notification-type>email</notification-type>
</notification>
</actions>
<assignments>
<roles>

<role>
<role-type>regular</role-type>
<name>EPIC Administrator</name>
</role>

</roles>
</assignments>
<transitions>
<transition>
<name>approve</name>
<target>approved</target>
<default>true</default>
</transition>
<transition>
<name>reject</name>
<target>PreetiChange</target>
<default>false</default>
</transition>

</transitions>
</task>
<state>
<name>approved</name>
<actions>
<action>
<name>approve</name>
<execution-type>onEntry</execution-type>
<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>
</action>
</actions>
</state>
</workflow-definition>
Ankur Agarwal
RE: Not able to create Custom Workflow
6 de abril de 2012 4:44
Respuesta

Ankur Agarwal

Ranking: New Member

Mensajes: 20

Fecha de incorporación: 27 de marzo de 2012

Mensajes recientes

Hi Preeti,
Looking at your workflow what i am able to deduce is that once an Asset is submitted for approval, it goes for the review task and if approved it gets published.
If rejected it goes to PreetiChange form where it again goes to update.
I have two ques actually, 1 Why the need of task PreetiChange, if you are just passing it from there to update so there will be no user action and once rejected it will go on to the update task directly.
2. What exact problem are you facing.
Preeti Deshpande
RE: Not able to create Custom Workflow
6 de abril de 2012 4:53
Respuesta

Preeti Deshpande

Ranking: New Member

Mensajes: 3

Fecha de incorporación: 5 de abril de 2012

Mensajes recientes

Hi Ankur, Sorry that wasnot the workflow i am working on,... it is this...

<?xml version="1.0" encoding="UTF-8"?>

<workflow-definition
xmlns="urn:liferay.com:liferay-workflow_6.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:liferay.com:liferay-workflow_6.0.0 http://www.liferay.com/dtd/liferay-workflow-definition_6_0_0.xsd"
>
<name> EPIC Two level</name>
<description>A single approver can approve a workflow content.</description>
<version>1</version>
<state>
<name>created</name>
<initial>true</initial>
<transitions>
<transition>
<name>review</name>
<target>review</target>
<default>true</default>
</transition>
</transitions>
</state>
<task>
<name>update</name>
<actions>
<notification>
<name>Creator Modification Notification</name>
<execution-type>onAssignment</execution-type>
<template>Your submission was rejected by a reviewer, please modify and resubmit.</template>
<template-language>text</template-language>
<notification-type>email</notification-type>
</notification>
</actions>
<assignments>
<user />
</assignments>
<transitions>
<transition>
<name>resubmit</name>
<target>review</target>
<default>true</default>
</transition>
</transitions>
</task>
<task>
<name>PreetiChange</name>
<actions>
<notification>
<name>Creator Modification Notification</name>
<execution-type>onAssignment</execution-type>
<template>Your submission was rejected by a reviewer, please modify and resubmit.</template>
<template-language>text</template-language>
<notification-type>email</notification-type>
</notification>
</actions>
<assignments>
<user />
</assignments>
<transitions>
<transition>
<name>resubmit</name>
<target>review</target>
<default>true</default>
</transition>
</transitions>
</task>


<task>
<name>review</name>
<actions>
<notification>
<name>Review Notification</name>
<execution-type>onAssignment</execution-type>
<template>You have a new submission waiting for your review in the workflow.</template>
<template-language>text</template-language>
<notification-type>email</notification-type>
</notification>
</actions>
<assignments>
<roles>

<role>
<role-type>regular</role-type>
<name>EPIC Super Admin</name>
</role>

</roles>
</assignments>
<transitions>
<transition>
<name>approve</name>
<target>EPICSuperReview</target>
<default>true</default>
</transition>
<transition>
<name>reject</name>
<target>PreetiChange</target>
<default>false</default>
</transition>

</transitions>
</task>

<task>
<name>EPICSuperReview</name>
<actions>
<notification>
<name>Review Notification</name>
<execution-type>onAssignment</execution-type>
<template>You have a new submission waiting for your review in the workflow.</template>
<template-language>text</template-language>
<notification-type>email</notification-type>
</notification>
</actions>
<assignments>
<roles>

<role>
<role-type>regular</role-type>
<name>EPIC Administrator</name>
</role>

</roles>
</assignments>
<transitions>
<transition>
<name>approve</name>
<target>approved</target>
<default>true</default>
</transition>
<transition>
<name>reject</name>
<target>PreetiChange</target>
<default>false</default>
</transition>

</transitions>
</task>


<state>
<name>approved</name>
<actions>
<action>
<name>approve</name>
<execution-type>onEntry</execution-type>
<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>
</action>
</actions>
</state>
</workflow-definition>

basically wht i want is task goes to EPIC super admin first, then comes to EPIC administrator then get approved or rejected accordingly
Zeeshan Khan
RE: Not able to create Custom Workflow
8 de abril de 2012 21:45
Respuesta

Zeeshan Khan

Ranking: Expert

Mensajes: 349

Fecha de incorporación: 20 de julio de 2011

Mensajes recientes

Hi !

can u guys help me in creating a custom workflow....that is i am creating a role called Senior Marketing Manager (not an Admin) and he/she only should have the power to approve or reject....i saw ur posts but dint get where to put these files...

thanx !!!