Postpone Transaction
Postpone Transaction
Section titled “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.
How it works
Section titled “How it works”- Checks that the item is
in_progressand locked by this execution. - Moves it to
new, releases the lock, storesdeferUntiland subtracts one attempt. - No performer receives it before
deferUntil; after that it’s handed out again according to its priority.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
item | ZoanQueueItem | — | The item returned by Get Queue Item (or a dictionary with its id). |
deferUntil | string | — | 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"). |
Optional parameters
Section titled “Optional parameters”None.
Output
Section titled “Output”This activity does not return a value.
Common errors
Section titled “Common errors”| Message | Cause 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 execution | Another execution holds the item (for example, because the lock expired and another robot took it). |
… HTTP 404: …Queue item not found | The item doesn’t exist in the environment. |
Zoan Cloud errors arrive with the prefix “Could not postpone the item: ”.
Example
Section titled “Example”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")Related activities
Section titled “Related activities”- Get Queue Item — take the item.
- Set Transaction Status — close the item as success or failure.