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