Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "Comment": "Ats-Athena",
- "StartAt": "AtsState",
- "TimeoutSeconds": 10,
- "Version": "1.0",
- "States": {
- "AtsState": {
- "Type": "Task",
- "Resource": "function:Ats",
- "Next": "ChoiceState",
- "TimeoutSeconds": 5,
- "HeartbeatSeconds": 2,
- "DataInputMode": "Stream",
- "InputPath": "$.input",
- "ResultPath": "$.atsrst",
- "OutputPath": "$.atsrst",
- "Retry": [
- {
- "ErrorEquals": ["States.Timeout"],
- "IntervalSeconds": 0,
- "BackoffRate": 0,
- "MaxAttempts": 1
- }
- ],
- "Catch": [
- {
- "ErrorEquals": ["States.ALL"],
- "Next": "TaskFailState"
- }
- ]
- },
- "TaskFailState": {
- "Type": "Fail",
- "Error": "States.TaskFailed",
- "Cause": "Task Failed!"
- },
- "ChoiceState": {
- "Type" : "Choice",
- "OutputPath": "$.text",
- "Choices": [
- {
- "Variable": "$.ret",
- "NumericEquals": 0,
- "Next": "AthenaState"
- },
- {
- "Not": {
- "Variable": "$.ret",
- "NumericEquals": 0
- },
- "Next": "AtsErrorState"
- }
- ],
- "Default": "DefaultState"
- },
- "AtsErrorState": {
- "Type": "Fail",
- "Error": "AtsError",
- "Cause": "Ats Error Occurs!"
- },
- "DefaultState": {
- "Type": "Fail",
- "Error": "DefaultStateError",
- "Cause": "No Choice Matches!"
- },
- "AthenaState": {
- "Type": "Task",
- "Resource": "function:Athena",
- "End": true,
- "TimeoutSeconds": 5,
- "HeartbeatSeconds": 2,
- "ResultPath": "$.output",
- "OutputPath": "$.output",
- "Retry": [
- {
- "ErrorEquals": ["States.Timeout"],
- "IntervalSeconds": 0,
- "BackoffRate": 0,
- "MaxAttempts": 1
- }
- ],
- "Catch": [
- {
- "ErrorEquals": ["States.ALL"],
- "Next": "TaskFailState"
- }
- ]
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement