I am looking for retry option example for cadence in java, for example I am trying below code snippet but it seems the activity is not re-tried
@ActivityMethod(scheduleToCloseTimeoutSeconds = 30)
@MethodRetry(maximumAttempts = 2, initialIntervalSeconds = 1, expirationSeconds = 30, maximumIntervalSeconds = 30)
String getGreetingContentOverTheWeb(URL url) throws IOException;
for the above activity I am expecting that if it fails should be re-tried automatically, below is how I am calling it
@Override
public String getGreeting(String name) {
// This is a blocking call that returns only after the activity has completed.
try {
String content = activities.getGreetingContentOverTheWeb(new URL("http://localhost:3000/import-map/books"));
return activities.composeGreeting(content, name);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return activities.composeGreeting("Hello", name);
}
Please let me know if I am doing anything incorrect here,
Below is the snapshot from the frontend