Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
use of <fork> tag in Kaleo workflow Sagar A Vyas November 20, 2010 10:10 AM
RE: use of <fork> tag in Kaleo workflow Sagar A Vyas November 22, 2010 4:55 AM
RE: use of <fork> tag in Kaleo workflow Sheikh Sajid December 4, 2010 3:47 AM
RE: use of <fork> tag in Kaleo workflow Sagar A Vyas December 12, 2010 10:54 PM
RE: use of <fork> tag in Kaleo workflow Bradai Salma April 5, 2011 12:54 AM
RE: use of <fork> tag in Kaleo workflow Sagar A Vyas April 28, 2011 2:09 AM
RE: use of <fork> tag in Kaleo workflow Jakob Fahrner July 27, 2011 5:03 AM
RE: use of <fork> tag in Kaleo workflow Arvind Mishra October 12, 2011 11:48 AM
RE: use of <fork> tag in Kaleo workflow Jake Kuang October 12, 2011 6:49 PM
RE: use of <fork> tag in Kaleo workflow Arvind Mishra October 12, 2011 8:20 PM
RE: use of <fork> tag in Kaleo workflow Jake Kuang October 12, 2011 8:27 PM
RE: use of <fork> tag in Kaleo workflow krishna kumar February 8, 2012 1:14 AM
RE: use of <fork> tag in Kaleo workflow Paro Nasser February 23, 2012 2:55 AM
RE: use of <fork> tag in Kaleo workflow Jake Kuang February 23, 2012 5:50 PM
RE: use of <fork> tag in Kaleo workflow Paro Nasser March 2, 2012 3:41 AM
RE: use of <fork> tag in Kaleo workflow Vishal Panchal September 12, 2012 1:14 AM
RE: use of <fork> tag in Kaleo workflow Enrico Maria Rossi February 12, 2013 6:32 AM
RE: use of <fork> tag in Kaleo workflow Bhargav reddy May 30, 2013 4:28 AM
RE: use of <fork> tag in Kaleo workflow yashika seth October 26, 2015 5:10 AM
RE: use of <fork> tag in Kaleo workflow Pradip A Bhatt June 25, 2013 5:37 AM
Sagar A Vyas
use of <fork> tag in Kaleo workflow
November 20, 2010 10:10 AM
Answer

Sagar A Vyas

Rank: Liferay Master

Posts: 657

Join Date: April 17, 2009

Recent Posts

Hi Everyone,

I need to know how to use fork-join tag in xml definition with proper syntax.

or

If any live sample xml-definition (same as single-approver-definition.xml) which contains <fork> and <join> tags will really appreciable.


Thanks,
Sagar Vyas
CIGNEX
Sagar A Vyas
RE: use of <fork> tag in Kaleo workflow
November 22, 2010 4:55 AM
Answer

Sagar A Vyas

Rank: Liferay Master

Posts: 657

Join Date: April 17, 2009

Recent Posts

Hi Friends,

I have just gone through the .xsd description for Kaleo Workflow and I have found following way to use of <fork> tag in costume definition.


 1
 2<workflow-definition>
 3        <name></name>
 4        <description>  </description>
 5        <version> </version>
 6             <state>
 7            <name>created</name>
 8            <initial>true</initial>
 9            <transitions>   
10                <transition>
11                    <name>phase1</name>
12                    [b]<target>TestingFork</target>[/b]
13                    <default>true</default>
14                </transition>
15            </transitions>
16        </state>
17    <fork>
18        [b]<name>TestingFork</name>[/b]
19        <transitions>
20            <transition>
21                <name>review</name>
22                <target>approval_one</target>
23                <default>true</default>
24            </transition>
25            <transition>
26                <name>reviewtwo</name>
27                <target>approval_two</target>
28                <default>true</default>
29            </transition>
30        </transitions>
31    </fork>   
32</workflow-definition>
33[/size]



Hope this will help people like me emoticon


Thanks,
Sagar Vyas
CIGNEX
Sheikh Sajid
RE: use of <fork> tag in Kaleo workflow
December 4, 2010 3:47 AM
Answer

Sheikh Sajid

Rank: New Member

Posts: 17

Join Date: October 4, 2010

Recent Posts

how is one of the two transitions selected in a fork?
how to join from forks?
Sagar A Vyas
RE: use of <fork> tag in Kaleo workflow
December 12, 2010 10:54 PM
Answer

Sagar A Vyas

Rank: Liferay Master

Posts: 657

