LogicIf
- Step kind
- Branch
- Case
- GreaterThan: Read.Amount, 500
- Then
- Wait
- Else
- (continue)
Inputs
- Casescase[]Required
- Tested in order; the first case whose condition holds is taken.
- WhenconditionRequired
- An expression over the run’s values, or a Judge question.
- Thenstep[]Required
- The steps this case runs.
- Elsestep[]
- The steps run when no case holds. Where absent, the flow moves on.
- Outputoutput contract
- What the taken path’s last value is narrowed to.
- AttemptsintegerDefault
1 - How many tries a Judge question whose reply fails may take.
- OnExhaustedpolicy
- What happens when those attempts run out.
Outputs
- <last value>any
- The last value the taken path produced, under the branch’s name. Where no case holds and there is no Else, the branch produces nothing and the flow continues.
Conditions
Example
- Branch: Check
Cases:
- When: { GreaterThan: { Field: Read.Amount, Value: 500 } }
Then:
- Wait: Approve
Operation: Clarification
Question: This refund is over $500. Approve it?
- When: { Judge: { Prompt: Does the request mention fraud? } }
Then:
- Wait: Review
Operation: Clarification
Question: This refund request mentions fraud. Should it go ahead?Decided onceThe case taken is recorded as
branch.taken. A turn that is resumed later follows the recorded case instead of testing the conditions again.