Some of my observations on researching about flow framework are:
@Signal starts executing in the decider replay once the signal is received. @Signal method is executed in all the future replays of the same workflow. (Once signal is received, on each replay the decider executes @Signal). @Asynchronus methods should not be long running tasks, as decider will schedule Activity Tasks only after all @Asynch methods have completed execution.
Are my observations correct ? If yes: then what if in the same workflow I want a signal, which performs some task and then stop executing for future replays. Such as a pause signal: user might pause and resume a workflow multiple times.
Another problem is: How are the following types of cases handled by flow: A decider times out, and meanwhile two events come: Cancel workflow and Activity Completed. How does decider figure out that they are related and if cancellation is done, then do not responds to ActivityComplatedEvent.