Process with a Parallel activity

381 views
Skip to first unread message

lizete....@gmail.com

unread,
Sep 2, 2015, 11:13:06 AM9/2/15
to Fujitsu RunMyProcess Developer Community
Dear support,
I have a process to implement that is a "collaborative", it means that somebody create the instance with some data, decide who are the users will update it with other data and send a e-mail notification for all users.
So i design the attach process, but i am facing my first problem:
- For each parallel activity assign, depending the action (update or reject) i need to update the teams_array column("reply_state")corresponding to that user.
- it seems to be ok in the "son process". it updates well the teams_array.
But on the "father" process, the teams_array column has the result of the last son process activity.
I seems that is missing something( or pherphaps is not the correct way to design this kind of process) to ensure that for each son activity the main process is update.
Can you help me, pls? Thanks in advance,

See Attach file , pls.

Contract_setup_report.docx

Bidisha Das

unread,
Sep 3, 2015, 3:07:37 PM9/3/15
to suppor...@runmyprocess.com
Hi,
I guess you are talking about reply_state under teams_array which displays the status of the manual activities.I hope you have checked the check box "Inject results" in main process so that the final computed values are sent from sub process to the main process.

Also, try refreshing the process report because it may take some time as the result will only reflect on the parent process when all the iterations are completed in child process. Check the computed parameters in main process which will reflect the status of the final updated manual task in sub process.


Thanks & Regards
Bidisha

lizete....@gmail.com

unread,
Sep 4, 2015, 5:12:08 AM9/4/15
to Fujitsu RunMyProcess Developer Community, lizete....@gmail.com
Hello,
Yes "Inject results" in main process is checked.
I have the "feeling" that i didn´t explain quite well:
. Each subprocess (user-manual activity) updates correctly the main process, but update all index's in main process, it means that "teams_array.reply_state[0]",
"teams_array.reply_state[1]"... are update and not just the correspondent P_index of the manual task. So the main process, always have the state of the last manual task.Each time a user update the data, it destroy the previsous update state.
My question is how i can ensure that each manual activity just update the correspondent P_index in main process.
Thank you for your help.

Bidisha Das

unread,
Sep 4, 2015, 12:17:14 PM9/4/15
to suppor...@runmyprocess.com
Hi,
You can try appending the values using the below code:

Declare an array in sub process:

<@script env="javascript">
var resultJSON = new Array();
setVariable("resultJSON",resultJSON);
</@script>

Then, append all the values(reply_state for each parallel activity) using the below code and store it in array & push it to the parent process.

<@script env="javascript">
var arr = new Array();
arr = JSON.parse(resultJSON);
for(i=0;i<teams_array.size();i++)
{
var mainJSON = {};
mainJSON=teams_array[i];
arr.push(mainJSON); 
}
setVariable("resultJSON",arr);
</@script>

You may need to replace some of the variables with your own ones.

Hope this helps.


Thanks & Regards
Bidisha.

lizete....@gmail.com

unread,
Sep 8, 2015, 12:06:36 PM9/8/15
to Fujitsu RunMyProcess Developer Community, lizete....@gmail.com
On Wednesday, September 2, 2015 at 4:13:06 PM UTC+1, Lizete....@ts.fujitsu.com wrote:

Thanks for your help. I will try this approach and as soon as possible i will give you feedback.

Reply all
Reply to author
Forward
0 new messages