The process engine does not work in the same way with MESSAGE QUEUE BASED ASYNC EXECUTOR configuration

we are testing how the engine behaves using a message queue and for that we are creating several flows to check that it works as expected,
i.e the same as with the ‘NOT MESSAGE QUEUE BASED ASYNC EXECUTOR’ configuration but with better behavior

the tests were good until we ran into the next flow ‘mqTest1’ which is shown below;
the task ‘TaskA’ and gateway ‘ExclusiveGwy’ run with the same thread
the tasks ‘TaskB’, ‘TaskC’, ‘TaskD’ and ‘TaskE’ are asynchronous so run with different threads
we are starting new process instances through the flowable REST API

in this case (flow) we find that the engine behaves differently; and to explain better (show the differences) send you the request body and responses

test A; MESSAGE QUEUE BASED ASYNC EXECUTOR configuration, checkVar=true

request body:

{
“processDefinitionKey” : “mqTest1”,
“returnVariables”: true,
“variables”:
[
{ “name”: “client”, “value” : “caph” },
{ “name”: “checkVar”, “value” : “true” }
]
}

response body:

{
“id”: “b7cc8fb0-5296-11ea-8b06-7446a0aca61e”,
“url”: “…”,
“name”: null,
“businessKey”: null,
“suspended”: false,
“ended”: false,
“processDefinitionId”: “mqTest1:3:7218e90e-528e-11ea-8b06-7446a0aca61e”,
“processDefinitionUrl”: “…”,
“processDefinitionName”: “mqTest1”,
“processDefinitionDescription”: null,
“activityId”: null,
“startUserId”: null,
“startTime”: “2020-02-18T18:36:27.043-03:00”,
“variables”: [
{
“name”: “TaskA-05-37-10”,
“type”: “string”,
“value”: “…”,
“scope”: “local”
},
{
“name”: “checkVar”,
“type”: “string”,
“value”: “true”,
“scope”: “local”
},
{
“name”: “client”,
“type”: “string”,
“value”: “caph”,
“scope”: “local”
},
{
“name”: “startDate”,
“type”: “serializable”,
“value”: null,
“valueUrl”: “…”,
“scope”: “local”
}
],
“callbackId”: null,
“callbackType”: null,
“tenantId”: “”,
“completed”: false
}

test B; MESSAGE QUEUE BASED ASYNC EXECUTOR configuration, checkVar=false

request body:

{
“processDefinitionKey” : “mqTest1”,
“returnVariables”: true,
“variables”:
[
{ “name”: “client”, “value” : “caph” },
{ “name”: “checkVar”, “value” : “false” }
]
}

response body:

{
“id”: “da6bef76-5296-11ea-8b06-7446a0aca61e”,
“url”: “…”,
“name”: null,
“businessKey”: null,
“suspended”: false,
“ended”: true,
“processDefinitionId”: “mqTest1:3:7218e90e-528e-11ea-8b06-7446a0aca61e”,
“processDefinitionUrl”: “…”,
“processDefinitionName”: “mqTest1”,
“processDefinitionDescription”: null,
“activityId”: null,
“startUserId”: null,
“startTime”: “2020-02-18T18:37:25.130-03:00”,
“variables”: [],
“callbackId”: null,
“callbackType”: null,
“tenantId”: “”,
“completed”: true
}

test C; NOT MESSAGE QUEUE BASED ASYNC EXECUTOR configuration, checkVar=true

request body:

{
“processDefinitionKey” : “mqTest1”,
“returnVariables”: true,
“variables”:
[
{ “name”: “client”, “value” : “caph” },
{ “name”: “checkVar”, “value” : “true” }
]
}

response body:

