Subprocess as a nested process

369 views
Skip to first unread message

sagar....@flowian.com

unread,
Mar 20, 2015, 1:48:50 AM3/20/15
to suppor...@runmyprocess.com
Hi Team,

Can we use subprocess as a nested process in parallel loop activity in my process.

In one my application I maintain history of application, But if my subprocess is not a nested one then the history of subprocess is missing from process history.

But if I do check the Nested process checkbox, then there is problem with the loop variable.

For each loop iteration the value of my loop variable remains the same.

Is there any other way to solve this problem ?

Regards,
Sagar


Sweta Suman

unread,
Mar 20, 2015, 7:14:49 AM3/20/15
to suppor...@runmyprocess.com
Hi,

A nested process is a sub-process that shares its variables with its father process. So,when a variable is modified in sub-process, it is instantly modified in father process since it is the same variable. That's why for each loop iteration value is getting overridden.

How you are maintaining history of application using History widget or some other mechanism ?


Thanks,
Sweta



--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/a35d0667-b3a0-4412-85a9-f50b1e176798%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

sagar....@flowian.com

unread,
Mar 20, 2015, 7:30:03 AM3/20/15
to suppor...@runmyprocess.com
Hi Sweta,

How can we add OR display the details of the history of that subprocess.

There is one method get_history(), which can be computed in subprocess.

But the problem is, If my subprocess is executed more than one time, then that computed variable shows me the history of only last subprocess.


I also try to store the history of each subprocess in one array which is defined in parent process using the following.

his_array= hisarray + curr_process_history

Assuming that at each array index there will be history of each sub process.

But still it wont work.

Regasrds,
Sagar

Sweta Suman

unread,
Mar 20, 2015, 9:04:11 AM3/20/15
to suppor...@runmyprocess.com
Hi Sagar,

Try executing below code- 

1) In parent process initialize an array as -

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


2) In output variable of activity containing sub process append this array with values/history retrieved from sub process -

<@script env="javascript">
var arr = new Array();
arr = JSON.parse(result);
var mainJSON = {};
mainJSON=history;
arr.push(mainJSON); 
setVariable("result",arr);
</@script>
where history is variable retrieving information from ${get_history()}

Hope this helps you.

Thanks,
Sweta

Sagar

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.

sagarwad...@gmail.com

unread,
Mar 24, 2015, 1:57:02 AM3/24/15
to suppor...@runmyprocess.com
Hi Sweta,

Now my history var contalins history of all the subprocess instances.

Your solution is working.. Thanks.

Regards,
Sagar
Reply all
Reply to author
Forward
0 new messages