Automated triggering of flows to decrease time gaps

i have 2 flows , which run independently , time triggered at same time (say 9AM),create one excel file each and add queue items to one common queue , like:

WF1 - creates abc.xlsx and uploads queue items to a queue “Q1”
WF2 - creates def.xlsx and uploads queue items to a queue “Q1”

Now another flow (WF3) needs to run which will have to read both the files “abc.xlsx” and “def.xlsx” , and process the queue items of “Q1”

while working I found that WF1 and WF2 each take random amount of time to complete , which ranges from 2 min to 30 min ,
So I assumed that after 30 min both flows will be completed and I use a time based trigger for WF3 to start at 9:30AM ,
The problem is on some days both WF1 & WF2 are completed in 5 min and the WF3 starts after 25 min , so we are having a gap of 25 min , is there a way to start WF3 once both WF1 and WF2 are completed
Note: in some cases the robot running WF1 or WF2 is either not running or faulted so in such situation WF3 should run if any queue items are present in Q1 with the available file “abc” or “def” , so I am not able to use queue based triggers here
Any suggestions :slight_smile:

Hello @saurabhB ,

Here can you try with Invoke process activity?.. If you complete the first process of loading the data to queue, then you can use invoke process activity in the same workflow to trigger an another process.

Hi @saurabhB,

You can shcedule each of them one minute apart. Orchestrator makes them wait in line for you.

My preference is to add items to the queue of the 3rd process when the second process is completed. I set the 3rd process to run when the item is added to the queue. (trigger schedule)


say WF1 got completed then WF3 will get started , but if by that time WF2 has not completed then WF3 will use only the file created by WF1(abc.xlsx) but the file def.xlsx will not be read or used , making the outputs incorrect

according to my business need i have to start WF1 and WF2 at the same time,

I don’t know which workflow(WF1 or WF2) will complete first and if I add queue item (for queue trigger) in each then it may work , but in situation when one device running WF1 orWF2 is not working or faulted then the queue item will never reach 2 so the WF3 will never be triggered

Hello @saurabhB

Why dont you create 2 workflows , first workflow: invoke wf1 &wf3
2nd workflow: invoke wf2 & wf3

If you trigger both these then all your queue items will get processed. Also for the processing how much time it will take??

the WF3 needs to use both the files abc.xlsx and def.xlsx (if present), and process the common queue items (and WF3 is a multi bot flow which will run on many devices and consume the common queue)
So I cant combine WF1 & WF3 into a single workflow or WF2 and WF3 into single one

Set it to addtoqueue to W3 at the end of W1 and W2. Set the reference of the item added to W3 to be the current short date. Make sure it is marked unique when creating the W3 queue.

This way whichever of W1 or W2 ends will trigger W3. Only one of W1 and W2 manages to add items to W3’s queue.


whao , thanks that’s a new concept(idea),

I created a new queue trigger , with “Enforce unique references” , “Minimum number of items to trigger the first job.”=2

and added “add queue item” at ending of each WF1 and WF2 ,
the WF3 was triggered when both WF1 and WF2 got ended

but when WF1 got completed correctly but WF2 had some(irresistable error-my robot devices/vdi are not so reliable they sometimes become unresponsive in between execution) and did not complete running ,the add queue item was not executed in WF2,
so there is 1 queue item in the trigger queue, and WF3 did not run ever

please suggest me some way to start WF3 at a threshold like even after 30 min if WF1/WF2 didn’t work then WF3 should start

Sorry for the late return.I assume you have implemented this idea.

Add add to queue to your W3 project. Let the reference field be the short date of the day. In addition to triggering W3 with trigger, add the trigger as a program. (You can schedule it right after W1 and W2.)

Even if W1 and W2 do not work, this scenario can start by adding to the queue when the W3 process starts.

If any of W1 or W2 works, W3 will start with trigger. Starting with the schedule, the queue will end by not adding because there is a transaction item on the date of the day.


Hey @saurabhB

Queue based triggers are the best option to go with in this case.

But sorry I don’t understand the point why you said it’s not an option here…