Retries with JavaDelegate

Hi Camunda Team,

I have a JavaDelegate that calls an external API my question is:

If my API response return a 4xx, 5xx status code, I want to retry it for 3 times with some interval if after the all retries I dont get 200 from API, I want to finish my process WITHOUT open an incident to be handle manually.

Any suggest?

Ex:

Java code:

    @Override
    public void execute(DelegateExecution delegateExecution) throws Exception {
        try {
            ApiCall.call();
        } catch (BaseException ex) {
            //retry again
        }

Hi @gabryellr,

Below post might be of help to you

Hi, maybe you can help me . How do you implement that ApiCall.call ? Do you have an example code that can help me?
Thanks