cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel Gateway - set priority to execution path

raghuraman
Champ in-the-making
Champ in-the-making
Hi,

I have parallel gateway with two sequences , one has listener and another one has Message catch event. The listener executes first and throws an message to another process instance and again its throwing message back to another sequence of parallel gateway. but by this time message catch event in parallel hasnt reached. I mean its not there in the subscription table yet to receive the message.

below is the query which is trying to throw a message from another process to current parallel gateway message catch
exec.getEngineServices().getRuntimeService().createExecutionQuery().messageEventSubscriptionName(messageName).processInstanceId(id) thrown null pointer exception .

What I observed here is, though its parallel gateway , its not concurrent thread. So it executes sequence. Is it possible to set the priority set sequence flow in the gateway to make particular sequence flow to execute first?
or anyother way to achieve this?

In the above scenario, I want message catch sequence flow executed first before sequence flow which has listener.

1 REPLY 1

jbarrez
Star Contributor
Star Contributor
No, Activiti does not use threads for parallel gateways: http://activiti.org/faq.html#WhatIsTheDifferenceBetweenProcessConcurrencyAndJavaConcurrency

The order of execution is the order of definition in the XML.