Settings: Item sync
Copies tasks to your application's database.
off restart to apply
Its settings are kept while it is off; they apply when it is on.
- What it is
- A message, not a table and not a function call: each time a task changes, OWF sends a snapshot of it to your application. Your application writes it into its own database, in its own table.
- Sent when
- an item starts, waits, is assigned or reassigned, ends, or is cancelled
- every user task by default; the filter (itemSync.items) picks others: by type, model, element and change, with * wildcards
- Sent to
- a webhook: https://…
- a connector: <connector>/<operation>
- a queue
Through the Messaging add-on, with retries: both must be on.- What is sent
- The whole item, each time: its state, assignee and candidates, dates, priority, the instance's version, and only the case fields you name (itemSync.data).
{ "kind": "item", "changes": ["start", "wait"], "itemId": "…", "instanceId": "…", "instanceVersion": 7, "processName": "Leave", "elementId": "Approve", "type": "bpmn:UserTask", "status": "wait", "assignee": null, "candidateGroups": ["People Manager"], "dueDate": null, "priority": null, "startedAt": "…", "endedAt": null, "data": { "requester": "…", "days": 3 } } - Your table
- Yours: its shape, where it is, who may read it. OWF holds no copy and writes no schema. One row an item, written by itemId; apply a snapshot only if it is not older:
UPDATE tasks SET … WHERE itemId = @itemId AND version <= @instanceVersion
- Keep in mind
- at least once, possibly out of order: hence the version check
- eventually consistent: after an action, show the API's answer for that case; use the copy for lists
- read-only: a claim, an assignment or a completion goes to the API and comes back as the next snapshot
- the copy is outside OWF's access rules: your queries decide who sees which task
- deleting a case or an item is not sent yet
- Set up
- In app-contract.json (the same in every environment), with "addOns": ["messaging", "itemsync"] in app-config.json:
"itemSync": { "to": { "webhook": "REPLICA_URL" }, "items": ["userTask"], "data": ["requester", "days"] }
Sends to
Nowhere yet: no item is sent until a destination is set.
It delivers through the Messaging add-on, which is off.
No settings of its own.