Which is best for complex process?

Hi All,

When we developing a mid complex or complex or any process , which workflow is more suitable between sequence and flowchart??

Whats your opinion on this and recommendations.
And in a workflow how many activities we can use maximum to maintain readability of the code??

Hi @lucky7

Its depends on the complexity and nature of the process:

  • Sequence: Best for linear, simple processes with minimal decision-making. It maintains execution order but lacks flexibility for complex logic.
  • Flowchart: Ideal for mid to complex processes, especially when involving multiple decision points, loops, and branching logic. It enhances readability and maintainability.

To maintain readability:

  • Keep Sequences within 20-30 activities (or modularize into separate workflows).
  • A Flowchart should not exceed 5-7 decision points per level; break it into smaller subprocesses if needed.
  • Always use Invoke Workflow to modularize logic for better maintainability.

You should also work on Re-Framework.

Of you found helpful mark as a solution.

1 Like

Hi @lucky7

Since there is an entire Framework (RE) dedicated for complex transactional processes, It would depend on how you like to keep things organised.

My recommendation would be to maintain a flowchart for easy readability of the main logical flow of the process.
You could then invoke various other sequences in this flowchart. If it is very complex, split it into sub process, each sub process could have a flow chart of its own.

These sequences could be organised as separate xaml workflows in well structured folders and sub folders. These folders could also follow a proper making convention. For example: you could place all excel processes in one folder, mail processes in another, etc. The workflows called in the flowchart can be named with suffixes “01_…” to understand the order of invocation, for easier tracking of these files in the Folder.

As for the limit of activities in a workflow, I’m not sure of it. But definitely try not to Nest too many activities within each other. Activity inside activity inside activity…, greatly reduces readability. By default a project has a limit of 7 (i guess, anyone correct me if I’m wrong) levels of hierarchy in nesting. Even though you can increase it in settings, its not recommended.

Cheers

Hie @lucky7 if you are working with Complex project than you have to use REFramework .it developed to run your process in a smooth way and it handle the exception so you only need to build your process and invoke it accordingly .
Cheers

@lucky7
refer below documents to get an idea by yourself about sequence, flowchart and state machine as well

Happy automation!!