2 import com.sample.DroolsTest.Message;
3 // Declare the Parameters here.
8 // This Rule will be generated by the UI.
9 rule "Create parameters structure"
13 Params params = new Params();
14 params.setSamPoll(76);
15 params.setValue("Bobby");
16 insertLogical(params);
18 // Start using the parameters as below in Rules.
19 rule "Rule 1: Check parameter structure access from when/then"
22 Params($param.samPoll > 50)
24 System.out.println("Firing rule 1");
25 System.out.println($param);
27 rule "Rule 2: Check parameter value access from when/then"
30 Params($param.samPoll > 50)
32 System.out.println("Firing rule 2");
33 System.out.println($param.getValue());
34 System.out.println($param.getSamPoll());