A solution to optimize creating N sequences in parallel process

Is there any way to create a large number of parallel sequences in parallel scope, without having to drag and drop the corresponding number of sequences.

For example: I want to have 3 threads, hence drag and drop 3 sequences. If i want to have N threads - (ex: 10), the canvas will become impossible to be seen.

Please take note that the 3 sequences contain a same logical process

Yeah

If the process logic is same you can keep loop inside the parallel scope

Something like this - one inside the other

  • Parallel activity
  • For Each or while loop ( to the count u want )
  • Invoke WorkflowFile activity with the xaml file called

So that u don’t need to drag such number of sequences

Hope this helps

Cheers @midori

Sounds like a great idea, I’ll give it a try

1 Like

Or u can try this way also

  • For Each (item in Collection) // Or While (condition)
  • Parallel
  • Invoke Workflow File

This setup will execute the workflow concurrently for each item in the collection or based on the condition specified in the loop. The Parallel activity ensures that each invocation runs concurrently, making efficient use of available resources.

@midori

image
Is this correct, cause the behavior of the process wen like this:
Start first time, perform from start to end → Start second time → Start n time → End
Did I miss anything, cause from what I observed it wasnt running concurrently?

Update: Same thing happended with your 2nd approach @Palaniyappan
image

The parallel scope only affects items that are contained within. I think you might want to try a Parallel For Each activity instead.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.