2

使用 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 会抛出异常。

4

1 回答 1

0

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

于 2017-08-25T22:16:26.680 回答