Counter for parallel process

236 views
Skip to first unread message

kareem.e...@hkmci.com

unread,
Jul 22, 2014, 12:35:00 AM7/22/14
to suppor...@runmyprocess.com
Dear All,

I want to build a counter to track user decisions. A user should send an application to a list of people, then every one who received the list will decide wither he agree or not. then based on the number of people who agrees vs number of people who didn't an action will be taken.

My main problem is :
1- How can I track users decisions, and calculate number of approvals based on that considering the fact that user decisions is a sub-process created in a parallel way ?

ps: I have tried to increment a global variable "approvals" in the parent process, however. It kept it's original value without change, also I fear that there might be a data race issue if I followed this approach.

Kindly find the attached process design for you reference.
--

*Please consider the environment before printing this email or attachment*

This email and any attachments are confidential and may also be privileged.
If you are not the addressee, do not disclose, copy, circulate or in any
other way use or rely on the information contained in this email or any
attachments. If received in error, notify the sender immediately and delete
this email and any attachments from your system. Emails cannot be
guaranteed to be secure or error free as the message and any attachments
could be intercepted, corrupted, lost, delayed, incomplete or amended.
Master Concept Group and its subsidiaries do not accept liability for
damage caused by this email or any attachments and may monitor email
traffic.

child process.png
Parent process.png

Bilal Ajaj

unread,
Jul 22, 2014, 6:27:59 AM7/22/14
to suppor...@runmyprocess.com, kareem.e...@hkmci.com
Hi Karrem,

Many things must be done on both main process and sub process in order to increment the global variable.

First of all, in your sub process you should send a status to the main process saying whether the answer is yes or no.

Then, you should increment your global variable in the output of the loop task in the main process. You can do it this way : 
<#if (status == "yes")>
<#assign approval = approval?number + 1>
</#if>
        ${approval}
In the loop task, the checkbox "Send Variables" must be unchecked. This way, approval won't be set to 0 for every instance of the sub process.

You should also set the variable approval to 0 in the beginning of the main process.

Please let me know whether this solution worked for you or not.

Best regards,
--

Bilal AJAJ

Customer Solutions Engineer

     
Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.
Reply all
Reply to author
Forward
0 new messages