Interface WorkflowContext


  • public interface WorkflowContext
    Core top level workflow context
    • Method Detail

      • mapWorkflowExceptionToFailure

        io.temporal.api.failure.v1.Failure mapWorkflowExceptionToFailure​(java.lang.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
      • getLastCompletionResult

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

        java.util.List<ContextPropagator> getContextPropagators()
        Returns:
        the list of configured context propagators