Class WorkflowFailedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.temporal.failure.TemporalException
io.temporal.client.WorkflowException
io.temporal.client.WorkflowFailedException
- All Implemented Interfaces:
Serializable
Indicates that a workflow failed. An original cause of the workflow failure can be retrieved
through
Throwable.getCause().- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWorkflowFailedException(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 Summary
Modifier and TypeMethodDescriptionio.temporal.api.enums.v1.RetryStateio.temporal.api.enums.v1.EventTypeReturns Event Type that causedthisexception.longThis value is defined only if workflow failure is caused by an explicit WORKFLOW_TASK_COMPLETED command.Methods inherited from class io.temporal.client.WorkflowException
getExecution, getWorkflowTypeMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
WorkflowFailedException
-
-
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 causedthisexception. This Event Type should be one ofEventType.EVENT_TYPE_WORKFLOW_EXECUTION_CANCELEDEventType.EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATEDEventType.EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUTEventType.EVENT_TYPE_WORKFLOW_EXECUTION_FAILED
- Returns:
- event type that caused
thisexception
-