Skip to content
Proud to collaborate with Microsoft for Startups

control.flow.guard ​

Assert a condition; pass through if it holds, else fail the branch with a reason

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-control
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
ajsonYes—Left-hand value to test before allowing the branch to continue.
opstringYes—Guard operator: eq, ne, in, not_in, truthy, falsy, gt, gte, lt, lte, contains, not_contains, regex, is_null, or not_null.
bjsonNo—Right-hand comparison value for binary guard operators.
reasonstringNo—Failure reason to emit when the guard condition is false.

Output Schema ​

FieldTypeRequiredDefaultDescription
ajsonNo—Left-hand value echoed from input.
opstringNo—Guard operator echoed from input.
bjsonNo—Right-hand value echoed from input.
reasonstringNo—Failure reason echoed from input when supplied.
passedbooleanNo—True when the guard condition passed.
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "control.flow.guard",
  "initial_data": {
    "a": "value",
    "op": "value"
  }
}