package com.sample import com.sample.DroolsTest.Message; // Declare the Parameters here. declare PapParams samPoll : int value : String end // This Rule will be generated by the UI. rule "Create parameters structure" salience 1000 when then Params params = new Params(); params.setSamPoll(76); params.setValue("Bobby"); insertLogical(params); end // Start using the parameters as below in Rules. rule "Rule 1: Check parameter structure access from when/then" when $param: Params() Params($param.samPoll > 50) then System.out.println("Firing rule 1"); System.out.println($param); end rule "Rule 2: Check parameter value access from when/then" when $param: Params() Params($param.samPoll > 50) then System.out.println("Firing rule 2"); System.out.println($param.getValue()); System.out.println($param.getSamPoll()); end