Deadline and Set Transaction In Add Queue Item

Hello All,

I am having bunch of things to ask on Queue in Orchestrator, if anyone can help with it.

  • Deadline Property: So I have pushed a data to Queue with setting up a deadline at 2 min from now (DateTime.Now.AddMinutes(2)). Now when I am running another flow to get the transaction item after two minutes, it is still able to fetch the queue item from orchestrator even if deadline is passed. I believe it should not pick as deadline passed. I am not sure, If I am doing it right or not. As I read in Ui Path documentation. Deadline is “The date before which the queue item should be processed”
    File For Reference: testCheckQueue.zip (17.3 KB)

  • Can not we set the transaction status back to “New” ? I can see only we can set it to Success and Failure. Is there any way?

  • I have an instance that, if bot is running on 25th Dec, then as processor it will process some data for 24th Dec (Just a day before it - 24th is added as Queue Item). Now for example, when the bot ran on 25th Dec, it picked queue item as 24th Dec, but while processing there is no data to process. So here is the catch, that on 26th Dec it will process two dates i.e. 25th Dec (Just before that day) and 24th as well (because on 25th bot has not anything to process). So my idea is when bot runs 25th Dec it will add queue item as 24th Dec with some deadline of 2 days. it will start processing and suppose nothing to process for 24th, as we have added deadline when bot run tomorrow i.e. 26th, it will add queue item as 25th Dec and already we are having queue item as 24th Dec. So it will process both queue items. Is it not possible?

@Palaniyappan @theerthaks @lazarand

@loginerror @Lahiru.Fernando @ppr - Any help will be highly appreciated.

I believe this is a small misunderstanding of what Deadline means. I think it only affects the priority in which the queue items will be processed. As per below documentation bit:

Shortest deadline will be processed first.

You can fail it and, depending on the Retry settings of the queue, it will be retried automatically.

As far as the last question, I didn’t fully get your scenario :sweat_smile:
A visual representation of what you are after would help a lot here I think :slight_smile:

2 Likes

Right - I misunderstood. The link which you have provided is having much clear picture than, documentation I was referring. Correct me If I am wrong in my below understanding.

  • If I have set a deadline, then it will process high priority task first within that deadline.
  • If two task is having same priority, then it will process the task having earlier deadline.

No Worries. I got a solution to that and tested. It worked for me anyways. Thank You.

1 Like

Your understanding is correct.

2 Likes

Okay Thank you @loginerror.

Marking it as solution.

Solution/Findings on Deadline On Queue Item:

  • If I have set a deadline, then it will process high priority task first within that deadline.
  • If two task is having same priority, then it will process the task having earlier deadline.
  • For More Details Follow the link: About Queues Transaction : Processing Order

Finding on Set Transaction:

  • You can fail it and, depending on the Retry settings of the queue, it will be retried automatically.
  • We can only set success and Failed, nothing else on the set transaction activity.
2 Likes

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