Process queue item then defer

Hello all,

Can we process queue item to reach a condition then defer it until this condition met .

BR/HAZEM

1 Like

In UiPath, you can process a queue item, defer it until a condition is met, and automatically reattempt.

@Hazem_Saleh

  1. Processing Queue Item: Use the Get Transaction Item activity to retrieve a queue item, process it, and check if the condition is met.
  2. Conditional Check: Evaluate whether the condition you’re looking for is met or not. If it is met, continue with the process. If not, proceed to the next step.
  3. Deferring the Item: If the condition is not met, use the Set Transaction Status activity to defer the queue item. Specify a future date and time when you want to retry processing the item.
  4. Reattempting: Configure your workflow to periodically check the queue for deferred items. When the specified future time is reached, the item will be automatically retried.

@Hazem_Saleh

1 Like

To defer an item, use the Postpone Transaction Item activity.

I think Set Transaction Status does not support setting a postpone date.

Yes, you can process a queue item to reach a condition and then defer it until the condition is met in UiPath.

Here is an example:

  1. You have a queue of invoices that need to be processed.

  2. You want to defer the processing of any invoices that are missing a required field by these ways
    a. here you can either postpone the queue item
    Or
    b. move it to another queue itself as a new item
    Or
    c. move it to action Center as a task so that once details provided bot can resume to process that queue item

  3. You can use the following sample pseduocode

// Get the queue item
QueueItem queueItem = GetQueueItem()

// Check if the queue item has the required field
if (queueItem.HasRequiredField)
{
    // Process the queue item
    ProcessQueueItem(queueItem)
}
else
{
    // Defer the queue item until the required field is populated
    DeferQueueItem(queueItem)

}

The DeferQueueItem activity allows you to specify the date and time at which the queue item should be postponed or reprocessed.
Or You can also specify a condition that must be met before the queue item is reprocessed as suggested above in point 2

Here is a scenario where you might use this approach:

You have a queue of customer orders that need to be processed. However, the orders cannot be processed until the customer has made the required payment. You can use the DeferQueueItem() activity to defer the processing of any orders until the payment has been received.

Once the customer has made the payment and confirmed, you can use a UiPath trigger to reprocess the queue item. For example, you could create a trigger that is fired when the customer’s payment status changes to “Paid”.

Cheers @Hazem_Saleh

1 Like

Thanks alot,

If the item has four steps ABCD, and in C i did the defer when i pick the item again can i have start point C? in aother platform we had tags and based on the tag you can skip or Start for example its tag C will skip A and B…

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