Open
Description
I have an Activity Function which has a retry count set to 3. This is intentionally made to throw an exception and retry. Now, I am trying to get the retry count in the Activity Function but it always returns 0.
Here is a sample code I am trying :
public String aepHTTPPollingOperator(@DurableActivityTrigger(name = "input", dataType = "string") String input,
ExecutionContext context) throws JsonMappingException, JsonProcessingException, Exception {
System.out.println("Context Retry : " + context.getRetryContext().getRetrycount()); //always prints 0
throw new RuntimeException("test exception")
}
This is how I am calling this activity :
RetryPolicy policy = new RetryPolicy(3, 30);
TaskOptions options = new TaskOptions(policy);
ctx.callActivity("ActivityName", activityInputQO.toString(), options, String.class));