Class WorkflowFailedException

  • All Implemented Interfaces:
    java.io.Serializable

    public final class WorkflowFailedException
    extends WorkflowException
    Indicates that a workflow failed. An original cause of the workflow failure can be retrieved through Throwable.getCause().
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      WorkflowFailedException​(io.temporal.api.common.v1.WorkflowExecution workflowExecution, java.lang.String workflowType, io.temporal.api.enums.v1.EventType workflowCloseEventType, long workflowTaskCompletedEventId, io.temporal.api.enums.v1.RetryState retryState, java.lang.Throwable cause)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.temporal.api.enums.v1.RetryState getRetryState()  
      io.temporal.api.enums.v1.EventType getWorkflowCloseEventType()
      Returns Event Type that caused this exception.
      long getWorkflowTaskCompletedEventId()
      This value is defined only if workflow failure is caused by an explicit WORKFLOW_TASK_COMPLETED command.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • WorkflowFailedException

        public WorkflowFailedException​(io.temporal.api.common.v1.WorkflowExecution workflowExecution,
                                       java.lang.String workflowType,
                                       io.temporal.api.enums.v1.EventType workflowCloseEventType,
                                       long workflowTaskCompletedEventId,
                                       io.temporal.api.enums.v1.RetryState retryState,
                                       java.lang.Throwable cause)
    • Method Detail

      • getRetryState

        public io.temporal.api.enums.v1.RetryState getRetryState()
      • getWorkflowTaskCompletedEventId

        public long getWorkflowTaskCompletedEventId()
        This value is defined only if workflow failure is caused by an explicit WORKFLOW_TASK_COMPLETED command. If workflow timed out, was cancelled or terminated, this value is undefined.
        Returns:
        eventId of the WORKFLOW_TASK_COMPLETED event that reported (caused) WORKFLOW_EXECUTION_FAILED command. -1 if undefined.
      • getWorkflowCloseEventType

        public io.temporal.api.enums.v1.EventType getWorkflowCloseEventType()
        Returns Event Type that caused this exception. This Event Type should be one of
        • EventType.EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED
        • EventType.EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED
        • EventType.EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT
        • EventType.EVENT_TYPE_WORKFLOW_EXECUTION_FAILED
        Returns:
        event type that caused this exception