Interface WorkflowContext


public interface WorkflowContext
Core top level workflow context
  • Method Details

    • getReplayContext

      ReplayWorkflowContext getReplayContext()
    • mapWorkflowExceptionToFailure

      io.temporal.api.failure.v1.Failure mapWorkflowExceptionToFailure(Throwable exception)
      Convert exception to the serialized Failure that can be reported to the server.
      This method is needed when framework code needs to serialize a TemporalFailure instance with details object produced by the application code.
      The framework code is not aware of DataConverter so this is working around this layering.
      Parameters:
      exception - throwable to convert
      Returns:
      Serialized failure
    • getWorkflowImplementationOptions

      @Nonnull WorkflowImplementationOptions getWorkflowImplementationOptions()
    • getLastCompletionResult

      @Nullable <R> R getLastCompletionResult(Class<R> resultClass, Type resultType)
      Returns:
      Deserialized completion result of the last cron workflow run
    • getContextPropagators

      List<ContextPropagator> getContextPropagators()
      Returns:
      the list of configured context propagators
    • getPropagatedContexts

      Map<String,Object> getPropagatedContexts()
      Returns all current contexts being propagated by a ContextPropagator. The key is the ContextPropagator.getName() and the value is the object returned by ContextPropagator.getCurrentContext()
    • getRunningSignalHandlers

      Map<Long,SignalHandlerInfo> getRunningSignalHandlers()
    • getRunningUpdateHandlers

      Map<String,UpdateHandlerInfo> getRunningUpdateHandlers()
    • getVersioningBehavior

      VersioningBehavior getVersioningBehavior()