When running a workflow validate that the state-machine input is valid JSON. We were a little lax with specs passing Hashes in for convenience but it isn't hard to ensure we're passing JSON in to context input.
When running with ASL passing invalid input:
$ aws stepfunctions --endpoint-url http://localhost:8083 start-execution --state-machine-arn arn:aws:states:us-east-1:123456789012:stateMachine:Pass --input 'foo'
An error occurred (InvalidExecutionInput) when calling the StartExecution operation: Invalid State Machine Execution Input: 'Unrecognized token 'foo': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
at [Source: (String)"foo"; line: 1, column: 4]'
With this PR:
$ exe/floe examples/workflow.asl 'foo'
Invalid State Machine Execution Input: unexpected token at 'foo': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
When running a workflow validate that the state-machine input is valid JSON. We were a little lax with specs passing Hashes in for convenience but it isn't hard to ensure we're passing JSON in to context input.
When running with ASL passing invalid input:
With this PR: