Skip to content

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.

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.

ParameterEditorDescription
queueNameexpressionQueue name. It must exist in the execution environment.
specificContentdictionaryThe payload: data mapped as key → value (literals or expressions). You read it with = item.SpecificContent["my_field"].
ParameterEditorDescription
referenceexpressionOptional reference for traceability.
prioritylisthigh, normal or low. Default normal.

Returns a ZoanQueueItem in in_progress state and locked for this execution, ready to process and close.

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 }