0

我是状态机,我正在使用。

$.Executions[?(@.ExecutionArn!='arn:aws:states:<region>:<account-id>:execution:<state-machine-name>:<execution-id>')].ExecutionArn

这个 JSON 誓言过滤一个特定 StepFunction 的执行 ARN,但是当我尝试为当前正在运行的执行执行此操作时,使用

$.Executions[?(@.ExecutionArn!='$$.Execution.Id')].ExecutionArn

然后它不会过滤掉它。如何从列表执行输出中过滤掉当前正在运行的执行 ID?

我的状态机定义。

{
  "Comment": "A description of my state machine",
  "StartAt": "ListExecutions",
  "States": {
    "ListExecutions": {
      "Type": "Task",
      "Next": "Wait",
      "Parameters": {
        "StateMachineArn": "arn:aws:states:us-east-1:259291646057:stateMachine:MyStateMachine"
      },
      "Resource": "arn:aws:states:::aws-sdk:sfn:listExecutions",
      "OutputPath": "$.Executions[?(@.ExecutionArn!='$$.Execution.Id')].ExecutionArn"
    },
    "Wait": {
      "Type": "Wait",
      "Seconds": 120,
      "End": true
    }
  }
}
4

0 回答 0