Class WorkflowFailedException

All Implemented Interfaces:
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:
  • Constructor Details

    • WorkflowFailedException

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

    • 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