Can I determine all Workflow Events from a Workflow implementation (without running it)?

I understand that when I define a Workflow by implementing the Workflow Method that starts the Workflow Execution, executing Activity methods by the Workflow will generate commands to the Temporal Cluster to enqueue, run, and accept the result of those Activities, which results in an Event History that records the scheduling, starting, and completion of those activities. The Event History also contains Workflow Task Events, Signal events, etc, all resulting from the steps that occur during the running of the Workflow Execution.

Is there a way I can determine the exact contents of the Event History for a successfully-completed Workflow Execution based on the implementation source code of the Workflow Method rather than by inspecting the Event History after the Workflow Execution is complete?

Is the sequence of commands for a given Workflow generated by the SDK, perhaps at compile time, and is this sequence accessible to me somehow such that I can know all the commands that a Workflow Execution would issue without actually executing it?

Is the sequence of commands for a given Workflow generated by the SDK, perhaps at compile time, and is this sequence accessible to me somehow such that I can know all the commands that a Workflow Execution would issue without actually executing it?

This would work for very simple static workflows, but Temporal workflows are highly dynamic. For example, you can pass a list of activities to execute as a workflow argument, and then the workflow code will iterate over the list and call the execute activity for each element. This is a huge advantage of Temporal workflows over most existing orchestration technologies.

1 Like