UNPKG

@wmfs/statebox

Version:

Orchestrate Node functions using Amazon States Language

34 lines (33 loc) 650 B
{ "Comment": "A simple calculator", "StartAt": "OperatorChoice", "States": { "OperatorChoice": { "Type": "Choice", "Choices": [ { "Variable": "$.calc.operator", "StringEquals": "+", "Next": "Add" }, { "Variable": "$.calc.operator", "StringEquals": "-", "Next": "Subtract" } ] }, "Add": { "Type": "Pass", "Result": "add", "ResultPath" : "$.result", "End": true }, "Subtract": { "Type": "Pass", "Result": "subtract", "ResultPath" : "$.result", "End": true } } }