Package io.temporal.client
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:
java.io.Serializable
public final class WorkflowFailedException extends WorkflowException
Indicates that a workflow failed. An original cause of the workflow failure can be retrieved throughThrowable.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 causedthis
exception.long
getWorkflowTaskCompletedEventId()
This 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, getMessage, getWorkflowType
-
-
-
-
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 causedthis
exception. This Event Type should be one ofEventType.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
-
-