cancel
Showing results for 
Search instead for 
Did you mean: 

simple drools rule with input of process variables

ajeje93
Confirmed Champ
Confirmed Champ

I would like  to implement a simple business rule task:

<businessRuleTask id="businessruletask1" name="Business rule task" activiti:ruleVariablesInput="${input1}, ${input2}" activiti:rules="DecideWS" activiti:resultVariable="choice"></businessRuleTask>

where input1 and input2 are process variables that I set before starting an instance.

The rule is the following:

rule "DecideWS"

    when
        input1 = 0.8
    then
        1

end

When I try to deploy it I get the error:

[5,9]: [ERR 102] Line 5:9 mismatched input '=' in rule "DecideWS"
[0,0]: Parser returned a null Package

How can I implement such a rule?

Let's suppose that input1 and input2 are of type ArrayList<Double>, how can I tell to Drools to get an element inside them?

Thanks in advance.

1 ACCEPTED ANSWER

ajeje93
Confirmed Champ
Confirmed Champ

I solved by creating an other class that describes an input object for the drools engine.

View answer in original post

1 REPLY 1

ajeje93
Confirmed Champ
Confirmed Champ

I solved by creating an other class that describes an input object for the drools engine.