Default number of retries to zero does fail the process

Hi

In the camunda spring-boot example project I tried to set the default-number-of-retries to 0.
With this configuration it always fails the process on start.

Is that a Bug?

I want to set the default number of retries to 0, cause i only want to have manual retries allowed.

Greetings

Can you explain exactly what you did and exactly what happens which prevents the process from starting - e.g. any errors in the console?

  1. I have a spring-boot project with a simple BPMN-Process build in the Camunda-Modeler.

  2. My Application has a REST-Endpoint within a new ProcessInstance of my BPMN is started.

  3. I have a IncidentHandler which is loggin many informations about the processengine.

  4. I start my Application with camunda.bpm.default-number-of-retries = 0

  5. When i start a new ProcessInstance by sending a REST-Request to my Application, it tries to create a new ProcessInstance but it failes directly when the default number of retries = 0.
    There is no stacktrace for detailed information.
    My IncidentHandler is logging the context of the Incident, but it also has no detailed information.
    This is my Log-output:

    Initializing Spring DispatcherServlet ‘dispatcherServlet’
    Initializing Servlet ‘dispatcherServlet’
    Completed initialization in 10 ms
    CONTEXT activityId = do_start_simple
    CONTEXT executionId = 8f873069-6cb6-11e9-ac2d-0242da202d19
    CONTEXT jobDefinitionId = 8b6ee8db-6cb6-11e9-ac2d-0242da202d19
    CONTEXT processDefinitionId = do_run_process:1:8b6ee8da-6cb6-11e9-ac2d-0242da202d19
    CONTEXT tenantId = null
    CONTEXT configuration = 8f88b70b-6cb6-11e9-ac2d-0242da202d19
    CONTEXT className = org.camunda.bpm.engine.impl.incident.IncidentContext
    MESSAGE = null

Can you upload your process?

This is my Process: do_run_process.bpmn (37.6 KB)

Basically every Task runs the same expression:

@Slf4j
@Component("do")
@RequiredArgsConstructor
public class DoExpressions {
    public void run(final String name, final DelegateExecution execution) {
        log.info("Running {}...", name);
        final String failName = (String) execution.getVariable("failName");
        checkArgument(!name.equals(failName), "Check in " + name + " failed.");
        log.info("... done.");
    }
}

I have the same issue. Any solution?

Hello @Niall

I’m having the same issue.
My config:

camunda.bpm.default-number-of-retries=0

When I start the process an incident is created with empty message:
image

Could you help me?
Thanks.

Click on the message is null link and it should bring you to the stack trace.

@Niall,
I clicked on that link, but it’s empty:

Just to overview, I’m trying to do this configuration because of some webclients are been calling two times, duplicating some data.

Thanks.

Can you explain in more detail what your setup looks like?
Also upload you model.
Can you also check the logs to see if any errors are appearing in there.

Right,

I have a simple springboot project with simple models. It just occurs when i put this on my application.properties:

camunda.bpm.default-number-of-retries=0

This problem occurs independent of the model, It’s like job executor doesn’t have minimum number to execute that.

Hey,

looking into the documentation for .default-number-of-retries it states

Specifies how many times a job will be executed before an incident is raised

The name of that configuration option might be a bit misleading, I would agree.
So you are basically telling the engine to never execute the job but throw an incident directly. It does not have a stacktrace yet since nothing went wrong with the job itself.

Setting this option to 1 should therefore actually get you where you wanted to go, assuming you wanted jobs to only being executed at most once automatically.

Hope that shines some light on the topic here.

Best,
Tobias

3 Likes

The solution doesn’t solve the problem. By setting default-number-of-retries to 1, Camunda does 1 fail retry after an exception. What I what is no retries at at all. I can’t achieve this by setting it to 1.

Hi @muyen,

last that I tried with an example locally I got the expected result.

Can you upload an example that fails reproducibly and tell us what indicates that it does not work?
This can be a ZIP file or a GitHub project or something like that, whatever suits you best.

Best,
Tobias