{
“id”: “bd9b9287-5297-11ea-af47-7446a0aca61e”,
“url”: “…”,
“name”: null,
“businessKey”: null,
“suspended”: false,
“ended”: false,
“processDefinitionId”: “mqTest1:3:7218e90e-528e-11ea-8b06-7446a0aca61e”,
“processDefinitionUrl”: “…”,
“processDefinitionName”: “mqTest1”,
“processDefinitionDescription”: null,
“activityId”: null,
“startUserId”: null,
“startTime”: “2020-02-18T18:43:46.285-03:00”,
“variables”: [
{
“name”: “checkVar”,
“type”: “string”,
“value”: “true”,
“scope”: “local”
},
{
“name”: “client”,
“type”: “string”,
“value”: “caph”,
“scope”: “local”
},
{
“name”: “TaskA-06-43-02”,
“type”: “string”,
“value”: “…”,
“scope”: “local”
},
{
“name”: “startDate”,
“type”: “serializable”,
“value”: null,
“valueUrl”: “…”,
“scope”: “local”
}
],
“callbackId”: null,
“callbackType”: null,
“tenantId”: “”,
“completed”: false
}

test D; NOT MESSAGE QUEUE BASED ASYNC EXECUTOR configuration, checkVar=false

request body:

{
“processDefinitionKey” : “mqTest1”,
“returnVariables”: true,
“variables”:
[
{ “name”: “client”, “value” : “caph” },
{ “name”: “checkVar”, “value” : “false” }
]
}

response body:

{
“id”: “02a44d87-5298-11ea-af47-7446a0aca61e”,
“url”: “…”,
“name”: null,
“businessKey”: null,
“suspended”: false,
“ended”: true,
“processDefinitionId”: “mqTest1:3:7218e90e-528e-11ea-8b06-7446a0aca61e”,
“processDefinitionUrl”: “…”,
“processDefinitionName”: “mqTest1”,
“processDefinitionDescription”: null,
“activityId”: null,
“startUserId”: null,
“startTime”: “2020-02-18T18:45:42.105-03:00”,
“variables”: [
{
“name”: “checkVar”,
“type”: “string”,
“value”: “false”,
“scope”: “local”
},
{
“name”: “TaskA-06-43-02”,
“type”: “string”,
“value”: “…”,
“scope”: “local”
},
{
“name”: “startDate”,
“type”: “serializable”,
“value”: null,
“valueUrl”: “…”,
“scope”: “local”
},
{
“name”: “client”,
“type”: “string”,
“value”: “caph”,
“scope”: “local”
}
],
“callbackId”: null,
“callbackType”: null,
“tenantId”: “”,
“completed”: true
}

We note that with the MESSAGE QUEUE BASED ASYNC EXECUTOR configuration, only in the case that the variable checkVar is equal to true do you see all the variables set in the flow
We also note that with the NOT MESSAGE QUEUE BASED ASYNC EXECUTOR configuration the value of the variable checkVar does not matter, the output always shows all the variables set in the flow

Another test:
With NOT MESSAGE QUEUE BASED ASYNC EXECUTOR configuration, if we change async=“false” for tasks ‘TaskB’, ‘TaskC’, ‘TaskD’ and ‘TaskE’,
when the flow end it does not return the variables set in the flow

Our question is, it works like this:

when the MESSAGE QUEUE BASED ASYNC EXECUTOR configuration is used, the engine does not always return the variables set in the flow;
contrary to what happens when we use the NOT MESSAGE QUEUE BASED ASYNC EXECUTOR configuration???

WE HOPED THAT WITH BOTH CONFIGURATIONS THE ENGINE WORKS THE SAME FOR THIS CASE

Am I understanding you correctly that the wrong path is taken when using the message based executor? Up to that point, all steps are sync and the async executor does not come into play, so the results should be the same.

How did you configure your process engine?
Can you share your engine config and your process xml so we can try it out ourselves?

As I indicated before, I expected the results to be the same but as you can see in the output of test B it is not so.
I send you our configuration, your comments on the configuration used would be welcome!!!

here the classes:

classes ‘HistoryJobMessageListener’ and ‘JobMessageListener’ are equal to ‘org.flowable.spring.executor.jms.HistoryJobMessageListener’
and ‘org.flowable.spring.executor.jms.JobMessageListener’

class ‘ProcessEngineAutoConfiguration’ is equal to ‘org.flowable.spring.boot.ProcessEngineAutoConfiguration’ but with a few changes to configurate the engine with message queue based async executor

@Configuration
public class ActiveMQConfig
{
	@Value("${mqbroker.url}")
	private String url;
	
