【问题标题】:Can we trigger a particular activity of a specific execution of a state machine built using AWS Step function?我们能否触发使用 AWS Step 函数构建的状态机的特定执行的特定活动?
【发布时间】:2018-02-02 12:38:02
【问题描述】:

使用 GetActivityTask API 可以访问已经运行的状态机的任何随机执行的活动。是否可以获得特定执行的特定活动?

假设我的状态机是 -

Start -> A -> B -> C -> End

Execution1 : Start1 -> A1 -> B1 -> C1 -> End
Execution2 : Start2 -> A2 -> B2 -> C2 -> End

如果我有 executionId (Execution1) 和 ActivityARN name (A),我是否可以访问 A1?如果不是,为什么 AWS 不允许这样做。

要求:我想创建类似

的 API
1> SubmitRequest - 
Input - Some input
Output - RequestId

它启动状态机的特定执行并在执行活动 A 后返回。幕后机器运行B

2> GetC -
Input - RequestId
Output -  If the state machine is in correct state to call C we should run C and provide its output otherwise throw an exception.

所以基本上想使用 AWS step 函数来管理我的应用程序的状态,如果在不正确的状态下调用 API 会抛出异常。

【问题讨论】:

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


    【解决方案1】:

    如果我理解您的问题,GetExecutionHistory API 调用应该可以满足您的需求。它会让你看到每个状态和活动的执行状态,并看到每个的输入和输出。

    【讨论】:

      猜你喜欢
      • 2020-04-27
      • 1970-01-01
      • 1970-01-01
      • 2019-09-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-06
      • 1970-01-01
      相关资源
      最近更新 更多