Retrieve the ExecutorJobId

Hello,

Is there a way to extract the ExecutorJobId field(QueueItems datatable in the Orchestrator DB), for a given Queue Item via the Orchestrator API?
The field is not part of the QueueItemDTO so I’m wondering if there is another way to get it.

Kind regards,
Andrei

1 Like

Hey @andrei.lazar

You mean to say - To get the Job ID with which the queue item processed ?

Thanks
#nK

Hi @Nithinkrishna,

Indeed. :slight_smile:

1 Like

Hey @andrei.lazar

This is possible but not straight forward. It’s just a bit indirect way of referencing parameters.

So let me put the steps here which you may try…

  1. Find the ID of the Queue item - Transaction item of the key

image

  1. Filter the robot or job logs with this key present

image

  1. In the same log metadata you can find the job ID

image

If you need to more help on this please post here.

Kindly note this will only work if the Transaction ID is dumped in the log fields, Assuming we do this as a best practice for all the transactional process

Thanks
#nK

1 Like

Hey @Nithinkrishna,

That sounds like a solid approach!
Unfortunately, I am working with 150+ projects and I’m certain not all of them have the transactionId logged.

I was thinking of an approach where I correlate the StartTime of a QueueItem with the StartTime of a Job, and check if they were running on the same robot. Both DTOs contain the Robot Id where they were run.

Mostly, I was looking for a way to do this… cleanly. I’m building something from scratch and I don’t wanna introduce “workarounds” in my work already. :slight_smile:

All the best,
Andrei

1 Like

Cool Thanks for sharing your approach as well.

Useful to know.

Thanks
#nK

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.