Skip to content

Postpone Transaction

Type: queue-postpone-transaction  ·  Package: Queue Activities v1.2.9

Defers an item you’re processing: it moves it from in_progress back to new and sets a moment from which it can be handed out again. Unlike a failure, it doesn’t count as an attempt (it subtracts one from the Attempts counter), so it doesn’t use up retries.

It’s for when the item can’t be processed now, but can later: a system under maintenance, a document that isn’t available yet, a time window. Instead of failing, you postpone it and another bot (or the same one) will pick it up later.

  1. Checks that the item is in_progress and locked by this execution.
  2. Moves it to new, releases the lock, stores deferUntil and subtracts one attempt.
  3. No performer receives it before deferUntil; after that it’s handed out again according to its priority.
ParameterTypeDefaultDescription
itemZoanQueueItem—The item returned by Get Queue Item (or a dictionary with its id).
deferUntilstring—ISO 8601 date and time in UTC (with Z) from which the item can be handed out again. E.g.: utcNow().AddHours(1).ToString("o").

None.

This activity does not return a value.

MessageCause and fix
'item' is required. / 'deferUntil' is required.A required parameter is missing.
'item' must be a ZoanQueueItem or an object with an 'id' field.item isn’t the queue item. Pass the output of Get Queue Item.
… HTTP 422: …deferUntil isn’t an ISO 8601 date in UTC (for example, it has a -05:00 offset or the local format). Use utcNow()…ToString("o").
… HTTP 400: …Cannot postpone an item in status '…'The item is no longer in_progress (it was already closed or postponed).
… HTTP 400: …This item is not locked by your executionAnother execution holds the item (for example, because the lock expired and another robot took it).
… HTTP 404: …Queue item not foundThe item doesn’t exist in the environment.

Zoan Cloud errors arrive with the prefix “Could not postpone the item: ”.

If the supplier portal is under maintenance, defer the item by one hour:

If condition = portalUnderMaintenance
└─ then:
Postpone Transaction
item = item
deferUntil = utcNow().AddHours(1).ToString("o")