AnsweredAssumed Answered

JobExecution and sequential

Question asked by jmalvarezf on Nov 27, 2013
Latest reply on Nov 27, 2013 by jmalvarezf
Hi all,

I'm working with activiti 5.10 and jobexecutor but something is not working as expected.
I'm trying to execute a job each 5 minutes that must start (with a call activiti process) multiple other processes, but with the limitation imposed by poolSize in JobExecutor (in this case, 3 threads running). But it seems that my multiinstance defined is working as sequential, although it is not defined as sequential. I have also set exclusive to false with no different result.

This is the BPM code:


<callActivity id="addOrderIntoSGA" name="Add order into SGA" activiti:async="true" activiti:exclusive="false" calledElement="sgaOrderAddProcess">
      <extensionElements>
        <activiti:in sourceExpression="${order.getOrderid()}" target="orderId"></activiti:in>
      </extensionElements>
      <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="orders" activiti:elementVariable="order"></multiInstanceLoopCharacteristics>
    </callActivity>

My Job executor configuration is as follows:


<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
        <property name="dataSource" ref="xaActivitiDataSource" />
        <property name="transactionManager" ref="transactionManager" />
        <property name="databaseSchemaUpdate" value="false" />
        <property name="jobExecutorActivate" value="true" />
        <property name="jobExecutor">
           <bean class="org.activiti.engine.impl.jobexecutor.DefaultJobExecutor">
             <property name="corePoolSize" value="3"/>
             <property name="maxPoolSize" value="3"/>
             <property name="queueSize" value="3000" />
         </bean>
        </property>
        <property name="history" value="activity" />
        <property name="mailServerHost" value="service-smtp" />
        <property name="mailServerDefaultFrom" value="activiti@2020mobile.es" />
        <property name="idGenerator">
            <bean class="org.activiti.engine.impl.persistence.StrongUuidGenerator" />
        </property>
    </bean>


Does anyone know what is the problem, or what is happening?

Thank you all!

Outcomes