How to make multiple workflow calls in parallel but stay within PREP_PROCESS_VARA loop

Discussion created by JohnO'Mullane on Oct 13, 2017
Latest reply on Oct 13, 2017 by joel_wiesmann_automic
Hi all,
I have a SCRIPT that does a PREP_PROCESS_VARA and returns many Database Names.
For each database name returned I'm calling a workflow, using ACTIVATE_UC_OBJECT, passing this DB Name each time.

Presently these workflows kick off almost simultaneously and run in parallel, which is what I want.

I have a new requirement to Stop one of my active EVNT''s at the beginning of this script and Restart when all workflows are completed.

I have the code for this


The problem I am facing is that my workflows continue to run when my SCRIPTS completes.

As a result, if I put the code above at the end of my SCRIPT to restart my EVNT, my event will restart before my workflows are completed.

I am aware of the WAIT parameter in the ACTIVATE_UC_OBJECT function, but when I tested this, it doesn't run my workflows in parallel, instead waiting for each one to complete before kicking off next one. This is not what I need.

Appreciate any idea of how I can achieve this.