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">
        <activiti:in sourceExpression="${order.getOrderid()}" target="orderId"></activiti:in>
      <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="orders" activiti:elementVariable="order"></multiInstanceLoopCharacteristics>

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" />
        <property name="history" value="activity" />
        <property name="mailServerHost" value="service-smtp" />
        <property name="mailServerDefaultFrom" value="" />
        <property name="idGenerator">
            <bean class="org.activiti.engine.impl.persistence.StrongUuidGenerator" />

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

Thank you all!