Workflow Nodes Dictionary
Workflows are directed graphs. Every node MUST have an Id and a Type. Linear nodes use NextNodeId. Branching nodes use DefaultTargetNode and Rules.
Below are the JSON configurations for the most common node types. Note that the visual Studio automatically generates PositionX and PositionY properties inside Configuration for rendering purposes.
1. Start
The entry point.
{"Id": "start", "Type": "Start", "NextNodeId": "node_2"}
2. DecisionSplit
Synchronous branching based on conditions. First match wins.
{"Id": "split_1", "Type": "DecisionSplit", "DefaultTargetNode": "node_default", "Rules": [{"Condition": "@Entity.Total > 100", "TargetNode": "node_high"}]}
3. InclusiveSplit
Asynchronous forking. Executes ALL branches where the condition is true in parallel.
{"Id": "split_incl", "Type": "InclusiveSplit", "DefaultTargetNode": "node_default", "Rules": [{"Condition": "@Entity.Category == \"VIP\"", "TargetNode": "node_vip"}]}
4. Join
Barrier synchronization. Pauses until all expected incoming parallel branches have arrived before continuing to NextNodeId.
{"Id": "join_1", "Type": "Join", "NextNodeId": "node_next"}
5. WaitByDuration
Pauses execution. Format is d.hh:mm:ss.
{"Id": "w_1", "Type": "WaitByDuration", "NextNodeId": "node_2", "Configuration": {"Duration": "1.00:00:00"}}
6. WaitForUserAction
Suspends the flow and generates a task in the Struktural_Sys_WorkflowTask table. Actions MUST be a stringified JSON array.
{"Id": "tsk_1", "Type": "WaitForUserAction", "NextNodeId": "node_2", "Configuration": {"TaskTitle": "Approve {{Name}}", "Assignee": "\"Admin\"", "Actions": "[{\"Name\":\"Approve\",\"Style\":\"success\"}]", "TargetField": "Variables.ApprovalResult"}}
7. RunCustomAction
Executes a C# Script bound to the entity (e.g., Order_Action_CalculateTaxes.cs.script).
{"Id": "act_1", "Type": "RunCustomAction", "NextNodeId": "node_2", "Configuration": {"ActionName": "CalculateTaxes"}}
8. UpdateRecord
Modifies physical database fields safely.
{"Id": "upd_1", "Type": "UpdateRecord", "NextNodeId": "node_2", "Configuration": {"Fields": [{"Name": "Status", "Value": "\"Approved\""}]}}
9. CallExternalApi
Invokes a configured REST endpoint. ServiceName and EndpointName must match the schema definitions exactly.
{"Id": "api_1", "Type": "CallExternalApi", "NextNodeId": "node_2", "Configuration": {"ServiceName": "Stripe", "EndpointName": "Charge", "PayloadVariable": "Entity"}}
10. CallSubWorkflow
Spawns a child process and pauses the parent until the child exits. Maps variables in and out.
{"Id": "sub_1", "Type": "CallSubWorkflow", "NextNodeId": "node_2", "Configuration": {"TargetWorkflowId": "wf_other", "InputMappings": "[{\"Target\":\"ChildVar1\",\"Value\":\"@Entity.Id\"}]", "OutputMapping": "{\"Source\":\"ChildOut\",\"Target\":\"Variables.ParentVar\"}"}}
11. GenerateReport
Generates an Excel or PDF report from a stored definition, stores the resulting Struktural_Sys_File ID in the Target Variable.
{"Id": "rep_1", "Type": "GenerateReport", "NextNodeId": "node_2", "Configuration": {"ReportName": "InvoiceReport", "ContextFilter": "Id == {{Entity.Id}}", "TargetVariable": "Variables.FileId"}}