I have three separate sequence projects which performs its own process. Note these are separate projects currently.
Process1 - Sequence - open desktop application and perform some actions and export a csv file with date timestamp.
Process2 - Sequence - create folders based on year and quarter.
Process3 - Sequence - take the csv file output from “Process1” sequence, and perform some filtering and output excel files, and place these excel files in the folder created in “Process2” sequence.
I would like to combine these processes into a single project. What would be the best way to achieve this in terms of workflows, sequence, flowcharts or state machines.
You can do it with the sequence or flowchart for this. No need to use state machines.
A flowchart structure would be an ideal choice to manage the flow between these processes. Here’s a step-by-step approach:
→ 1. Main Workflow (Flowchart) -
Create a new project and use a flowchart as the main workflow to manage the overall process flow.The flowchart will have three main branches, each representing one of the original processes.
→ 2. Process1 Workflow (Sequence) -
Create a separate sequence for the first process. This sequence will:Open the desktop application.Perform the required actions.Export a CSV file with a date timestamp.Invoke this sequence from the main flowchart.
→ 3. Process2 Workflow (Sequence) -
Create a separate sequence for the second process. This sequence will:Create folders based on the year and quarter.Invoke this sequence from the main flowchart.
→ 4. Process3 Workflow (Sequence) -
Create a separate sequence for the third process. This sequence will:Take the CSV file output from Process1.Perform filtering and output Excel files.Place these Excel files in the folder created in Process2.Invoke this sequence from the main flowchart.
→ Ensure to include log messages at critical points to indicate the state of the process.
→ Use Try Catch, Throw, and Rethrow activities to handle exceptions effectively.
→ Use the arguments to pass the data from one workflow to another workflow. In your case, pass the CSV file path from Workflow1 to Workflow3.
→ Variable and argument names should follow camel case notation, for example, “VarName”.
→ As suggested above, use the Invoke Workflow File activity to integrate the Process1, Process2, and Process3 workflows into the main workflow.
As an alternative, you could also leave these as separate processes and then create a “master” process that coordinates between the three by calling them with either the Invoke Process, the Run Parallel Process or the Start Job activity. There are pros and cons to each of these three that I have outlined here: chrikrah/uipathProcessChainingDemo
Advantage of this approach would be that you could potentially re-use the distinct projects/processes in other contexts.
Approach 1: Create a Single New Project and use that 3 process as sequence one by one. Approach 2: Use Invoke Process Activity to call Process 2 and Process 3 at last of Process 1. So we need to call only the First Process and other two call itself inside the First Process.
Don’t.
As mentioned by @Chris_Krah you can make whats called an Orchestration Process.
You can then start each of the ‘child’ processes either via adding a queue item or starting the jobs and using persistence to suspend the orchestration job.
This is a much stronger design pattern than combining them into one robot.