Profile picture for user Schwörer

Hi,

I searched for that without an idea: is there a functionality to start/call a (child or sub)- APG-process from inside an APG-process?

The challenge behind is: to have a 'batch' process (defined with recurrence) which runs a report (aris script) to select a list of models (say outdated or so) and the responsible managers (that's the easy part) and than loop over the list found and send mail and generate a task for them in the process board and the follow-up handling.

The only way to achieve this I think is, to have to processes and to start child processes (with the "follow up handling") from the 'main' process in the loop, because if I would loop in the main process over the email+task etc. itself in one process instance, the process will stop at every task and wait for finishing the task by the responsible (and the follow-up handling) until the next  occurence in the loop. That would be nonsense and not praticable - and would last weeks or months.

Can anybody help with an idea which APG-functionality I can use?

Thanks for any response

Wolfgang

by Tanguy Petre
Posted on Fri, 06/20/2014 - 09:36

Hello Wolfang,

We have implemented a functionality in APG for a customer that when one process ends, we are triggering between 1-n processes (we called this fire new stream(s)). Those processes have then their own life based on a selection of models we have made in the original process...

I do not know if this is what you are looking for, but what we have done is our last task is an automated task linked to the report service and we use the property to pass the parameters (in our case model GUI) and then we use the Context.getComponent("Process").run("name of APG process I want to trigger","parameter") command to launch other APG executable process that will have their own life. As it is a report (and we have the context of the process), we can do some additional processing (such as specific sorting, version comparaison, ...) to then trigger multiple processes according to specific conditions on our original set of models.

So you could possibly continue with the previous process, and have your batch process triggered in parallel.

Hope it helps

Cheers

Tanguy

0
by Wolfgang Schwörer Author
Posted on Fri, 06/20/2014 - 10:46

In reply to by tpetr

Hello Tanguy,

that sounds very good. I think that would be what I searched for. I will have a try next week when I'm back in office.

Cheers and have a nice weekend

Wolfgang

 

0
by Wolfgang Schwörer Author
Posted on Wed, 06/25/2014 - 11:10

In reply to by Schwörer

Hello Tanguy again,

I had a try now and after solving some problems and errors while debugging I now have a report which runs in a process by an automatic task  and seems to execute the command (line 20) but nothing happens. The child process is not started! Probably you (or somebody else) will have some hint for me.

What I have programmed is as follows:



var g_nLoc = Context.getSelectedLanguage();

/*var db_name = ArisData.getSelectedDatabases()[0];*/

var db_name = "ZIVIT_Entwicklung";     

var db = ArisData.openDatabase(db_name, "arisservice", "arisservice", "90d64fa0-d90d-11de-3805-002186a3fbed", g_nLoc, true);



/* just for view in test and debug */

var components = new Array();

components = Context.getComponents ( );



/* define Top-Group to start from */

var topGroup ="Hauptgruppe/Prozesse/Kernprozesse/Geschäftsprozessmanagement/Geschäftsprozessoptimierung";

/* var topGroup ="Hauptgruppe"; */

var Startgruppe = db.Group(topGroup, g_nLoc);

var oSelectedModels = new Array();

/* now select all EEPC-Models from Startgruppe */

oSelectedModels = Startgruppe.ModelList(true, Constants.MT_EEPC);



/* now start child process - "Test-zyklisch-2" */

Context.getComponent("Process").run("02b7cec0-fb76-11e3-4efe-00505692002f", oSelectedModels);

/*Context.getComponent("Process").run("Test-zyklisch-2");*/



Context.setProperty("ind_akt_mods", "Test-zyklisch-2 ist fertig");   /* just for check outside */

 

The process so called "Test-zyklisch-2" runs, when I start it from the process administration manually and does what it should do (send me an email-message)! But it will not start from the above run-command. I also tried it with the name of the process - but bad luck. (I think it must be the GUId anyway.) No error occurs!

Any idea??? (by the way: we still use ARIS 7.2.3.b)

Best regards

Wolfgang

 

0
by Tanguy Petre
Posted on Wed, 06/25/2014 - 23:35

In reply to by Schwörer

hi Wolfgang,

I have attached the code we have used in the text document. We are also in 7.2 but not sure the SR

Let me know if this is working or if you need explanation.

Regards

Tanguy

 

 

 

 

 

 

File attachments
0
by Wolfgang Schwörer Author
Posted on Thu, 06/26/2014 - 11:44

In reply to by tpetr

Hello Tanguy,

many thanks for that again - and by the way: from your code I can learn some things I'll need with my further plans. :-))

But to study your code did not solve my problem, that the called sub process was not started.

But good news: I found it out (the ARIS support sent me no answer until now by the way). I searched for information in the sever logs but the error messages there led me wrong (... is not deployed (or is marked as simulation)). I deployed the process and there is no mark "as simulation". 

The real reason I now found is: you need to enter the GUID of the technical process, the BPMN-Modell into the run-command!!! Instead of the GUID of the EEPC-Model as I did. (There is nothing to read about that in the help.)

Now ist runs and starts the child process!!!!

Many thanks again for your support.

Cheers

Wolfgang

 

0
by Tanguy Petre
Posted on Tue, 07/01/2014 - 20:49

Hello Wolfgang

Great that you could realize what you wanted! Indeed I forgot to mention that the variable PROCID_ARESVALIDATION made reference to the technical process as this is the runtime version (and not the build time version)

Sorry for missing this important point.

Regards

Tanguy

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