diff options
author | 2017-07-24 17:13:43 +0000 | |
---|---|---|
committer | 2017-07-25 14:23:59 +0000 | |
commit | e92ff832cf993db876f22b2d27562fedf59f5043 (patch) | |
tree | 47429eeaaf4241905d7ea1f71dbdb5c2d0504618 /POLICY-SDK-APP/src/test/resources/com.Config_BRMS_Raw_TestBRMSRawPolicy.1.txt | |
parent | 570290dc6ba8198e653022c2f6f8e5d01cfa8d1b (diff) |
[Policy-52, Policy-92, Policy-93] Policy Enhancements and bugfixes
Change-Id: I5675cf4527e17963b3142cf7184c0df31a766197
Signed-off-by: Tarun Tej Velaga <tt3868@att.com>
Diffstat (limited to 'POLICY-SDK-APP/src/test/resources/com.Config_BRMS_Raw_TestBRMSRawPolicy.1.txt')
-rw-r--r-- | POLICY-SDK-APP/src/test/resources/com.Config_BRMS_Raw_TestBRMSRawPolicy.1.txt | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/POLICY-SDK-APP/src/test/resources/com.Config_BRMS_Raw_TestBRMSRawPolicy.1.txt b/POLICY-SDK-APP/src/test/resources/com.Config_BRMS_Raw_TestBRMSRawPolicy.1.txt new file mode 100644 index 000000000..6924fc3a9 --- /dev/null +++ b/POLICY-SDK-APP/src/test/resources/com.Config_BRMS_Raw_TestBRMSRawPolicy.1.txt @@ -0,0 +1,35 @@ +package com.sample +import com.sample.DroolsTest.Message; +// Declare the Parameters here. +declare Params + 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 |