	@Bean
    public ConnectionFactory connectionFactory()
	{
        ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory(url);
        
        activeMQConnectionFactory.setUseAsyncSend(true);
        activeMQConnectionFactory.setAlwaysSessionAsync(true);
        activeMQConnectionFactory.setStatsEnabled(true);
        
        return new CachingConnectionFactory(activeMQConnectionFactory);
    }
}

@Configuration
public class MessageQueueConfigBefore
{
	@Autowired
	private ConnectionFactory connectionFactory;
	
	@Bean
	public MessageBasedJobManager jobManager()
	{
        MessageBasedJobManager jobManager = new MessageBasedJobManager();
        jobManager.setJmsTemplate(jmsTemplate());
        jobManager.setHistoryJmsTemplate(jmsHistoryTemplate());
        return jobManager;
    }
	
	private JmsTemplate jmsTemplate()
	{
        JmsTemplate jmsTemplate = new JmsTemplate();
        jmsTemplate.setDefaultDestination(new ActiveMQQueue("flowable-jobs"));
        jmsTemplate.setConnectionFactory(connectionFactory);
        return jmsTemplate;
    }
	
	private JmsTemplate jmsHistoryTemplate()
	{
        JmsTemplate jmsTemplate = new JmsTemplate();
        jmsTemplate.setDefaultDestination(new ActiveMQQueue("flowable-history-jobs"));
        jmsTemplate.setConnectionFactory(connectionFactory);
        return jmsTemplate;
    }
}

@Configuration
public class MessageQueueConfigAfter
{
	@Autowired
	private ConnectionFactory connectionFactory;
	
	@Autowired
	private SpringProcessEngineConfiguration engineConfiguration;
	
	@Bean
	public MessageListenerContainer messageListenerContainer()
	{
		DefaultMessageListenerContainer messageListenerContainer = new DefaultMessageListenerContainer();
	    messageListenerContainer.setConnectionFactory(connectionFactory);
	    messageListenerContainer.setDestinationName("flowable-jobs");
	    messageListenerContainer.setMessageListener(jobMessageListener());
	    messageListenerContainer.setConcurrentConsumers(2);
	    messageListenerContainer.start();
	    return messageListenerContainer;
	}
	
	@Bean
	public MessageListenerContainer messageHistoryListenerContainer()
	{
        DefaultMessageListenerContainer messageListenerContainer = new DefaultMessageListenerContainer();
        messageListenerContainer.setConnectionFactory(connectionFactory);
        messageListenerContainer.setDestinationName("flowable-history-jobs");
        messageListenerContainer.setMessageListener(historyJobsMessageListener());
        messageListenerContainer.setConcurrentConsumers(5);
        messageListenerContainer.start();
        return messageListenerContainer;
    }
	
	private JobMessageListener jobMessageListener()
	{
        JobMessageListener jobMessageListener = new JobMessageListener();
        JobServiceConfiguration jobServiceConfiguration = (JobServiceConfiguration) engineConfiguration.getServiceConfigurations().get(EngineConfigurationConstants.KEY_JOB_SERVICE_CONFIG);
        jobMessageListener.setJobServiceConfiguration(jobServiceConfiguration);
        return jobMessageListener;
    }
	
	private HistoryJobMessageListener historyJobsMessageListener()
	{
		HistoryJobMessageListener historyJobMessageListener = new HistoryJobMessageListener();
        JobServiceConfiguration jobServiceConfiguration = (JobServiceConfiguration) engineConfiguration.getServiceConfigurations().get(EngineConfigurationConstants.KEY_JOB_SERVICE_CONFIG);
        historyJobMessageListener.setJobServiceConfiguration(jobServiceConfiguration);
        return historyJobMessageListener;
    }
}

public class HistoryJobMessageListener implements javax.jms.MessageListener
{
    private static final Logger logger = LoggerFactory.getLogger(HistoryJobMessageListener.class);

    protected JobServiceConfiguration jobServiceConfiguration;
    protected AsyncRunnableExecutionExceptionHandler exceptionHandler;
    
    public HistoryJobMessageListener()
    {
        this.exceptionHandler = new UnacquireAsyncHistoryJobExceptionHandler();
    }

    @Override
    public void onMessage(final Message message)
    {
        try
        {
            if (message instanceof TextMessage)
            {
            	System.out.println("HISTORY; " + message);
            	
                TextMessage textMessage = (TextMessage) message;
                String jobId = textMessage.getText();
                
                ExecuteAsyncRunnable executeAsyncRunnable = new ExecuteAsyncRunnable(jobId, jobServiceConfiguration, jobServiceConfiguration.getHistoryJobEntityManager(), exceptionHandler);
                executeAsyncRunnable.run();
            }
        }
        catch (Exception e)
        {
            logger.error("Exception when handling message from job queue", e);
        }
    }

    public JobServiceConfiguration getJobServiceConfiguration()
    {
        return jobServiceConfiguration;
    }

    public void setJobServiceConfiguration(JobServiceConfiguration jobServiceConfiguration)
    {
        this.jobServiceConfiguration = jobServiceConfiguration;
    }
}

public class JobMessageListener implements javax.jms.MessageListener
{
    private static final Logger LOGGER = LoggerFactory.getLogger(JobMessageListener.class);

    protected JobServiceConfiguration jobServiceConfiguration;

    @Override
    public void onMessage(final Message message)
    {
        try
        {
            if (message instanceof TextMessage)
            {
            	System.out.println("RUNTIME; " + message);
            	
                TextMessage textMessage = (TextMessage) message;
                String jobId = textMessage.getText();

                ExecuteAsyncRunnable executeAsyncRunnable = new ExecuteAsyncRunnable(jobId, jobServiceConfiguration, jobServiceConfiguration.getJobEntityManager(), null);
                executeAsyncRunnable.run();
            }
        }
        catch (Exception e)
        {
            LOGGER.error("Exception when handling message from job queue", e);
        }
    }

    public JobServiceConfiguration getJobServiceConfigurationn()
    {
        return jobServiceConfiguration;
    }

    public void setJobServiceConfiguration(JobServiceConfiguration jobServiceConfiguration)
    {
        this.jobServiceConfiguration = jobServiceConfiguration;
    }
}

@Configuration
@ConditionalOnProcessEngine
@EnableConfigurationProperties({
    FlowableProperties.class,
    FlowableMailProperties.class,
    FlowableHttpProperties.class,
    FlowableProcessProperties.class,
    FlowableAppProperties.class,
    FlowableIdmProperties.class
})
@AutoConfigureAfter(value = {
    FlowableJpaAutoConfiguration.class,
    AppEngineAutoConfiguration.class,
}, name = {
    "org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration"
})
@AutoConfigureBefore({
    AppEngineServicesAutoConfiguration.class,
})
@Import({
    FlowableJobConfiguration.class
})
public class ProcessEngineAutoConfiguration extends AbstractSpringEngineAutoConfiguration {

    protected final FlowableProcessProperties processProperties;
    protected final FlowableAppProperties appProperties;
    protected final FlowableIdmProperties idmProperties;
    protected final FlowableMailProperties mailProperties;
    protected final FlowableHttpProperties httpProperties;

    public ProcessEngineAutoConfiguration(FlowableProperties flowableProperties, FlowableProcessProperties processProperties,
        FlowableAppProperties appProperties, FlowableIdmProperties idmProperties, FlowableMailProperties mailProperties,
        FlowableHttpProperties httpProperties) {
        
        super(flowableProperties);
        this.processProperties = processProperties;
        this.appProperties = appProperties;
        this.idmProperties = idmProperties;
        this.mailProperties = mailProperties;
        this.httpProperties = httpProperties;
    }

    /**
     * The Async Executor must not be shared between the engines.
     * Therefore a dedicated one is always created.
     */
    @Bean
    @ProcessAsync
    @ConfigurationProperties(prefix = "flowable.process.async.executor")
    @ConditionalOnMissingBean(name = "processAsyncExecutor")
    public SpringAsyncExecutor processAsyncExecutor(
        ObjectProvider<TaskExecutor> taskExecutor,
        @Process ObjectProvider<TaskExecutor> processTaskExecutor,
        ObjectProvider<SpringRejectedJobsHandler> rejectedJobsHandler,
        @Process ObjectProvider<SpringRejectedJobsHandler> processRejectedJobsHandler
    ) {
        return new SpringAsyncExecutor(
            getIfAvailable(processTaskExecutor, taskExecutor),
            getIfAvailable(processRejectedJobsHandler, rejectedJobsHandler)
        );
    }
    
    @Bean
    @ProcessAsyncHistory
    @ConfigurationProperties(prefix = "flowable.process.async-history.executor")
    @ConditionalOnMissingBean(name = "asyncHistoryExecutor")
    @ConditionalOnProperty(prefix = "flowable.process", name = "async-history.enable")
    public SpringAsyncHistoryExecutor asyncHistoryExecutor(
        ObjectProvider<TaskExecutor> taskExecutor,
        @Process ObjectProvider<TaskExecutor> processTaskExecutor,
        ObjectProvider<SpringRejectedJobsHandler> rejectedJobsHandler,
        @Process ObjectProvider<SpringRejectedJobsHandler> processRejectedJobsHandler
    ) {
        return new SpringAsyncHistoryExecutor(
            getIfAvailable(processTaskExecutor, taskExecutor),
            getIfAvailable(processRejectedJobsHandler, rejectedJobsHandler)
        );
    }

    /**
     * @param dataSource
     * @param platformTransactionManager
     * @param processIdGenerator
     * @param globalIdGenerator
     * @param asyncExecutorProvider
     * @param asyncHistoryExecutorProvider
     * @param jobManager
     * @return
     * @throws IOException
     */
    @Bean
    @ConditionalOnMissingBean
    public SpringProcessEngineConfiguration springProcessEngineConfiguration(DataSource dataSource, PlatformTransactionManager platformTransactionManager,
            @Process ObjectProvider<IdGenerator> processIdGenerator,
            ObjectProvider<IdGenerator> globalIdGenerator,
            @ProcessAsync ObjectProvider<AsyncExecutor> asyncExecutorProvider,
            @ProcessAsyncHistory ObjectProvider<AsyncExecutor> asyncHistoryExecutorProvider,
            JobManager jobManager) throws IOException {
    	
    	SpringProcessEngineConfiguration conf = new SpringProcessEngineConfiguration();

        List<Resource> resources = this.discoverDeploymentResources(
            flowableProperties.getProcessDefinitionLocationPrefix(),
            flowableProperties.getProcessDefinitionLocationSuffixes(),
            flowableProperties.isCheckProcessDefinitions()
        );

        if (resources != null && !resources.isEmpty()) {
            conf.setDeploymentResources(resources.toArray(new Resource[0]));
            conf.setDeploymentName(flowableProperties.getDeploymentName());
        }

        AsyncExecutor springAsyncExecutor = asyncExecutorProvider.getIfUnique();
        if (springAsyncExecutor != null) {
            conf.setAsyncExecutor(springAsyncExecutor);
        }
        
        AsyncExecutor springAsyncHistoryExecutor = asyncHistoryExecutorProvider.getIfUnique();
        if (springAsyncHistoryExecutor != null) {
            conf.setAsyncHistoryEnabled(true);
            conf.setAsyncHistoryExecutor(springAsyncHistoryExecutor);
        }

        configureSpringEngine(conf, platformTransactionManager);
        configureEngine(conf, dataSource);

        conf.setDeploymentName(defaultText(flowableProperties.getDeploymentName(), conf.getDeploymentName()));

        conf.setDisableIdmEngine(!(flowableProperties.isDbIdentityUsed() && idmProperties.isEnabled()));

        // async message queue mode...
        conf.setAsyncExecutorActivate(flowableProperties.isAsyncExecutorActivate());
        conf.setAsyncExecutorMessageQueueMode(true);
        
        // async history message queue mode...
        conf.setAsyncHistoryExecutorActivate(flowableProperties.isAsyncHistoryExecutorActivate());
        conf.setAsyncHistoryEnabled(true);
        conf.setAsyncHistoryExecutorMessageQueueMode(true);
        
        conf.setJobManager(jobManager);
        
        conf.setMailServerHost(mailProperties.getHost());
        conf.setMailServerPort(mailProperties.getPort());
        conf.setMailServerUsername(mailProperties.getUsername());
        conf.setMailServerPassword(mailProperties.getPassword());
        conf.setMailServerDefaultFrom(mailProperties.getDefaultFrom());
        conf.setMailServerForceTo(mailProperties.getForceTo());
        conf.setMailServerUseSSL(mailProperties.isUseSsl());
        conf.setMailServerUseTLS(mailProperties.isUseTls());

        conf.getHttpClientConfig().setUseSystemProperties(httpProperties.isUseSystemProperties());
        conf.getHttpClientConfig().setConnectionRequestTimeout(httpProperties.getConnectionRequestTimeout());
        conf.getHttpClientConfig().setConnectTimeout(httpProperties.getConnectTimeout());
        conf.getHttpClientConfig().setDisableCertVerify(httpProperties.isDisableCertVerify());
        conf.getHttpClientConfig().setRequestRetryLimit(httpProperties.getRequestRetryLimit());
        conf.getHttpClientConfig().setSocketTimeout(httpProperties.getSocketTimeout());

        conf.setEnableProcessDefinitionHistoryLevel(processProperties.isEnableProcessDefinitionHistoryLevel());
        conf.setProcessDefinitionCacheLimit(processProperties.getDefinitionCacheLimit());
        conf.setEnableSafeBpmnXml(processProperties.isEnableSafeXml());

        conf.setHistoryLevel(flowableProperties.getHistoryLevel());
        
        conf.setActivityFontName(flowableProperties.getActivityFontName());
        conf.setAnnotationFontName(flowableProperties.getAnnotationFontName());
        conf.setLabelFontName(flowableProperties.getLabelFontName());

        conf.setFormFieldValidationEnabled(flowableProperties.isFormFieldValidationEnabled());

        IdGenerator idGenerator = getIfAvailable(processIdGenerator, globalIdGenerator);
        if (idGenerator == null) {
            idGenerator = new StrongUuidGenerator();
        }
        conf.setIdGenerator(idGenerator);

        return conf;
    }
    
    @Configuration
    @ConditionalOnBean(type = {
        "org.flowable.app.spring.SpringAppEngineConfiguration"
    })
    public static class ProcessEngineAppConfiguration extends BaseEngineConfigurationWithConfigurers<SpringProcessEngineConfiguration> {

        @Bean
        @ConditionalOnMissingBean(name = "processAppEngineConfigurationConfigurer")
        public EngineConfigurationConfigurer<SpringAppEngineConfiguration> processAppEngineConfigurationConfigurer(ProcessEngineConfigurator processEngineConfigurator) {
            return appEngineConfiguration -> appEngineConfiguration.addConfigurator(processEngineConfigurator);
        }

        @Bean
        @ConditionalOnMissingBean
        public ProcessEngineConfigurator processEngineConfigurator(SpringProcessEngineConfiguration processEngineConfiguration) {
            SpringProcessEngineConfigurator processEngineConfigurator = new SpringProcessEngineConfigurator();
            processEngineConfigurator.setProcessEngineConfiguration(processEngineConfiguration);
            
            processEngineConfiguration.setDisableIdmEngine(true);
            
            invokeConfigurers(processEngineConfiguration);
            
            return processEngineConfigurator;
        }
    }
}

here is a part of the process.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:flowable="http://flowable.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.flowable.org/processdef">
  <process id="mqTest1" name="mqTest1" isExecutable="true">
    <startEvent id="startEvent1" flowable:formFieldValidation="true"></startEvent>
    <serviceTask id="taskA" name="TaskA" flowable:class="ar.com.telecom.st.pltesting.orquestador.delegates.mqTest1.TaskA"></serviceTask>
    <serviceTask id="taskB" name="TaskB" flowable:async="true" flowable:exclusive="false" flowable:class="ar.com.telecom.st.pltesting.orquestador.delegates.mqTest1.TaskB"></serviceTask>
    <serviceTask id="taskC" name="TaskC" flowable:async="true" flowable:exclusive="false" flowable:class="ar.com.telecom.st.pltesting.orquestador.delegates.mqTest1.TaskC"></serviceTask>
    <serviceTask id="taskD" name="TaskD" flowable:async="true" flowable:exclusive="false" flowable:class="ar.com.telecom.st.pltesting.orquestador.delegates.mqTest1.TaskD"></serviceTask>
    <serviceTask id="taskE" name="TaskE" flowable:async="true" flowable:exclusive="false" flowable:class="ar.com.telecom.st.pltesting.orquestador.delegates.mqTest1.TaskE"></serviceTask>
    <sequenceFlow id="sid-3E0A74B7-246C-43F8-A24C-0BFE9C0EAFC0" sourceRef="startEvent1" targetRef="taskA"></sequenceFlow>
    <sequenceFlow id="sid-D62E29EC-ADE9-4F7B-A429-15EFFDE94743" sourceRef="taskB" targetRef="taskC"></sequenceFlow>
    <sequenceFlow id="sid-21E1EB78-59A0-4673-AA8C-FAB8EA19E13D" sourceRef="taskC" targetRef="taskD"></sequenceFlow>
    <sequenceFlow id="sid-1DCFAAA7-7F24-444F-B4AE-2578C2E66DCE" sourceRef="taskD" targetRef="taskE"></sequenceFlow>
    <endEvent id="sid-EECA63C5-2D5D-4229-979E-35FF32232AF7"></endEvent>
    <sequenceFlow id="sid-5C725185-8D33-4D21-990E-1FDCFA9B6C66" sourceRef="taskE" targetRef="sid-EECA63C5-2D5D-4229-979E-35FF32232AF7"></sequenceFlow>
    <exclusiveGateway id="sid-262C14E7-734E-4935-871E-D811CCA9AA4E"></exclusiveGateway>
    <sequenceFlow id="sid-3E2180D4-1DA9-402A-B92B-7A0DC5C61C35" sourceRef="taskA" targetRef="sid-262C14E7-734E-4935-871E-D811CCA9AA4E"></sequenceFlow>
    <endEvent id="sid-3E738626-2D7D-48F7-AD00-933229EACB28"></endEvent>
    <sequenceFlow id="sid-36B48B2D-7B5B-4FE7-8165-26C50C9765C7" sourceRef="sid-262C14E7-734E-4935-871E-D811CCA9AA4E" targetRef="taskB">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${checkVar == true}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-477D4ED1-BDBA-48A9-8C3B-B7CC1CACD8DF" sourceRef="sid-262C14E7-734E-4935-871E-D811CCA9AA4E" targetRef="sid-3E738626-2D7D-48F7-AD00-933229EACB28">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${checkVar == false}]]></conditionExpression>
    </sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_mqTest1">
    <bpmndi:BPMNPlane bpmnElement="mqTest1" id="BPMNPlane_mqTest1">
      <bpmndi:BPMNShape bpmnElement="startEvent1" id="BPMNShape_startEvent1">
        <omgdc:Bounds height="30.0" width="30.0" x="45.0" y="160.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="taskA" id="BPMNShape_taskA">
        <omgdc:Bounds height="80.0" width="100.0" x="120.0" y="135.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="taskB" id="BPMNShape_taskB">
        <omgdc:Bounds height="80.0" width="100.0" x="345.0" y="135.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="taskC" id="BPMNShape_taskC">
        <omgdc:Bounds height="80.0" width="100.0" x="510.0" y="135.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="taskD" id="BPMNShape_taskD">
        <omgdc:Bounds height="80.0" width="100.0" x="675.0" y="135.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="taskE" id="BPMNShape_taskE">
        <omgdc:Bounds height="80.0" width="100.0" x="840.0" y="135.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-EECA63C5-2D5D-4229-979E-35FF32232AF7" id="BPMNShape_sid-EECA63C5-2D5D-4229-979E-35FF32232AF7">
        <omgdc:Bounds height="28.0" width="28.0" x="985.0" y="161.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-262C14E7-734E-4935-871E-D811CCA9AA4E" id="BPMNShape_sid-262C14E7-734E-4935-871E-D811CCA9AA4E">
        <omgdc:Bounds height="40.0" width="40.0" x="255.0" y="155.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-3E738626-2D7D-48F7-AD00-933229EACB28" id="BPMNShape_sid-3E738626-2D7D-48F7-AD00-933229EACB28">
        <omgdc:Bounds height="28.0" width="28.0" x="261.0" y="274.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sid-D62E29EC-ADE9-4F7B-A429-15EFFDE94743" id="BPMNEdge_sid-D62E29EC-ADE9-4F7B-A429-15EFFDE94743">
        <omgdi:waypoint x="444.9499999999835" y="175.0"></omgdi:waypoint>
        <omgdi:waypoint x="509.99999999998465" y="175.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-477D4ED1-BDBA-48A9-8C3B-B7CC1CACD8DF" id="BPMNEdge_sid-477D4ED1-BDBA-48A9-8C3B-B7CC1CACD8DF">
        <omgdi:waypoint x="275.41517857142856" y="194.52607047279218"></omgdi:waypoint>
        <omgdi:waypoint x="275.06199939754373" y="274.0001360239344"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-3E2180D4-1DA9-402A-B92B-7A0DC5C61C35" id="BPMNEdge_sid-3E2180D4-1DA9-402A-B92B-7A0DC5C61C35">
        <omgdi:waypoint x="219.95" y="175.0"></omgdi:waypoint>
        <omgdi:waypoint x="255.0" y="175.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-1DCFAAA7-7F24-444F-B4AE-2578C2E66DCE" id="BPMNEdge_sid-1DCFAAA7-7F24-444F-B4AE-2578C2E66DCE">
        <omgdi:waypoint x="774.9499999999836" y="175.0"></omgdi:waypoint>
        <omgdi:waypoint x="839.9999999999847" y="175.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-3E0A74B7-246C-43F8-A24C-0BFE9C0EAFC0" id="BPMNEdge_sid-3E0A74B7-246C-43F8-A24C-0BFE9C0EAFC0">
        <omgdi:waypoint x="74.94999848995758" y="175.0"></omgdi:waypoint>
        <omgdi:waypoint x="120.0" y="175.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-21E1EB78-59A0-4673-AA8C-FAB8EA19E13D" id="BPMNEdge_sid-21E1EB78-59A0-4673-AA8C-FAB8EA19E13D">
        <omgdi:waypoint x="609.9499999999836" y="175.0"></omgdi:waypoint>
        <omgdi:waypoint x="674.9999999999847" y="175.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-5C725185-8D33-4D21-990E-1FDCFA9B6C66" id="BPMNEdge_sid-5C725185-8D33-4D21-990E-1FDCFA9B6C66">
        <omgdi:waypoint x="939.949999999996" y="175.0"></omgdi:waypoint>
        <omgdi:waypoint x="985.0" y="175.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-36B48B2D-7B5B-4FE7-8165-26C50C9765C7" id="BPMNEdge_sid-36B48B2D-7B5B-4FE7-8165-26C50C9765C7">
        <omgdi:waypoint x="294.52159949620784" y="175.42016806722688"></omgdi:waypoint>
        <omgdi:waypoint x="344.99999999998505" y="175.20899581589958"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

