How to trigger a process after completion of another process in multibot scenario

Process A runs on multiple bots (using queue).
Process B should trigger only when Process A completes on all machines.

We can put a time trigger but completion of Process A depends on the volume received, hence this didn’t work for me.

Please help me with your suggestions to set up a trigger in this scenario.

Thanks :blush:

@Akshi you can use get jobs to get the count of running jobs. Use an if condition to determine last job of process A and that job would trigger Process B using start job activity

@Akshi this is a idea and if you reasech you will find more solution on it

Approach 1: Queue-Based Trigger with Completion Flag

  1. Process A Design:

    • Modify Process A to write a completion flag (e.g., a boolean variable) to a designated queue item after processing each item.
    • Update the processing logic for each item in Process A to set the flag to True upon completion.
  2. Queue Trigger for Process B:

    • Create a queue specifically for triggering Process B.
    • In Orchestrator, configure a queue trigger for Process B that monitors the completion flag queue.
  3. Trigger Condition:

    • Set the trigger condition to fire Process B only when a new item with the completion flag set to True is added to the queue. This ensures Process B starts only after all items in Process A have been processed on all machines.

Tried this but it doesn’t work as process B has to utilize one of the machines on which process A is working on.
Also the modern start job activity doesn’t let us specify the machine.

Thanks Mukesh for your response.

How to ensure that we have completion flag is set to true only when all the items on all machines are “completed”.
I was trying this additional queue approach but faced issue in triggering it only when all items are completed on all machines.

The number of bots can vary as per volume recieved by the Bot.

Note: The machine which process B has to use is one of the machines that process A is utilizing. We don’t have extra machine.

Try Orchestrator http request to specify machine id. They key is Machine SessionIds.

the end part of Process A should look like this. If they end together stagger them using random delay.

image
image

1 Like