Need Help about Do the following Subflow

Kohei Tominaga1
Tera Expert

I am configuring below subflow.

The 2 to 4 branch will complete soon but 5 to 8 branch will take 5mins to complete.

In this case, the output of step4 could return soon or do not return until step 8complete ??

KoheiTominaga1_0-1733396896171.png

 

2 REPLIES 2

Uncle Rob
Kilo Patron

Anything within a "Do In Parallel" bubble doesn't care about its peer processes.
"Do In Parallel"
- Subflow A (takes 1Million Years)
- Subflow B (takes 1 picosecond)

Neither cares about the other's completion time.  If they are in any way dependent on each other then you need to put them in order, NOT in parallel.  

Juhi Poddar
Kilo Patron

Hello @Kohei Tominaga1 

  • In ServiceNow Flow Designer, parallel branches execute independently. Here's what happens in your scenario:

    1. Branch Independence:

      • Steps 2 to 4 and 5 to 8 will execute in parallel, with no dependency on each other unless explicitly configured.
    2. Output Availability:

      • The output of Step 4 becomes available immediately after that step completes in its branch. It does not wait for the other branch (5 to 8 )to finish.
    3. Subflow Completion:

      • The subflow itself is only marked as "complete" once all parallel branches (both 2–4 and 5–8) finish. However, the outputs from individual branches are available for downstream steps as soon as their respective branches complete.

    Example:

    • If Branch A (steps 2–4) finishes in 1 minute and Branch B (steps 5–8) takes 5 minutes:
      • The output of Step 4 is available after 1 minute.
      • The entire subflow completes only after 5 minutes, once Branch B finishes.

    Key Consideration:
    If a downstream step depends on outputs from both branches, it will wait until both branches are completed before execution.

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps others find the solution more easily and supports the community!"

Thank You
Juhi Poddar