This context behaves in two modes. It starts in the synchronous mode, where if a result is set (or exception is thrown), it just gets recoded. When passed into {@link Step#start(StepContext)}, it's in this mode.
When {@link Step#start(StepContext)} method returns, we'll atomically check if the result is set or notand then switch to the asynchronous mode. In this mode, if the result is set, it'll trigger the rehydration of the workflow. If a {@link CpsStepContext} gets serialized, it'll be deserialized in the asynchronous mode.
This object must be serializable on its own without sucking in any of the {@link CpsFlowExecution} objectgraph. Wherever we need {@link CpsFlowExecution} we do that by following {@link FlowExecutionOwner}, and when we need pointers to individual objects inside, we use IDs (such as {@link #id}}. @author Kohsuke Kawaguchi
|
|
|
|