Profile picture for user Schwörer

Hi all,

today I have the problem to pass values (string) from one apg process to another.

I use the feature to start "sub-processes" from a report script in a parent process like this (thanks to Tanguy Petre) :       

var processAutoComp = Context.getComponent("Process");

var runresult = processAutoComp.run("5bdc5db1-fb79-11e3-4efe-00505692002f", PV_array);

That works fine and I pass the selected models I want to deal with to the sub-process I run with that command (PV_array) .

But I need to pass some additional parameter values (string) to the subprocess and I tried the context.setproperty und context.getproperty methods as we use it within other processes with reports (within one process - that's the difference). But the context-property I set in the calling process do not "arrive" in the second process when I try the getproperty - it is empty (null). It looks to me as if there are different contexts. Right?

How to deal with that and how can I manage to pass the parameters?

Many thanks for any idea.

Wolfgang

by Tanguy Petre
Posted on Fri, 07/11/2014 - 09:26

Hello Wolfang,

We had this issue also as indeed the instance context is different and the variables are instance dependant. What we did to overcome this was to store the parameters in the log database in an object specific to the first process and reread those parameters in the second process - you have then access to all variable you want.

Your PV_array could also contain a reference to the log object with all parameters. You process will start by first reading all variable and then start executing what needs to be done.

Cheers

Tanguy

0
by Wolfgang Schwörer Author
Posted on Fri, 07/11/2014 - 11:57

Thanks again Tanguy! Very good idea.

The more I try I can see that I'm faced the same problems like others when I want to do some not-every-day tasks with APG. So it's very good to have the community here. :-)

This morning I received a phone call answer from an APG-expert who developed for our house some time ago. He told me the same like you about the context and made a similar suggestion (writing to an attribute in a model of the selection and read it later on). 

So it's always a little bit tricky and not straight forward!

Thanks a lot and have a nice weekend.

Wolfgang

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock