Latest Posts


Show last 6 hrs - 24 hrs - 7 days

Forum tags


Top Posters

Last 30 days

  • Antoine (84)
  • talita.pezzi (26)
  • sundaravadivel.n (14)
  • leonardo.saraiva (14)
  • clarissa.domingues.rocha1 (12)
  • deepa.tekumalla (12)
  • ravinderjit.singh (11)
  • djalma.saraiva (7)
  • chris.doudet (7)
  • jose.mendoza (6)

All time

  • Antoine (1447)
  • Shivanand (1189)
  • cshekhar (923)
  • psq (796)
  • jag (391)
  • metabyte (371)
  • arnaud (327)
  • jalateras (325)
  • dfrench (265)
  • venkaiah.k (198)

Show last 4 hrs - 12 hrs - 24 hrs

POLL

We are looking for more information to tailor our training to better meet the needs of our customers. Please indicate all options that apply.

I would like to attend specialized training from Intalio on BPM as it relates to my application area:


I would like to attend specialized training from Intalio on BPM as it relates to my job function:


I would like to attend specialized training from Intalio on BPM as it relates to my industry:

Login

MAIN arrow FORUMS
Re:Synchronisation between Tasks (0 viewing) 
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Synchronisation between Tasks
#15859
zuperman (User)
Fresh Boarder
User Offline Click here to see the profile of this user
Synchronisation between Tasks 3 Months ago Karma: 0  
Hello,

I want to accomplish a simple thing.

A workflow is startet, and then split by a "inclusive data based" gateway. Imagine all flows (e.g. 3) are activated.

Each flow updates a global variable with additional data.

Right now - I think - the result is not determined. It looks like that the result is overwritten sometimes, sometimes not. If I execute the workflow several times, different results appear.

I designed the workflow in a consecutive way (one task after the other), and the workflow was fine.. but not optimal.

So my question: if the tasks are activated in parallel, how do I synchronize between the tasks that only ONE task accesses the global var at the same time?

Or is the only way to append the second task after the first and forgetting about executing them in parallel?

thanks
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#15860
Antoine (Admin)
Admin
User Offline Click here to see the profile of this user
Re:Synchronisation between Tasks 3 Months ago Karma: 26  
I see two workarounds:

1. Use a variable per flow, and merge in the end.

2. Make sure the assignments are not updating the whole variable, just a small part of it related to your changes.
 
Report to moderator   Logged Logged  
 
Intalio, the Open Source BPMS company
www.intalio.com
  The administrator has disabled public write access.
#15887
zuperman (User)
Fresh Boarder
User Offline Click here to see the profile of this user
Re:Synchronisation between Tasks 3 Months ago Karma: 0  
Thanks...

Is there any way of synchronisation between tasks?
I have a "inclusive data based gateway" that spawns over 3 flows.
each of the updates the global var.

I use a XSLT stylesheet for updating the var... previously I found out that if I update a global var I have to copy the values from the var to the output var and append the new content. that works fine if the tasks are executed sequentially.

As stated before, I changed it to the include database based gateway. Now the result is undermined.. sometimes only the output of task 1 (which takes longer than task 2 and 3.. all of them call an external webservice) is available, sometimes the output is correct with the values of all three tasks.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#15888
zuperman (User)
Fresh Boarder
User Offline Click here to see the profile of this user
Re:Synchronisation between Tasks 3 Months ago Karma: 0  
Uups, made a mistake.

Although I copied it in the XSLT sheet, I did not pass this variable in the <bpel:copy> statement...

Now it seems to work.

A technical/functional question: what happens if two tasks are simultaneously writing to the same variable? is there any kind of internal semaphore and therefore synchronisation?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#15897
Antoine (Admin)
Admin
User Offline Click here to see the profile of this user
Re:Synchronisation between Tasks 3 Months ago Karma: 26  
No, there is no such thing. You will need to do your own locks, or merge the flow.

Thanks,

Antoine
 
Report to moderator   Logged Logged  
 
Intalio, the Open Source BPMS company
www.intalio.com
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop