Flow Studio
Update Entity Node
Patching an existing business entity — the EntityUpdateNode patch map, optimistic concurrency with expectedVersion, and conflict handling.
Node Configuration
{
"nodeType": "EntityUpdate",
"name": "approveInvoice",
"config": {
"entityType": "invoice",
"entityId": "$output.fetchInvoice.entityId",
"patch": {
"status": "approved",
"approvedBy": "$context.actorId",
"approvedAt": "$now.toISOString()",
"approvalNotes": "$output.reviewDecision.notes"
},
"expectedVersion": "$output.fetchInvoice.data._version",
"failOnConflict": true
}
}
Patch Semantics
The patch map is a partial update — only the specified fields are modified. Fields not in the patch are left unchanged. This is equivalent to HTTP PATCH behavior. To clear a field, set its value to null explicitly.
Optimistic Concurrency
Set expectedVersion to the entity's current version number (from a prior read) to enable optimistic concurrency. If another process has updated the entity since you read it, the update will be rejected with a conflict error:
// Error port output on version conflict:
{
"error": "Optimistic concurrency conflict: entity version mismatch",
"entityId": "inv-00123",
"expectedVersion": 3,
"actualVersion": 4
}
Node Output
{
"entityId": "inv-00123",
"entityType": "invoice",
"data": {
"status": "approved",
"approvedBy": "usr-a1b2c3",
"approvedAt": "2026-05-25T10:00:00.000Z"
},
"version": 4,
"updatedAt": "2026-05-25T10:00:00.000Z"
}
Status state machine: Use
EntityUpdateNode to advance entity status through a state machine (draft → submitted → approved → paid). Pair with a PermissionCheckNode before the update to enforce who can make each transition.