How to create a loop in flow
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2014 02:31 AM
Hi
I need to implement a loop flow in my process, i couldnt find loop construct in bpmn, below is my requirement,
start event —> java service(fetch users) —–> send mail to fetched users ——> get approval from all ——> if all approved —–> end event
Thanks,
Rahul
I need to implement a loop flow in my process, i couldnt find loop construct in bpmn, below is my requirement,
start event —> java service(fetch users) —–> send mail to fetched users ——> get approval from all ——> if all approved —–> end event
Thanks,
Rahul
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2014 03:44 AM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2014 10:12 AM
Thanks, I have achieved creating loop. sorry not to explore the docs properly. Please help me for the next one as well.
Now I am looping a Java Service Task, by passing a process variable list, and in the execute method i am getting usernames from the list by creating a execution variable. Now i need to check the condition for n number of users, if all users say true than only i need to move to next construct.
How i can evaluate the boolean result of n loop to a single result ??
Now I am looping a Java Service Task, by passing a process variable list, and in the execute method i am getting usernames from the list by creating a execution variable. Now i need to check the condition for n number of users, if all users say true than only i need to move to next construct.
How i can evaluate the boolean result of n loop to a single result ??
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2014 02:40 AM
Hi,
My understanding:
1. all users have to answer. - (multiinstance loop is fine. )
2. If at least one of them says "No" - I do not know what should happen
3. If all of them says "Yes" - continue in the process execution.
for 2. and 3. use exclusive gateway with decision (store decision results in process variables and evaluate them in the transitions from exclusive gateway.)
Regards
Martin
My understanding:
1. all users have to answer. - (multiinstance loop is fine. )
2. If at least one of them says "No" - I do not know what should happen
3. If all of them says "Yes" - continue in the process execution.
for 2. and 3. use exclusive gateway with decision (store decision results in process variables and evaluate them in the transitions from exclusive gateway.)
Regards
Martin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2014 02:48 AM
Is it okay to store the result for each iteration in a single process variable, since ServiceTask instance is singleton and will be shared by other process as well. What if some other thread of execution modifies the value of ServiceTask class variable ?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2014 02:55 AM
Hi,
I propose to use process instance variables.
Regards
Martin
Is it okay to store the result for each iteration in a single process variable,it is ok in the case of sequential multiinstance loop. (In the case of parallel multiinstance loop you can get exception (concurrent modification) - you can use one variable instance per iteration).
What if some other thread of execution modifies the value of ServiceTask class variable ?
I propose to use process instance variables.
Regards
Martin
