选择状态未指向下一状态-AWS

时间:2018-12-20 12:41:29

标签: json amazon-web-services choice aws-step-functions

我具有以下步骤功能。在选择状态下执行失败。

"States": {
    "Process": {
        "Type": "Task",
        "Resource": "arn:aws:lambda:us-east-1:123:function:dummy1",
        "OutputPath": "$",
        "Next": "ChoiceStatePre"
    },

    "ChoiceStatePre": {
        "Type": "Choice",
        "Choices": [{
            "Variable": "$.status_pre",
            "Next": "Series0",
            "NumericEquals": 1
        }, {
            "Variable": "$.status_pre",
            "Next": "MatchStatePre",
            "NumericEquals": 8
        }]
    },
    "MatchStatePre": {
        "Type": "Task",
        "Next": "PreProcess",
        "Resource": "arn:aws:states:us-east-1:123:activity:dummy2"
    },
    "Series0": {
        "Resource": "arn:aws:lambda:us-east-1:123:function:dummy3",
        "Type": "Task",
        "InputPath": "$.seq0.step0",
        "ResultPath": "$.seq0.step0",
        "OutputPath": "$",
        "Next": "ChoiceStateTrigger0"
    }
}

错误-

{
"error": "States.Runtime",
"cause": "An error occurred while executing the state 'ChoiceStatePre' 
(entered at the event id #7). Failed to transition out of the state. The 
state does not point to a next state."
}

我已经有一个下一个状态,但是错误表明选择状态未指向任何下一个状态。

1 个答案:

答案 0 :(得分:2)

在查看“ ChoiceStatePre”时,没有看到默认状态。看来是此失败的根本原因。请添加默认状态,然后重试。 像这样:

“ DefaultState”:{   “类型”:“失败”,   “ Cause”:“没有匹配项!” }

相关问题