Camunda is auto starting service tasks(Java Delegate classes)

hi ,
i have encountered a strange behaviour , the camunda process instance is starting all the Java delegate classes automatically. using the below camunda spring version

 <properties>
    <camunda.version>7.11.0</camunda.version>
    <!--
    Adjust if you want to use Camunda Enterprise Edition (EE):
    <camunda.version>7.11.0-ee</camunda.version>
    Make sure you also switch to the ee webapp dependency
    and EE repository below
    -->
    <camundaSpringBoot.version>3.3.1</camundaSpringBoot.version>
    <springBoot.version>2.3.3.RELEASE</springBoot.version>

    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
    <version.java>11</version.java>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <failOnMissingWebXml>false</failOnMissingWebXml>
  </properties>

Am using flow flow

any configuration which because of this happening. am not getting proper reason for this.

below is the application.yml

spring.datasource:
  url: jdbc:h2:./camunda-db;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
#shareable h2 database: jdbc:h2:./camunda-db;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;AUTO_SERVER=TRUE
  username: sa
  password: sa
spring.h2.console.enabled: true
camunda.bpm:
  authorization.enabled: true
  admin-user:
    id: demo
    password: demo
    firstName: Demo
    lastName: Demo
  filter:
    create: All Tasks
server.port: 8081

logging:
    level:
        root: INFO
        com.ok: DEBUG
active-mq:
    broker-url: tcp://localhost:61616
    topic: test-topic
    from:
        topic: to-bl

I assume you mean that when you start a process instance, all of the service tasks are executed in a row, without manual input. If so, that is by design - Camunda will execute as many automated activities in a single transaction as possible by default. You can control the boundaries of the transactions by using the asynchronous markers: Transactions in Processes | docs.camunda.org describes this in detail.

If what you are aiming for is manual input in between each of these steps, then service tasks are probably not the most suitable tasks for the job. Have a look at user tasks to accomplish this: User Task | docs.camunda.org

1 Like

yes, thanks for the input. Need to change the activity to user task.

1 Like