1919
2020package io .temporal .client ;
2121
22- import io .temporal .common .v1 .WorkflowExecution ;
23- import io .temporal .enums .v1 .RetryStatus ;
22+ import io .temporal .api . common .v1 .WorkflowExecution ;
23+ import io .temporal .api . enums .v1 .RetryState ;
2424
2525/**
2626 * Indicates that a workflow failed. An original cause of the workflow failure can be retrieved
2727 * through {@link #getCause()}.
2828 */
2929public final class WorkflowFailedException extends WorkflowException {
3030
31- private final RetryStatus retryStatus ;
31+ private final RetryState retryState ;
3232 private final long decisionTaskCompletedEventId ;
3333
3434 public WorkflowFailedException (
3535 WorkflowExecution workflowExecution ,
3636 String workflowType ,
3737 long decisionTaskCompletedEventId ,
38- RetryStatus retryStatus ,
38+ RetryState retryState ,
3939 Throwable cause ) {
4040 super (
41- getMessage (workflowExecution , workflowType , decisionTaskCompletedEventId , retryStatus ),
41+ getMessage (workflowExecution , workflowType , decisionTaskCompletedEventId , retryState ),
4242 workflowExecution ,
4343 workflowType ,
4444 cause );
45- this .retryStatus = retryStatus ;
45+ this .retryState = retryState ;
4646 this .decisionTaskCompletedEventId = decisionTaskCompletedEventId ;
4747 }
4848
49- public RetryStatus getRetryStatus () {
50- return retryStatus ;
49+ public RetryState getRetryState () {
50+ return retryState ;
5151 }
5252
5353 public long getDecisionTaskCompletedEventId () {
@@ -58,14 +58,14 @@ public static String getMessage(
5858 WorkflowExecution workflowExecution ,
5959 String workflowType ,
6060 long decisionTaskCompletedEventId ,
61- RetryStatus retryStatus ) {
61+ RetryState retryState ) {
6262 return "workflowId='"
6363 + workflowExecution .getWorkflowId ()
6464 + "', runId='"
6565 + workflowExecution .getRunId ()
6666 + (workflowType == null ? "'" : "', workflowType='" + workflowType + '\'' )
67- + ", retryStatus ="
68- + retryStatus
67+ + ", retryState ="
68+ + retryState
6969 + ", decisionTaskCompletedEventId="
7070 + decisionTaskCompletedEventId ;
7171 }
0 commit comments