"XOR split could not find at least one valid outgoing connection for split Gateway" ERROR is thrown when trying to complete a process in jBPM5/6

Solution Unverified - Updated -

Environment

  • Red Hat JBoss BRMS (BRMS)
    • 5.3.0
  • Red Hat Jboss BPM Suite (BPMS)
    • 6.x

Issue

In jBPM 5 for a process branch involving an XOR gateway, when users call the complete(...) task function after the Human Task is reached in the flow, sometimes the below error is returned.

...
10:27:48,933 ERROR [HornetQTaskClientConnector] Client Exception with class class org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1 using port 5153
java.lang.IllegalArgumentException: XOR split could not find at least one valid outgoing connection for split Gateway
...

It is found that if users edit the process and enter the XOR constraints again it will work and the error will not be displayed again. The below code is called to complete the task.

...
        TaskClient client = null;
        try {

                client = getHumanTaskClient();
                BlockingTaskOperationResponseHandler handler = new BlockingTaskOperationResponseHandler();
                ContentData contentData = new ContentData();
                ByteArrayOutputStream boStream = new ByteArrayOutputStream();
                                ObjectOutputStream outStream = new ObjectOutputStream(boStream);
                                Map output = new HashMap();
                                ...
                                output.put("outcome", outcome);
                                outStream.writeObject(output);
                                outStream.close();
                                contentData.setContent(boStream.toByteArray());
                                contentData.setAccessType(AccessType.Inline);
                ...
                client.start(Long.valueOf(taskId), user, handler);
                logger.debug("start .. ");
                client.complete(Long.valueOf(taskId), user, contentData, handler);
                ...
                handler.waitTillDone(100);            --- > This is where error occurs 
                ...                    

What could be the root cause of this issue?

Resolution

Meanwhile, just to give pointers on this kind of issue, may be users should review the XOR gateway conditions to verify if they are set properly to provide at least one valid outgoing connection for the process. Some of the known mistakes users do is evaluating drools expressions (which are set at the gateways) based on process variables. Drools expressions work with facts not process variables. Hence, users should try to insert those process variables first into working-memory as facts before the XOR gateway is reached so that the gateway validation runs properly.

Note :

First of all, do note this important information about the support for BRMS 5.x releases. The support for BRMS 5.x releases has ended this on May 2015 as per the official article on Red Hat JBoss Middleware and Red Hat JBoss Operations Network Product Update and Support Policy . Hence Red Hat Technical Support Team would not be able to support the queries or issues raised for BRMS 5.x releases after May 2015 . If any bug/issues are encountered with the BRMS 5.x release then Red Hat won't be able to provide patches for that old release as well.

The recommendation is that users must upgrade to any higher release of this product (i.e. Red Hat JBoss BRMS 6 or Red Hat JBoss BPMS 6) to continue availing support for the queries or issues. Else if users have a strong business reason to continue to use BRMS 5.x releases and if they still want to avail full support to their queries or issues related to that older release, they must purchase the Extended Life Support subscription for BRMS 5.x releases.

Root Cause

  • There could be many reasons for this issue depending on the usage of XOR Gateway.
    • XOR gateway conditions might not have been set properly to provide at least one valid outgoing connection for the process.
    • Evaluating drools expressions (which are set at the gateways) based on process variables. Whereas, Drools expressions work with facts not process variables.

Diagnostic Steps

  • Check the process flow;
  • Check the conditions at XOR Gateway.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.