Workflow level retry(Java sdk) : io.temporal.failure.ApplicationFailure:

Q 01) I’m getting some application failure
Error : Caused by: io.temporal.failure.ApplicationFailure: message=‘simulated’,
type=‘java.lang.RuntimeException’, nonRetryable=false

please find out why getting this error

Q 02) what is mean by “nonRetryable=false” why it’s getting false
Q 03) pls give some coding example on any exception or error occurred in middle activity level and activity will got failed then again we need to start the workflow level 1st steps onward wants to execute the workflow. (Workflow level retry mechanism)

Please give some example program code in Java sdk

Q 01) I’m getting some application failure
Error : Caused by: io.temporal.failure.ApplicationFailure: message=‘simulated’,
type=‘java.lang.RuntimeException’, nonRetryable=false
please find out why getting this error

Either activity or workflow code threw RuntimeException with a “simulated” message. All exceptions that don’t extend TemporalFailure are converted to an ApplicaitonFailure when crossing activity or workflow boundaries.

Q 02) what is mean by “nonRetryable=false” why it’s getting false

When an unknown exception is converted it is always retryable. You can make it non retryable by:

Q 03) pls give some coding example on any exception or error occurred in middle activity level and activity will got failed then again we need to start the workflow level 1st steps onward wants to execute the workflow. (Workflow level retry mechanism)

Retrying the whole workflow on an activity failure is an anti-pattern in the majority of cases. Why do you want to retry the whole workflow instead of retrying the particular activity?