Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
krishna kumar
Need Kaleo-Web Fork.xml Explanation
February 6, 2012 5:36 AM
Answer

krishna kumar

Rank: New Member

Posts: 9

Join Date: September 3, 2010

Recent Posts

Hi all,

I have successfully installed fork.xml. It is working fine but can any body explain the flow of fork.

fork.xml as follows,

<?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>Fork Approve Test</name>
<description>None.</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>
</actions>
<assignments>
<user />
</assignments>
<transitions>
<transition>
<name>resubmit</name>
<target>review</target>
<default>true</default>
</transition>
</transitions>
</task>
<task>
<name>review</name>
<actions>
</actions>
<assignments>
<roles>
<role>
<role-type>regular</role-type>
<name>Tester A</name>
</role>
<role>
<role-type>regular</role-type>
<name>Administrator</name>
</role>
</roles>
</assignments>
<transitions>
<transition>
<name>approve</name>
<target>fork_task</target>
<default>true</default>
</transition>
<transition>
<name>reject</name>
<target>update</target>
<default>false</default>
</transition>
</transitions>
</task>

<fork>
<name>fork_task</name>
<actions>
</actions>
<transitions>
<transition>
<name>reviewone</name>
<target>approve11</target>
<default>true</default>
</transition>
<transition>
<name>reviewtwo</name>
<target>approve12</target>
<default>true</default>
</transition>
<transition>
<name>reject</name>
<target>update</target>
<default>false</default>
</transition>
</transitions>
</fork>

<task>
<name>approve11</name>
<actions>
</actions>
<assignments>
<roles>
<role>
<role-type>regular</role-type>
<name>Tester B</name>
</role>
<role>
<role-type>regular</role-type>
<name>Administrator</name>
</role>
</roles>
</assignments>
<transitions>
<transition>
<name>approve</name>
<target>join_task</target>
<default>true</default>
</transition>
</transitions>
</task>

<task>
<name>approve12</name>
<actions>
</actions>
<assignments>
<roles>
<role>
<role-type>regular</role-type>
<name>Administrator</name>
</role>
</roles>
</assignments>
<transitions>
<transition>
<name>approve</name>
<target>join_task</target>
<default>true</default>
</transition>
</transitions>
</task>

<join>
<name>join_task</name>
<actions>
</actions>
<transitions>
<transition>
<name>result</name>
<target>approve2</target>
<default>true</default>
</transition>
</transitions>
</join>

<task>
<name>approve2</name>
<actions>
</actions>
<assignments>
<roles>
<role>
<role-type>regular</role-type>
<name>Tester C</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>






Thanks & Regards,

krishna kumar
Luigi Molinaro
RE: Need Kaleo-Web Fork.xml Explanation
June 19, 2012 3:16 AM
Answer

Luigi Molinaro

Rank: New Member

Posts: 13

Join Date: May 29, 2012

Recent Posts

Sorry, I'm use this definition:

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">

I think it's good equally.

But I have a problem!
don't works!! emoticon(((((
At moment the my problem is: do works well the reject in the parallel tasks.
emoticon
Can I hope who anybody help me?
in attachment the my file XML.

in this workflow works all good, if don't be the reject.
in fact, if the two person review reject the article, in the activity task the person user appear two reject instead of one.
this problem increases with the number of task in parallel!
I wait your answers! thanks.
Attachments: forkAPCR.xml (6.2k)