Join Date: April 17, 2009

Recent Posts

Hi Sajid,

Here is answers of you Questions.


Question 1) How is one of the two transitions selected in a fork?


Ans : We uses fork for parallel transitions. both transition is execute parallel.so no worry about which one will be executed first or which one will be executed last emoticon

Question 2) How to join from forks?


Ans :

 1
 2<workflow-definition>
 3    <fork>
 4        [b]<name>TestingFork</name>[/b]
 5        <transitions>
 6            <transition>
 7                <name>review</name>
 8                <target>approval_one</target>
 9                <default>true</default>
10            </transition>
11            <transition>
12                <name>reviewtwo</name>
13                <target>approval_two</target>
14                <default>true</default>
15            </transition>
16        </transitions>
17    </fork>   
18    <task>
19        <name>approval_one</name>
20        <actions></actions>
21        <assignments></assignments>
22        <transitions>
23            <transition>
24                <name>result</name>
25                <target>[color=#F52153]join_task[/color]</target>
26                <default>true</default>
27            </transition>
28        </transitions>
29    </task>
30    <task>
31        <name>approval_two</name>
32        <actions></actions>
33        <assignments>    </assignments>
34        <transitions>
35            <transition>
36                <name>result</name>
37                <target>[color=#F52153]join_task[/color]</target>
38                <default>true</default>
39            </transition>
40        </transitions>
41    </task>
42        <join>
43               <name>[color=#F52153]join_task[/color]<name>
44               <actions></actions>
45           <transitions>
46            <transition>
47                <name>result</name>
48                <target>[color=#C42AE9]final_approval_task[/color]</target>
49                <default>true</default>
50            </transition>
51        </transitions>
52         </join>
53         <task>
54        <name>[color=#C42AE9]final_approval_task[/color]</name>
55        <actions></actions>
56        <assignments></assignments>
57        <transitions>
58            <transition>
59                <name>approve</name>
60                <target>approved</target>
61                <default>true</default>
62            </transition>
63            <transition>
64                <name>reject</name>
65                <target>update</target>
66                <default>false</default>
67            </transition>
68        </transitions>
69    </task>
70</workflow-definition>
71[/size]



So,as mention in above xml file fork will execute two transitions (approval_one & approval_two) parallel and from there they both call join_task so unless and until both task responds will not come it will wait and once both response will arrive it will execute next task (final_approval_task).

Hope you will get your answers.

Best luck.


Thanks,
Sagar Vyas
CIGNEX
Bradai Salma
RE: use of <fork> tag in Kaleo workflow
April 5, 2011 12:54 AM
Answer

Bradai Salma

Rank: Junior Member

Posts: 53

Join Date: February 5, 2011

Recent Posts

Hi Sagar,
thanks for your clarifications,but i want to know what version of Liferay have you used?
in fact i'm using Liferay-6.0.5 and i have a problem(an error occure when i browse my xml file) when i use <fork> and <join> although i have followed what you have put in this forms.
this is my xml file:
<?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>test</name>
<description>de forum</description>
<version>1</version>
<state>
<name>CREATED</name>
<initial>true</initial>
<transitions>
<transition>
<name>phase</name>
<target>TestingFork</target>
<default>true</default>
</transition>
</transitions>
</state>
<task>
<name>update</name>
<assignments>
<user />
</assignments>
<transitions>
<transition>
<name>resubmit</name>
<target>TestingFork</target>
<default>true</default>
</transition>
</transitions>
</task>
<fork>
<name>TestingFork</name>
<transitions>
<transition>
<name>review</name>
<target>approval_one</target>
<default>true</default>
</transition>
<transition>
<name>reviewtwo</name>
<target>approval_two</target>
<default>true</default>
</transition>
</transitions>
</fork>
<task>
<name>approval_one</name>
<actions></actions>
<assignments>
<roles>
<role>
<role-type>organization</role-type>
<name>Organization Administrator</name>
</role>
<role>
<role-type>organization</role-type>
<name>Organization Owner</name>
</role>
<role>
<role-type>organization</role-type>
<name>Approval one</name>
</role>
</roles>
</assignments>
<transitions>
<transition>
<name>result</name>
<target>join_task</target>
<default>true</default>
</transition>
</transitions>
</task>
<task>
<name>approval_two</name>
<actions></actions>
<assignments>
<roles>
<role>
<role-type>organization</role-type>
<name>Organization Administrator</name>
</role>
<role>
<role-type>organization</role-type>
<name>Organization Owner</name>
</role>
<role>
<role-type>organization</role-type>
<name>approval_two</name>
</role>
</roles>
</assignments>
<transitions>
<transition>
<name>result</name>
<target>join_task</target>
<default>true</default>
</transition>
</transitions>
</task>
<join>
<name>join_task<name>
<actions></actions>
<transitions>
<transition>
<name>result</name>
<target>final_approval_task</target>
<default>true</default>
</transition>
</transitions>
</join>
<task>
<name>final_approval_task</name>
<actions></actions>
<assignments>
<roles>
<role>
<role-type>organization</role-type>
<name>Organization Administrator</name>
</role>
<role>
<role-type>organization</role-type>
<name>Organization Owner</name>
</role>
<role>
<role-type>organization</role-type>
<name>final approval</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 Asset</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>
Sagar A Vyas
RE: use of <fork> tag in Kaleo workflow
April 28, 2011 2:09 AM
Answer

Sagar A Vyas

Rank: Liferay Master

Posts: 657

Join Date: April 17, 2009

Recent Posts

Hi Salma,

I have used same version as you mentioned,

Would you please attached xml file with forum so i can understand more from that.

Thanks,
Sagar Vyas
CIGNEX
Jakob Fahrner
RE: use of <fork> tag in Kaleo workflow
July 27, 2011 5:03 AM
Answer

Jakob Fahrner

Rank: New Member

Posts: 10

Join Date: July 19, 2011

Recent Posts

Hi all,

I have tried to add an example workflow implementation with fork and join my LifeRay version (CE 6.0.6)
Unfortunately everytime I upload the xml file and say save there occurs an error:
No specific error it's simply shows "ERROR" as in the attached image (nothing in the tomcat logs either)

If I try to upload a simple workflow definition without fork or join everything works fine.
I checked my workflow defenition code several times and didn't found an error
For checking purpose I used the dtd from http://www.liferay.com/dtd/liferay-workflow-definition_6_0_0.xsd

After some testing I figured out that the workflow definiton works if I simply comment out the join and put the targets of the tasks before to the next one.
The bad thing is when one of the tasks prevesouly pointing to the join is submitted the final task is available (didn't wait for the second to finish)
So in my opinion the error has to be somewhere at the join

My code for the join

 1<join>
 2        <name>join_task<name>
 3        <transitions>
 4            <transition>
 5                <name>result</name>
 6                <target>final_approval_task</target>
 7            </transition>
 8        </transitions>
 9    </join>


If you have any idea or help I would be really happy
The two workflow-definition xml files are attached. (one with join not working, and one without working but not properly)
Attachment

Attachments: WorkflowError.jpg (20.0k), parallel-approver-with-join-definition.xml (6.2k), parallel-approver-without-join-definition.xml (6.3k)
tobe tiny301
RE: use of <fork> tag in Kaleo workflow
August 17, 2011 12:00 AM
Answer

tobe tiny301

Rank: New Member

Posts: 1

Join Date: August 16, 2011

Recent Posts

This is also my problem. Anyone can give me an example with fork tag? I very tired to try to do it but it doesn't work. emoticon
Arvind Mishra
RE: use of <fork> tag in Kaleo workflow
October 12, 2011 11:48 AM
Answer

Arvind Mishra

Rank: Regular Member

Posts: 226

Join Date: February 13, 2008

Recent Posts

Task approval_one and approval_two both go to Join. Then Join goes to final approval and final approval can reject or approve the task.

What happens, if Approval One or Approval two itself want to reject the task.

How will that work

Thanks
Jake Kuang
RE: use of <fork> tag in Kaleo workflow
October 12, 2011 6:49 PM
Answer

Jake Kuang

Rank: New Member

Posts: 4

Join Date: September 5, 2010

Recent Posts

the example as the attachment, but the liferay system reported me an erro when I imported the workflow-definition.xml

hope can help.
Attachments: fork-workflow-definition.xml (4.0k)
Arvind Mishra
RE: use of <fork> tag in Kaleo workflow
October 12, 2011 8:20 PM
Answer

Arvind Mishra

Rank: Regular Member

Posts: 226

Join Date: February 13, 2008

Recent Posts

Hi Jake

If you are using the attached XML for workflow defintion, then there is an error in this xml
At line 137, <name> tag is not closed

1
2<join>
3<name>join_task<name>
4.....
5.....
6</join>


Could you please try same xml, after closing the name tag

-Arvind
Jake Kuang
RE: use of <fork> tag in Kaleo workflow
October 12, 2011 8:27 PM
Answer

Jake Kuang

Rank: New Member

Posts: 4

Join Date: September 5, 2010

Recent Posts

It's work .
Thank you ,Arvind. Thank you very much.
krishna kumar
RE: use of <fork> tag in Kaleo workflow
February 8, 2012 1:14 AM
Answer

krishna kumar

Rank: New Member

Posts: 9

Join Date: September 3, 2010

Recent Posts

Hi all,

I have selected fork-join xml in the workflow configuration. If i create any blog it is in pending state. when i login as an administrator and gone through my tasks it is showing parllel approvals when i select two approvals for me it went to assign to me tab then if i approve both of that it didn't create any final approve task.

I think in the above case fork is executing successfully but join is not working. Can any body explain where can i find final approval.

Please explain the flow of <fork> <join>.

Thanks in advance.


Thanks & Regards,

krishna kumar
Paro Nasser
RE: use of <fork> tag in Kaleo workflow
February 23, 2012 2:55 AM
Answer

Paro Nasser

Rank: New Member

Posts: 15

Join Date: January 12, 2012

Recent Posts

Hi Jake,

i try your example, but i never come to the State approve. How you fix it?
Jake Kuang
RE: use of <fork> tag in Kaleo workflow
February 23, 2012 5:50 PM
Answer

Jake Kuang

Rank: New Member

Posts: 4

Join Date: September 5, 2010

Recent Posts

Paro Nasser:
Hi Jake,

i try your example, but i never come to the State approve. How you fix it?


hi Paro
I can import the workflow and let the approver on both sides of the fork catch the task by using that code.
as ups say, I lost the fork end label last time.
Paro Nasser
RE: use of <fork> tag in Kaleo workflow
March 2, 2012 3:41 AM
Answer

Paro Nasser

Rank: New Member

Posts: 15

Join Date: January 12, 2012

Recent Posts

Hi Jake,

that will be great, thanks a lot!
Vishal Panchal
RE: use of <fork> tag in Kaleo workflow
September 12, 2012 1:14 AM
Answer

Vishal Panchal

Rank: Expert

Posts: 280

Join Date: May 20, 2012

Recent Posts

Hi All,

Thanks for your contribution.
Learnt a lot and saved my time too..

Thanks & Regards,
Vishal R. Panchal
Enrico Maria Rossi
RE: use of <fork> tag in Kaleo workflow
February 12, 2013 6:32 AM
Answer

Enrico Maria Rossi

Rank: New Member

Posts: 22

Join Date: January 15, 2013

Recent Posts

Hi, is it possible assign-to a list of users?, With kaleo i can assign-to only one user. Thanks.

Enrico
Bhargav reddy
RE: use of <fork> tag in Kaleo workflow
May 30, 2013 4:28 AM
Answer

Bhargav reddy

Rank: New Member

Posts: 2

Join Date: April 24, 2013

Recent Posts

it works fine until fork but as soon as i approve one of the requests it jumps to update, and not final review. how to fix it ?? emoticon emoticon
Pradip A Bhatt
RE: use of <fork> tag in Kaleo workflow
June 25, 2013 5:37 AM
Answer

Pradip A Bhatt

Rank: Junior Member

Posts: 51

Join Date: January 29, 2013

Recent Posts

Hello All....

I am using liferay version 6.1.1 CA GA2. I installed and used Kaleo workflow in liferay.
Kaleo provides just accept - reject states.

Now my requirement is like that i have to provide three state
1) Accept
2) Reject
3) Revise or Resubmit

So.. What i have to do??
Many friends suggests me to use JBPM.. I am very new in liferay.. I have no idea that what is JBPM.. but yes... if some one can direct me properly then i can do further.


Please Help me regarding this..
Thankssssssssssss in Advanceeeeeeeeeeee,,,,,,,,,,,

Pradip Bhatt
yashika seth
RE: use of <fork> tag in Kaleo workflow
October 26, 2015 5:10 AM
Answer

yashika seth

Rank: New Member

Posts: 9

Join Date: November 6, 2013

Recent Posts

Jake Kuang:
the example as the attachment, but the liferay system reported me an erro when I imported the workflow-definition.xml

hope can help.



Hello, Please help I'm unable to apply reject transition in fork.. it's very urgent please help. For one transition that is "approve" it's working fine but when am using two transitions it's causing problem emoticon