Synchronize StartTransaction and GetTransactionItem


#1

Hello guys ,
how to synchronize the Api Orchestrator with the StartTransaction method and the GetTransactionItem ?

i need hepl.


#2

Can you elaborate? What kind of sync do you want to achieve?


#3

Hello @andrzej.kniola,

I mean that when the Api Orchestrator StartTransaction sends data to the queue, it triggers the process starting with the GetTransactionItem to be able to use the data sent by the Api.
I am waiting for your reply.


#4

Still not sure - so you want to start a robot job when something is added to the queue through an API call?
If so, that’s not directly possible. You could schedule a periodical robot to check the queue or send a start job call as well. Or check if its running and if not send start.


#5

hi @andrzej.kniola,
Is there a way to put the robot to listen to the queue for starting the process by receiving data?


#6

Not any I know of that would be straightforward to use and not require external components to call the actual start.
You can make it sleep (delay for x amount of time) in a loop/state machine (GetTransactionItem -> null? wait : process), but from usage perspective it’s still considered a running job then.


#7

Hi,

One workaround for this would be to schedule the robot that uses GetTransactionItem to run at intervals. then it can run check if items exist in the queue, if not it can then stop until next scheduled run,if it finds items it can then handle them.

How often you want to schedule the robot depends on your queue volumes and rate of inflow.


#8

Hi,
thx for replies.
@jakelewis18 to answer what we want the maximum frequency should be one seconde.


#9

Hey,
@papaass.

If you are receiving an item into the queue every second and your GetTransactionItem process takes longer than 1 second then you wouldn’t need to schedule as you could just keep looping through the queue without running out of items theoretically.

So you should be fine to add items to the queue and get them simultaneously without issue and without the one stopping.

You might want to use scheduling between times where the inflow may be higher than your secondary process however just to make sure that the items are still being picked up.

Hope that helps.


#10

As i known, StartTransaction API can be called by external system and it will add a new data with status = In Progress to Queue.
But GetTransactionItem activivty cannot get the data with status = Inprogress, so i think the added data will be processed by other API only, it cannot be processed by other UiPath robot with GetTransactionItem activity.
Please correct me if it’s wrong.