DMN Rule order multiple out to pass through a single gateway

Hi everyone.
I have a rule engine that’s going to give me multiple values output i.e. Hit policy is Rule Order.
[

{

    "nextActivity": {

        "type": "String",

        "value": "Checker 3",

        "valueInfo": {}

    }

},

{

    "nextActivity": {

        "type": "String",

        "value": "Checker 2",

        "valueInfo": {}

    }

}

]

This is the output I get . Now Checker 2 and 3 are different process that gonna execute. Now as both are handled in nextActivity variable how do I make a gateway , like out of many activities that are decided by the gateway, I want both of the above to get executed i.e. satisfying to out paths.
Thanks in advance.

Hi @Akash_Gupta ,

On the Business Rule Task add a output variable, lets assume “var1”. Now as per your hit policy, you could get a list of outcomes, so choose collectEntries(List) in Map Decision Result.

The output variable will now hold values in a list. In your case [“Checker 1”, “Checker 2”]

Use inclusive gateway as it uses or condition as a gateway rule and on the paths use the values from the list using expression language. i.e. ${var1[0]==‘Checker 1’} .

Follow below link to learn more about expression language:

https://docs.camunda.org/manual/latest/user-guide/process-engine/expression-language/

I hope it Helps.

Thanks
Anmol

Hi @Anmol_Gupta ,
The way you used var1[0] == Checker1, but I am not sure if the order of checker1 and checker2 will be like this. And there are other multiple activities too. So I have to check all the entries of output, i.e. are handled in var1.

1 Like