here is a part of the file ‘application.yml’ used in our spring boot project:

spring:
  application:
    name: orquestador
  banner:
    location: classpath:/org/flowable/spring/boot/flowable-banner.txt
  task:
    execution:
      pool:
        core-size: 10
        max-size: 50
        queue-capacity: 1000
      thread-name-prefix: ote-
    scheduling:
      pool:
        size: 5

server:
  port: 8080
  servlet:
    context-path: /orquestador

flowable:
  database-schema-update: none
  check-process-definitions: true
  deployment-name: orquestador
  async-executor-activate: true
  async-history-executor-activate: true
  app:
    enabled: false
  cmmn:
    enabled: false
  content:
    enabled: false
  dmn:
    enabled: true
  form:
    enabled: false
  idm:
    enabled: false
  process:
    servlet:
      path: /flowable-rest
    async:
      executor:
        message-queue-mode: true
        async-job-acquisition-enabled: false
        reset-expired-job-enabled: true
        timer-job-acquisition-enabled: true
        max-timer-jobs-per-acquisition: 10
        default-timer-job-acquire-wait-time-in-millis: 60000
        timer-lock-time-in-millis: 300000
    async-history:
      executor:
        message-queue-mode: true
        async-job-acquisition-enabled: false
        reset-expired-job-enabled: true
        timer-job-acquisition-enabled: true

mqbroker:
  url: tcp://localhost:61616

management:
  endpoints:
    web:
      exposure:
        include:
          - beans
          - env
          - health
          - info