Workflows
The Benevia platform can do multiple OData calls without saving changes between calls. This allows the client to make incremental changes and get real-time business logic modifications. For example: When entering a quantity and a product on a sales order, the business logic computes the prices and the total of the order. With workflows, the user can see these values change as he enters data into the sales order.
Lifecycle of workflow: Create workflow → Multiple OData queries → Commit
Create workflow:
POST /API/workflow{ "message": "Workflow created successfully", "workflowId": "a0d77a58-b208-46ce-b7f6-ddb03b89a6af" }Do multiple OData queries such as
GET,PATCHorPOSTwith these headers:Workflow-Id: 1c9f2f65-7d3c-4f6b-b0d1-a2efa4a56c0dWorkflow-Index: 1Increment the index with each queryTo return updated data in your
PATCHquery, use$selectand$expandparametersCommit workflow
/api/workflow/commitwith the above headers
Virtual entities are supported — within a workflow they stage in memory and commit atomically. See Virtual Entities › Workflows.
//TODO: More documentation needed to explain workflows