Tasks stuck at parallel gateway

I have 4 times got the smae issue, where all tasks get stuck in the same parallel gateway. Only solutionhas been to delete the database, deploy a new db and deploy the same Process definition.
After running weeks/months and 10000’s of tasks, all new tasks get stuck in the same parallel gateway.
Other processes works, so it must be a error in the process definition, but it works for some time!
No Incidents are created.
Is there at better/faster way for fix this beside creating af new database?

Running 7.18.
There is 67 processses started and the gateway has splited the process into the 268 externals tasks (4x67), but the tasks are never forwarded to the external task Resize.


Hello my friend!

Can u show me your pom.xml?

It is the default from 7.18.

…\webapps\engine-rest\META-INF\maven\org.camunda.bpm\camunda-engine-rest\pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <artifactId>camunda-engine-rest</artifactId>
  <name>Camunda Platform - engine - REST - Assembly</name>
  <packaging>war</packaging>

  <parent>
    <groupId>org.camunda.bpm</groupId>
    <artifactId>camunda-engine-rest-root</artifactId>
    <relativePath>../</relativePath>
    <version>7.18.0</version>
  </parent>
  
  <properties>
    <!-- generate a bom of dependencies for the license book.
    We include compile and provided scope dependencies; 
    all the dependencies that we include in only one of the 
    runtime-specific-WARs are in provided scope -->
    <skip-third-party-bom>false</skip-third-party-bom>
    <third-party-bom-scopes>compile|provided</third-party-bom-scopes>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.camunda.bpm</groupId>
      <artifactId>camunda-engine-rest-core</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- dependencies only used for assemblies should be scope provided -->
    <dependency>
      <groupId>org.camunda.bpm</groupId>
      <artifactId>camunda-engine-rest-core</artifactId>
      <version>${project.version}</version>
      <classifier>sources</classifier>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.camunda.bpm</groupId>
      <artifactId>camunda-engine-rest-core</artifactId>
      <version>${project.version}</version>
      <classifier>tests</classifier>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-jaxrs</artifactId>
      <version>${version.resteasy}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.glassfish.jersey.containers</groupId>
      <artifactId>jersey-container-servlet</artifactId>
      <version>${version.jersey2}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.inject</groupId>
      <artifactId>jersey-hk2</artifactId>
      <version>${version.jersey2}</version>
      <scope>provided</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>wildfly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <archive>
                <manifestEntries>
                  <!-- module dependencies for deployment on wildfly  -->
                  <Dependencies>org.camunda.bpm.camunda-engine,org.camunda.bpm.dmn.camunda-engine-dmn,org.camunda.commons.camunda-commons-logging,org.camunda.spin.camunda-spin-core,org.graalvm.js.js-scriptengine services</Dependencies>
                </manifestEntries>
              </archive>
              <descriptors>
                <descriptor>assembly-war-wildfly.xml</descriptor>
              </descriptors>
              <finalName>camunda-engine-rest-${project.version}</finalName>
              <attach>true</attach>
              <classifier>wildfly</classifier>
              <outputDirectory>target/</outputDirectory>
              <workDirectory>target/assembly/work</workDirectory>
            </configuration>
          </execution>

          <execution>
            <id>tomcat</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>assembly-war-tomcat.xml</descriptor>
              </descriptors>
              <finalName>camunda-engine-rest-${project.version}</finalName>
              <attach>true</attach>
              <classifier>tomcat</classifier>
              <outputDirectory>target/</outputDirectory>
              <workDirectory>target/assembly/work</workDirectory>
            </configuration>
          </execution>

          <execution>
            <id>was</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>assembly-war-was.xml</descriptor>
              </descriptors>
              <finalName>camunda-engine-rest-${project.version}</finalName>
              <attach>true</attach>
              <classifier>was</classifier>
              <outputDirectory>target/</outputDirectory>
              <workDirectory>target/assembly/work</workDirectory>
            </configuration>
          </execution>

          <execution>
            <id>was9</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>assembly-war-was9.xml</descriptor>
              </descriptors>
              <finalName>camunda-engine-rest-${project.version}</finalName>
              <attach>true</attach>
              <classifier>was9</classifier>
              <outputDirectory>target/</outputDirectory>
              <workDirectory>target/assembly/work</workDirectory>
            </configuration>
          </execution>

          <execution>
            <id>wls</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>assembly-war-wls.xml</descriptor>
              </descriptors>
              <finalName>camunda-engine-rest-${project.version}</finalName>
              <attach>true</attach>
              <classifier>wls</classifier>
              <outputDirectory>target/</outputDirectory>
              <workDirectory>target/assembly/work</workDirectory>
            </configuration>
          </execution>

          <execution>
            <id>classes</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>assembly-classes.xml</descriptor>
              </descriptors>
              <finalName>camunda-engine-rest-${project.version}</finalName>
              <attach>true</attach>
              <outputDirectory>target/</outputDirectory>
              <workDirectory>target/assembly/work</workDirectory>
            </configuration>
          </execution>

          <execution>
            <id>sources</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>assembly-sources.xml</descriptor>
              </descriptors>
              <finalName>camunda-engine-rest-${project.version}</finalName>
              <attach>true</attach>
              <outputDirectory>target/</outputDirectory>
              <workDirectory>target/assembly/work</workDirectory>
            </configuration>
          </execution>

          <execution>
            <id>tests</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>assembly-tests.xml</descriptor>
              </descriptors>
              <finalName>camunda-engine-rest-${project.version}</finalName>
              <attach>true</attach>
              <outputDirectory>target/</outputDirectory>
              <workDirectory>target/assembly/work</workDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>
</project>

Note: All stuck taks has 3 retries.

I see that you have ASync After on your parallel gateway, but can you try “ASync Before” on your Resize tasks?

I think the Parallel Split is working correctly, since you’ve got 268 tokens, but something’s not happy with your first External Task, so it rolls back to the last transaction point.

:thinking: I see no need for Asynchronous continuation on the gateway bro… I would remove that and just put an async in tasks.

But anyway, it’s worth a try!

I didn’t suggest that there is… just noted that they had done it.
In theory, Async After and Async Before on two tasks that are connected “should” do the Async at about the same place… but I know that’s not always the case.

I still think there’s something going wrong with the External task which is rolling back to the last Async.

Yeah bro @GotnOGuts … I also believe it’s something in the service task code. :melting_face:

1 Like