simple drools rule with input of process variables

cancel
Showing results for 
Search instead for 
Did you mean: 
ajeje93
Active Member II

simple drools rule with input of process variables

Jump to solution

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 Solution

Accepted Solutions
ajeje93
Active Member II

Re: simple drools rule with input of process variables

Jump to solution

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

View solution in original post

1 Reply
ajeje93
Active Member II

Re: simple drools rule with input of process variables

Jump to solution

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