UNPKG

@wmfs/statebox

Version:

Orchestrate Node functions using Amazon States Language

33 lines 657 B
{ "Comment": "A simple calculator", "StartAt": "OperatorChoice", "States": { "OperatorChoice": { "Type": "Choice", "Choices": [ { "Variable": "$.operator", "StringEquals": "+", "Next": "Add" }, { "Variable": "$.operator", "StringEquals": "-", "Next": "Subtract" } ] }, "Add": { "Type": "Task", "Resource": "module:add", "ResultPath" : "$.result", "End": true }, "Subtract": { "Type": "Task", "Resource": "module:subtract", "ResultPath" : "$.result", "End": true } } }