Nested Processes
Application Type
Traditional Web
Service Studio Version
11.52.1 (Build 59538)
Platform Version
11.0.615

I want to run a complex SQL which I have optimised as much as I can.  However, it is still causing problems.  So I set a Service Action to cycle through the dynamic number of chunks of data to collect and then collate the results.

However, it feels I should be able to run a Main_Process to manage all the Sub-Processes.  I can then use BPT to handle the Main_Process.

What is the best way to ensure all the Sub_Processes are complete before finishing the Main_Processs?

Any advice welcome...

Hi! 

Have you thought in using a "wait" activity in the main process?

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Processes/Process_Tools/Wait

You must keep track of the processes the main process is launching , and use the "wait" onclose action to test if all of them have ended. 

Just an idea 

Regards 

Graça

Can you expand the information on this topic? What specifically are you trying to accomplish?

Conceptually, it is very simple, in very un-Outsystems notation it looks like this:


The Examples in Executing Multiple Instance Activities use a human process to initiate each iteration of Interview.

But when I create a Process Flow:

I cannot iterate through ExecuteProcesses  
I cannot pass an array between AutomaticActivities (ok, I can pass a JSON list)
I cannot Initiate an ExecuteProcess from within an AutomaticActivity

But this ProcessFlow approach opens multiple Conditional Starts...

An alternative might be to use a Server Action to handle the iteration through the ExecuteProcess fails to use BPT to manage the overall process:

If a ServerAction is called from within a ProcessFlow the Executions are spawned independently and they need to be tracked.

I am reviewing the option to use a Light Process to launch on the creation of each chunk stub.

If there is a preferred pattern, I would be happy to hear about it....

Hi! 

Some of your statements puzzle me. 

You can launch a process from an AutomaticActivity , using the same widget you are showing in the server action cycle. and that widget returns the process Id it has started. 

As I suggested earlier you can keep those process Id's in a list and use it to verify if they are all ended before let the wait close, and the process proceed.


This sounds like you are trying to do a cross-join between buyers and sellers with dates taken into account? Apologies, I should have asked, what is your desired result from this interaction? I believe there are a number of ways to accomplish the task (if I've understood it correctly), but without knowing the specific outcome you are seeking it's difficult to recommend alterations. If it just data between tables with dates included, my first inclination is to ask if you have though of leveraging aggregates to simplify your task.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.