Skip to content
Proud to collaborate with Microsoft for Startups

control.switch.select ​

Map a value to a branch label via a cases table (with optional default)

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-control
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
valuejsonYes——
casesjsonYes——
defaultjsonNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
valuejsonNo——
casesjsonNo——
defaultjsonNo——
matchedjsonNo——
is_defaultbooleanNo——
foundbooleanNo——
matched_keyjsonNo——
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.switch.select",
  "initial_data": {
    "value": "value",
    "cases": "value"
  }
}