4 Replies Latest reply on Feb 24, 2015 8:15 AM by trevordd

    Jbpm Executor executing same Command multiple times..

    trevordd

      Hi,

       

      I’m currently using JBPM v6.1.0. I have created various jbpm flows primarily for Web Service orchestration. 

       

      I am using the jbpm executor, which is currently set to use 10 Threads.

       

      The issue Iim currently having is that each command being stored in the database is being picked up all 10 threads of the Jobs Executor and being executed. The lock on the row doesn’t seem to be working.

       

      Has anyone experienced this before?

       

      System details:

       

      JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8)

      java.runtime.version = 1.7.0_71-b14

      MySql 5.1.31 (InnoDB) (default tx.isolation level  READ-COMMITTED)

       

      Executor settings :

      [org.jbpm.executor.impl.ExecutorImpl] (pool-9-thread-1) Starting Executor Component ...

                   - Thread Pool Size: 10

                   - Interval: 3 Seconds

                   - Retries per Request: 1

       

      Example showing 2 of the threads in action:

       

      Executor query :

       

      21:01:25,191 INFO  [stdout] (pool-11-thread-9) Hibernate: select requestinf0_.id as id5_, requestinf0_.commandName as commandN2_5_, requestinf0_.deploymentId as deployme3_5_, requestinf0_.executions as executions5_, requestinf0_.businessKey as business5_5_, requestinf0_.message as message5_, requestinf0_.requestData as requestD7_5_, requestinf0_.responseData as response8_5_, requestinf0_.retries as retries5_, requestinf0_.status as status5_, requestinf0_.timestamp as timestamp5_ from RequestInfo requestinf0_ where (requestinf0_.status='QUEUED' or requestinf0_.status='RETRYING') and requestinf0_.timestamp<? limit ? for update

      21:01:25,213 INFO  [stdout] (pool-11-thread-6) Hibernate: select requestinf0_.id as id5_, requestinf0_.commandName as commandN2_5_, requestinf0_.deploymentId as deployme3_5_, requestinf0_.executions as executions5_, requestinf0_.businessKey as business5_5_, requestinf0_.message as message5_, requestinf0_.requestData as requestD7_5_, requestinf0_.responseData as response8_5_, requestinf0_.retries as retries5_, requestinf0_.status as status5_, requestinf0_.timestamp as timestamp5_ from RequestInfo requestinf0_ where (requestinf0_.status='QUEUED' or requestinf0_.status='RETRYING') and requestinf0_.timestamp<? limit ? for update

       

      Updates Status to ‘RUNNING’

       

      21:01:25,498 INFO  [stdout] (pool-11-thread-9) Hibernate: update RequestInfo set commandName=?, deploymentId=?, executions=?, businessKey=?, message=?, requestData=?, responseData=?, retries=?, status=?, timestamp=? where id=?

      21:01:25,514 INFO  [stdout] (pool-11-thread-6) Hibernate: update RequestInfo set commandName=?, deploymentId=?, executions=?, businessKey=?, message=?, requestData=?, responseData=?, retries=?, status=?, timestamp=? where id=?

       

      Executes Command :

       

      21:01:25,526 INFO  [org.jbpm.executor.CXFCommand] (pool-11-thread-9) CXFCommand executed on executor with data {ClassLoader=ModuleClassLoader for Module "deployment.fulfilment-jbpm-integration-1.0-SNAPSHOT.war:main" from Service Module Loader, deploymentId=spring-rm, workItem=WorkItem 1 [name=Service Task, state=0, processInstanceId=2, parameters{getOrderDetailsRequest=net.atos.htts.acm.main.ordermanagement.v2.GetOrderDetailsRequest@700af916 }, businessKey=2:1, callbacks=org.jbpm.executor.AsyncCallbackHandler}

       

       

      21:01:25,544 INFO  [org.jbpm.executor.CXFCommand] (pool-11-thread-6) CXFCommand executed on executor with data {ClassLoader=ModuleClassLoader for Module "deployment.fulfilment-jbpm-integration-1.0-SNAPSHOT.war:main" from Service Module Loader, deploymentId=spring-rm, workItem=WorkItem 1 [name=Service Task, state=0, processInstanceId=2, parameters{getOrderDetailsRequest=net.atos.htts.acm.main.ordermanagement.v2.GetOrderDetailsRequest@61fbfb4 }, businessKey=2:1, callbacks=org.jbpm.executor.AsyncCallbackHandler}