Cancel running job with other trigger

I have two processes, both using RE Framework.
The processes is triggered when a queueitem on separare queues.
So process 1 is trigged by queue 1.
Process 2 is trigged by queue 2.

Item comes in batches to queue 1, so it can easily be 500 queueitems on queue 1.
This takes about one hour to process.

What I would like is if an item is placed on queue 2 during this time, that process 1 is stopped and process 2 can do it’s work. Then process 1 can continue to dequeue.
Is it possible to send a stop-signal to process 1 when an item is put on queue 2?

I have tried setting priority on queue-items but it doesn’t stop process 1 from running.
I have also tried priority on the processes in Orchestrator, but it still doesn’t stop process 1 from running.

Anyone have any idea?

1 Like

Perhaps you could put Q2 process inside your Q1 loop. If Q2 trigger, then do Q2 stuff until complete. Then it will resume Q1 iteration.

Yes this might work.
But I was kind of hoping for a more generic solution so I don’t have to modify process 1 if same need is needed for another process to be able to break processing of process 1.

But thanks for your reply, that will solve my problem right now :slight_smile:

Almost managed to solve the problem.
Found out that I can make API call to Orchestrator from Process 1 to see if there is any queue items on any queue that has priority = High
If found, I can stop processing Process 1 and let Process 2 do it’s work.

Only problem now is how I should get Process 1 running again to continue process queueitems om queue 1.

Using the same logic, if you send the api call and run Process2, then can you send something back to Process 1 (notification or variable value) where it will resume once value or condition is met?