Add Transaction Item
Add Transaction Item
Section titled “Add Transaction Item”Type: queue-add-transaction-item · Package: Queue Activities v1.0.0 · Output: ZoanQueueItem
Adds an item to a work queue and returns it already in_progress, locked for the current execution — add + start in a single step. It is for flows where the same bot creates the work and processes it in the same execution, keeping the queue’s traceability and retries.
How it works
Section titled “How it works”Unlike Add Queue Item —which leaves the item in new so that another performer takes it later—, this activity creates the item directly in in_progress and reserves it for you: it doesn’t go through new or review. You get it ready to process.
Like any transaction, you must close it: when you finish, mark the result with Set Transaction Status (successful or failed). If you don’t, the item stays in_progress until its lock expires.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
queueName | expression | Queue name. It must exist in the execution environment. |
specificContent | dictionary | The payload: data mapped as key → value (literals or expressions). You read it with = item.SpecificContent["my_field"]. |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
reference | expression | Optional reference for traceability. |
priority | list | high, normal or low. Default normal. |
Output
Section titled “Output”Returns a ZoanQueueItem in in_progress state and locked for this execution, ready to process and close.
Example
Section titled “Example”Create a transaction, process it and close it in the same flow:
Add Transaction Item queueName = "reprocesos" specificContent = { "facturaId": = factura.numero, "motivo": "revalidación manual" } → output: item
Try └─ body: (… process = item.SpecificContent["facturaId"] …) Set Transaction Status item = =item status = successful └─ catch (err): Set Transaction Status item = =item status = failed exception = { "message": = err.Message }Related activities
Section titled “Related activities”- Set Transaction Status — close the transaction (required).
- Add Queue Item — enqueue work for another performer to take.
- Get Queue Item — take the next item from the queue.
- Process Queue — process the whole queue in a loop.