[jboss-svn-commits] JBL Code SVN: r14683 - labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Aug 28 00:53:37 EDT 2007


Author: fmeyer
Date: 2007-08-28 00:53:37 -0400 (Tue, 28 Aug 2007)
New Revision: 14683

Added:
   labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/acme.dsl
   labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/insurance-process.rf
   labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/insurance-process.rfm
   labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/insurancefactor.drl
   labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/marginalage.dslr
Log:
adding ruleflow and ds;wql


Added: labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/acme.dsl
===================================================================
--- labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/acme.dsl	                        (rev 0)
+++ labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/acme.dsl	2007-08-28 04:53:37 UTC (rev 14683)
@@ -0,0 +1,13 @@
+[condition][]There is a Driver=Driver()
+[condition][]- age less than {age} years old=age < {age}
+[condition][]- age is equal to {age} years old=age == {age}
+[condition][]- age greater than {age} years old=age > {age}
+[condition][]- has had more than {number} prior claims=priorClaims > {number}
+[condition][]- is male=genre == Driver.MALE
+[condition][]- age is at least {age}=age >= {age}
+[condition][]- age is between {lower} and {upper} years old=age >= {lower}, age <= {upper}
+[condition][]- has had exactly {number} prior claims=priorClaims ==  {number}
+[condition][]- is maried=martialStatus == Driver.MARRIED
+[consequence][]Reject Policy with explanation : '{reason}'=insert(new Rejection("{reason}"));
+[condition][]Policy has not been rejected=not Rejection()
+[consequence][]Approve Policy with the reason : '{reason}'=insert(new Approve("{reason}"));

Added: labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/insurance-process.rf
===================================================================
--- labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/insurance-process.rf	                        (rev 0)
+++ labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/insurance-process.rf	2007-08-28 04:53:37 UTC (rev 14683)
@@ -0,0 +1,571 @@
+<org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper id="1" serialization="custom">
+  <org.drools.eclipse.flow.common.editor.core.ProcessWrapper>
+    <default>
+      <elements id="2">
+        <entry>
+          <string>5-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper id="3" serialization="custom">
+            <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+              <default>
+                <constraint id="4">
+                  <x>546</x>
+                  <y>167</y>
+                  <width>80</width>
+                  <height>40</height>
+                </constraint>
+                <element class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="5">
+                  <ruleFlowGroup>rejection</ruleFlowGroup>
+                  <id>5</id>
+                  <name>rejection</name>
+                  <incomingConnections id="6">
+                    <org.drools.ruleflow.core.impl.ConnectionImpl id="7">
+                      <type>1</type>
+                      <from class="org.drools.ruleflow.core.impl.ActionNodeImpl" id="8">
+                        <action class="org.drools.ruleflow.core.impl.DroolsConsequenceAction" id="9">
+                          <consequence>System.out.println(&quot;Rejection&quot;);</consequence>
+                        </action>
+                        <id>10</id>
+                        <name>Action</name>
+                        <incomingConnections id="10">
+                          <org.drools.ruleflow.core.impl.ConnectionImpl id="11">
+                            <type>1</type>
+                            <from class="org.drools.ruleflow.core.impl.SplitImpl" id="12">
+                              <type>2</type>
+                              <constraints id="13">
+                                <entry>
+                                  <org.drools.ruleflow.core.impl.ConnectionImpl id="14">
+                                    <type>1</type>
+                                    <from class="org.drools.ruleflow.core.impl.SplitImpl" reference="12"/>
+                                    <to class="org.drools.ruleflow.core.impl.ActionNodeImpl" id="15">
+                                      <action class="org.drools.ruleflow.core.impl.DroolsConsequenceAction" id="16">
+                                        <consequence>System.out.println(&quot;Insurance calculate&quot;);</consequence>
+                                      </action>
+                                      <id>9</id>
+                                      <name>Action</name>
+                                      <incomingConnections id="17">
+                                        <org.drools.ruleflow.core.impl.ConnectionImpl reference="14"/>
+                                      </incomingConnections>
+                                      <outgoingConnections id="18">
+                                        <org.drools.ruleflow.core.impl.ConnectionImpl id="19">
+                                          <type>1</type>
+                                          <from class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="15"/>
+                                          <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="20">
+                                            <ruleFlowGroup>insurancecalcule</ruleFlowGroup>
+                                            <id>4</id>
+                                            <name>insurancecalcule</name>
+                                            <incomingConnections id="21">
+                                              <org.drools.ruleflow.core.impl.ConnectionImpl reference="19"/>
+                                            </incomingConnections>
+                                            <outgoingConnections id="22">
+                                              <org.drools.ruleflow.core.impl.ConnectionImpl id="23">
+                                                <type>1</type>
+                                                <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="20"/>
+                                                <to class="org.drools.ruleflow.core.impl.JoinImpl" id="24">
+                                                  <type>2</type>
+                                                  <id>8</id>
+                                                  <name>Join</name>
+                                                  <incomingConnections id="25">
+                                                    <org.drools.ruleflow.core.impl.ConnectionImpl reference="23"/>
+                                                    <org.drools.ruleflow.core.impl.ConnectionImpl id="26">
+                                                      <type>1</type>
+                                                      <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="5"/>
+                                                      <to class="org.drools.ruleflow.core.impl.JoinImpl" reference="24"/>
+                                                    </org.drools.ruleflow.core.impl.ConnectionImpl>
+                                                  </incomingConnections>
+                                                  <outgoingConnections id="27">
+                                                    <org.drools.ruleflow.core.impl.ConnectionImpl id="28">
+                                                      <type>1</type>
+                                                      <from class="org.drools.ruleflow.core.impl.JoinImpl" reference="24"/>
+                                                      <to class="org.drools.ruleflow.core.impl.EndNodeImpl" id="29">
+                                                        <id>2</id>
+                                                        <name>End</name>
+                                                        <incomingConnections id="30">
+                                                          <org.drools.ruleflow.core.impl.ConnectionImpl reference="28"/>
+                                                        </incomingConnections>
+                                                        <outgoingConnections id="31"/>
+                                                      </to>
+                                                    </org.drools.ruleflow.core.impl.ConnectionImpl>
+                                                  </outgoingConnections>
+                                                </to>
+                                              </org.drools.ruleflow.core.impl.ConnectionImpl>
+                                            </outgoingConnections>
+                                          </to>
+                                        </org.drools.ruleflow.core.impl.ConnectionImpl>
+                                      </outgoingConnections>
+                                    </to>
+                                  </org.drools.ruleflow.core.impl.ConnectionImpl>
+                                  <org.drools.ruleflow.core.impl.ConstraintImpl id="32">
+                                    <name>constraint</name>
+                                    <constraint>		not Rejection()
+		$policy : Policy( approved == true )
+</constraint>
+                                    <priority>0</priority>
+                                  </org.drools.ruleflow.core.impl.ConstraintImpl>
+                                </entry>
+                                <entry>
+                                  <org.drools.ruleflow.core.impl.ConnectionImpl reference="11"/>
+                                  <org.drools.ruleflow.core.impl.ConstraintImpl id="33">
+                                    <name>constraint</name>
+                                    <constraint>$policy : Policy( approved == false )
+</constraint>
+                                    <priority>1</priority>
+                                  </org.drools.ruleflow.core.impl.ConstraintImpl>
+                                </entry>
+                              </constraints>
+                              <id>7</id>
+                              <name>Split</name>
+                              <incomingConnections id="34">
+                                <org.drools.ruleflow.core.impl.ConnectionImpl id="35">
+                                  <type>1</type>
+                                  <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="36">
+                                    <ruleFlowGroup>risk assessment</ruleFlowGroup>
+                                    <id>3</id>
+                                    <name>risk assessment</name>
+                                    <incomingConnections id="37">
+                                      <org.drools.ruleflow.core.impl.ConnectionImpl id="38">
+                                        <type>1</type>
+                                        <from class="org.drools.ruleflow.core.impl.StartNodeImpl" id="39">
+                                          <id>1</id>
+                                          <name>Start</name>
+                                          <incomingConnections id="40"/>
+                                          <outgoingConnections id="41">
+                                            <org.drools.ruleflow.core.impl.ConnectionImpl reference="38"/>
+                                          </outgoingConnections>
+                                        </from>
+                                        <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="36"/>
+                                      </org.drools.ruleflow.core.impl.ConnectionImpl>
+                                    </incomingConnections>
+                                    <outgoingConnections id="42">
+                                      <org.drools.ruleflow.core.impl.ConnectionImpl reference="35"/>
+                                    </outgoingConnections>
+                                  </from>
+                                  <to class="org.drools.ruleflow.core.impl.SplitImpl" reference="12"/>
+                                </org.drools.ruleflow.core.impl.ConnectionImpl>
+                              </incomingConnections>
+                              <outgoingConnections id="43">
+                                <org.drools.ruleflow.core.impl.ConnectionImpl reference="14"/>
+                                <org.drools.ruleflow.core.impl.ConnectionImpl reference="11"/>
+                              </outgoingConnections>
+                            </from>
+                            <to class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="8"/>
+                          </org.drools.ruleflow.core.impl.ConnectionImpl>
+                        </incomingConnections>
+                        <outgoingConnections id="44">
+                          <org.drools.ruleflow.core.impl.ConnectionImpl reference="7"/>
+                        </outgoingConnections>
+                      </from>
+                      <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="5"/>
+                    </org.drools.ruleflow.core.impl.ConnectionImpl>
+                  </incomingConnections>
+                  <outgoingConnections id="45">
+                    <org.drools.ruleflow.core.impl.ConnectionImpl reference="26"/>
+                  </outgoingConnections>
+                </element>
+                <incomingConnections id="46">
+                  <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="47" serialization="custom">
+                    <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                      <default>
+                        <type>1</type>
+                        <bendpoints id="48"/>
+                        <source class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" id="49" serialization="custom">
+                          <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                            <default>
+                              <constraint id="50">
+                                <x>393</x>
+                                <y>167</y>
+                                <width>80</width>
+                                <height>40</height>
+                              </constraint>
+                              <element class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="8"/>
+                              <incomingConnections id="51">
+                                <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="52" serialization="custom">
+                                  <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                    <default>
+                                      <type>1</type>
+                                      <bendpoints id="53"/>
+                                      <source class="org.drools.eclipse.flow.ruleflow.core.SplitWrapper" id="54" serialization="custom">
+                                        <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                          <default>
+                                            <constraint id="55">
+                                              <x>319</x>
+                                              <y>100</y>
+                                              <width>80</width>
+                                              <height>40</height>
+                                            </constraint>
+                                            <element class="org.drools.ruleflow.core.impl.SplitImpl" reference="12"/>
+                                            <incomingConnections id="56">
+                                              <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="57" serialization="custom">
+                                                <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                  <default>
+                                                    <type>1</type>
+                                                    <bendpoints id="58"/>
+                                                    <source class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" id="59" serialization="custom">
+                                                      <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                        <default>
+                                                          <constraint id="60">
+                                                            <x>176</x>
+                                                            <y>99</y>
+                                                            <width>113</width>
+                                                            <height>40</height>
+                                                          </constraint>
+                                                          <element class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="36"/>
+                                                          <incomingConnections id="61">
+                                                            <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="62" serialization="custom">
+                                                              <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                                <default>
+                                                                  <type>1</type>
+                                                                  <bendpoints id="63"/>
+                                                                  <source class="org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper" id="64" serialization="custom">
+                                                                    <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                                      <default>
+                                                                        <constraint id="65">
+                                                                          <x>56</x>
+                                                                          <y>98</y>
+                                                                          <width>80</width>
+                                                                          <height>40</height>
+                                                                        </constraint>
+                                                                        <element class="org.drools.ruleflow.core.impl.StartNodeImpl" reference="39"/>
+                                                                        <incomingConnections id="66"/>
+                                                                        <outgoingConnections id="67">
+                                                                          <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="62"/>
+                                                                        </outgoingConnections>
+                                                                      </default>
+                                                                    </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                                  </source>
+                                                                  <target class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" reference="59"/>
+                                                                </default>
+                                                              </org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                              <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                                <default>
+                                                                  <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="38"/>
+                                                                </default>
+                                                              </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                            </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                          </incomingConnections>
+                                                          <outgoingConnections id="68">
+                                                            <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="57"/>
+                                                          </outgoingConnections>
+                                                          <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
+                                                        </default>
+                                                      </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                    </source>
+                                                    <target class="org.drools.eclipse.flow.ruleflow.core.SplitWrapper" reference="54"/>
+                                                  </default>
+                                                </org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                  <default>
+                                                    <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="35"/>
+                                                  </default>
+                                                </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                              </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                            </incomingConnections>
+                                            <outgoingConnections id="69">
+                                              <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="70" serialization="custom">
+                                                <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                  <default>
+                                                    <type>1</type>
+                                                    <bendpoints id="71"/>
+                                                    <source class="org.drools.eclipse.flow.ruleflow.core.SplitWrapper" reference="54"/>
+                                                    <target class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" id="72" serialization="custom">
+                                                      <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                        <default>
+                                                          <constraint id="73">
+                                                            <x>395</x>
+                                                            <y>34</y>
+                                                            <width>80</width>
+                                                            <height>40</height>
+                                                          </constraint>
+                                                          <element class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="15"/>
+                                                          <incomingConnections id="74">
+                                                            <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="70"/>
+                                                          </incomingConnections>
+                                                          <outgoingConnections id="75">
+                                                            <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="76" serialization="custom">
+                                                              <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                                <default>
+                                                                  <type>1</type>
+                                                                  <bendpoints id="77"/>
+                                                                  <source class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" reference="72"/>
+                                                                  <target class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" id="78" serialization="custom">
+                                                                    <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                                      <default>
+                                                                        <constraint id="79">
+                                                                          <x>530</x>
+                                                                          <y>36</y>
+                                                                          <width>123</width>
+                                                                          <height>40</height>
+                                                                        </constraint>
+                                                                        <element class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="20"/>
+                                                                        <incomingConnections id="80">
+                                                                          <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="76"/>
+                                                                        </incomingConnections>
+                                                                        <outgoingConnections id="81">
+                                                                          <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="82" serialization="custom">
+                                                                            <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                                              <default>
+                                                                                <type>1</type>
+                                                                                <bendpoints id="83"/>
+                                                                                <source class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" reference="78"/>
+                                                                                <target class="org.drools.eclipse.flow.ruleflow.core.JoinWrapper" id="84" serialization="custom">
+                                                                                  <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                                                    <default>
+                                                                                      <constraint id="85">
+                                                                                        <x>635</x>
+                                                                                        <y>98</y>
+                                                                                        <width>80</width>
+                                                                                        <height>40</height>
+                                                                                      </constraint>
+                                                                                      <element class="org.drools.ruleflow.core.impl.JoinImpl" reference="24"/>
+                                                                                      <incomingConnections id="86">
+                                                                                        <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="82"/>
+                                                                                        <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="87" serialization="custom">
+                                                                                          <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                                                            <default>
+                                                                                              <type>1</type>
+                                                                                              <bendpoints id="88"/>
+                                                                                              <source class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" reference="3"/>
+                                                                                              <target class="org.drools.eclipse.flow.ruleflow.core.JoinWrapper" reference="84"/>
+                                                                                            </default>
+                                                                                          </org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                                                          <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                                                            <default>
+                                                                                              <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="26"/>
+                                                                                            </default>
+                                                                                          </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                                                        </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                                                      </incomingConnections>
+                                                                                      <outgoingConnections id="89">
+                                                                                        <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="90" serialization="custom">
+                                                                                          <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                                                            <default>
+                                                                                              <type>1</type>
+                                                                                              <bendpoints id="91"/>
+                                                                                              <source class="org.drools.eclipse.flow.ruleflow.core.JoinWrapper" reference="84"/>
+                                                                                              <target class="org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper" id="92" serialization="custom">
+                                                                                                <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                                                                  <default>
+                                                                                                    <constraint id="93">
+                                                                                                      <x>763</x>
+                                                                                                      <y>99</y>
+                                                                                                      <width>80</width>
+                                                                                                      <height>40</height>
+                                                                                                    </constraint>
+                                                                                                    <element class="org.drools.ruleflow.core.impl.EndNodeImpl" reference="29"/>
+                                                                                                    <incomingConnections id="94">
+                                                                                                      <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="90"/>
+                                                                                                    </incomingConnections>
+                                                                                                    <outgoingConnections id="95"/>
+                                                                                                    <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
+                                                                                                  </default>
+                                                                                                </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                                                              </target>
+                                                                                            </default>
+                                                                                          </org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                                                          <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                                                            <default>
+                                                                                              <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="28"/>
+                                                                                            </default>
+                                                                                          </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                                                        </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                                                      </outgoingConnections>
+                                                                                      <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
+                                                                                    </default>
+                                                                                  </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                                                </target>
+                                                                              </default>
+                                                                            </org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                                            <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                                              <default>
+                                                                                <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="23"/>
+                                                                              </default>
+                                                                            </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                                          </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                                        </outgoingConnections>
+                                                                        <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
+                                                                      </default>
+                                                                    </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                                  </target>
+                                                                </default>
+                                                              </org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                              <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                                <default>
+                                                                  <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="19"/>
+                                                                </default>
+                                                              </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                            </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                          </outgoingConnections>
+                                                          <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
+                                                        </default>
+                                                      </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                      <org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
+                                                        <default>
+                                                          <descriptors id="96">
+                                                            <org.eclipse.ui.views.properties.TextPropertyDescriptor id="97">
+                                                              <id class="string">Name</id>
+                                                              <display>Name</display>
+                                                              <incompatible>false</incompatible>
+                                                            </org.eclipse.ui.views.properties.TextPropertyDescriptor>
+                                                            <org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor id="98">
+                                                              <process class="org.drools.ruleflow.core.impl.RuleFlowProcessImpl" id="99">
+                                                                <nodes id="100">
+                                                                  <entry>
+                                                                    <long>2</long>
+                                                                    <org.drools.ruleflow.core.impl.EndNodeImpl reference="29"/>
+                                                                  </entry>
+                                                                  <entry>
+                                                                    <long>4</long>
+                                                                    <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="20"/>
+                                                                  </entry>
+                                                                  <entry>
+                                                                    <long>8</long>
+                                                                    <org.drools.ruleflow.core.impl.JoinImpl reference="24"/>
+                                                                  </entry>
+                                                                  <entry>
+                                                                    <long>9</long>
+                                                                    <org.drools.ruleflow.core.impl.ActionNodeImpl reference="15"/>
+                                                                  </entry>
+                                                                  <entry>
+                                                                    <long>1</long>
+                                                                    <org.drools.ruleflow.core.impl.StartNodeImpl reference="39"/>
+                                                                  </entry>
+                                                                  <entry>
+                                                                    <long>3</long>
+                                                                    <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="36"/>
+                                                                  </entry>
+                                                                  <entry>
+                                                                    <long>7</long>
+                                                                    <org.drools.ruleflow.core.impl.SplitImpl reference="12"/>
+                                                                  </entry>
+                                                                  <entry>
+                                                                    <long>10</long>
+                                                                    <org.drools.ruleflow.core.impl.ActionNodeImpl reference="8"/>
+                                                                  </entry>
+                                                                  <entry>
+                                                                    <long>5</long>
+                                                                    <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="5"/>
+                                                                  </entry>
+                                                                </nodes>
+                                                                <variables id="101"/>
+                                                                <lastNodeId>10</lastNodeId>
+                                                                <imports id="102">
+                                                                  <string>org.acme.insurance.base.Rejection</string>
+                                                                  <string>org.acme.insurance.base.Policy</string>
+                                                                </imports>
+                                                                <id>insuranceProcess</id>
+                                                                <name>insurance-process</name>
+                                                                <version>1.0</version>
+                                                                <type>RuleFlow</type>
+                                                              </process>
+                                                              <actionNode class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="15"/>
+                                                              <id class="string">Action</id>
+                                                              <display>Action</display>
+                                                              <incompatible>false</incompatible>
+                                                            </org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor>
+                                                          </descriptors>
+                                                        </default>
+                                                      </org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
+                                                    </target>
+                                                  </default>
+                                                </org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                  <default>
+                                                    <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="14"/>
+                                                  </default>
+                                                </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                              </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                              <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="52"/>
+                                            </outgoingConnections>
+                                            <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
+                                          </default>
+                                        </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                        <org.drools.eclipse.flow.ruleflow.core.SplitWrapper>
+                                          <default/>
+                                        </org.drools.eclipse.flow.ruleflow.core.SplitWrapper>
+                                      </source>
+                                      <target class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" reference="49"/>
+                                    </default>
+                                  </org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                  <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                    <default>
+                                      <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="11"/>
+                                    </default>
+                                  </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                              </incomingConnections>
+                              <outgoingConnections id="103">
+                                <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="47"/>
+                              </outgoingConnections>
+                              <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
+                            </default>
+                          </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                          <org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
+                            <default>
+                              <descriptors id="104">
+                                <org.eclipse.ui.views.properties.TextPropertyDescriptor reference="97"/>
+                                <org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor id="105">
+                                  <process class="org.drools.ruleflow.core.impl.RuleFlowProcessImpl" reference="99"/>
+                                  <actionNode class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="8"/>
+                                  <id class="string">Action</id>
+                                  <display>Action</display>
+                                  <incompatible>false</incompatible>
+                                </org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor>
+                              </descriptors>
+                            </default>
+                          </org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
+                        </source>
+                        <target class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" reference="3"/>
+                      </default>
+                    </org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                    <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                      <default>
+                        <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="7"/>
+                      </default>
+                    </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                  </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                </incomingConnections>
+                <outgoingConnections id="106">
+                  <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="87"/>
+                </outgoingConnections>
+                <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
+              </default>
+            </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+          </org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper>
+        </entry>
+        <entry>
+          <string>9-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.ActionWrapper reference="72"/>
+        </entry>
+        <entry>
+          <string>2-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper reference="92"/>
+        </entry>
+        <entry>
+          <string>7-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.SplitWrapper reference="54"/>
+        </entry>
+        <entry>
+          <string>4-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper reference="78"/>
+        </entry>
+        <entry>
+          <string>3-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper reference="59"/>
+        </entry>
+        <entry>
+          <string>10-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.ActionWrapper reference="49"/>
+        </entry>
+        <entry>
+          <string>1-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper reference="64"/>
+        </entry>
+        <entry>
+          <string>8-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.JoinWrapper reference="84"/>
+        </entry>
+      </elements>
+      <process class="org.drools.ruleflow.core.impl.RuleFlowProcessImpl" reference="99"/>
+      <routerLayout>2</routerLayout>
+    </default>
+  </org.drools.eclipse.flow.common.editor.core.ProcessWrapper>
+</org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper>
\ No newline at end of file

Added: labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/insurance-process.rfm
===================================================================
--- labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/insurance-process.rfm	                        (rev 0)
+++ labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/insurance-process.rfm	2007-08-28 04:53:37 UTC (rev 14683)
@@ -0,0 +1,197 @@
+<org.drools.ruleflow.core.impl.RuleFlowProcessImpl id="1">
+  <nodes id="2">
+    <entry>
+      <long>2</long>
+      <org.drools.ruleflow.core.impl.EndNodeImpl id="3">
+        <id>2</id>
+        <name>End</name>
+        <incomingConnections id="4">
+          <org.drools.ruleflow.core.impl.ConnectionImpl id="5">
+            <type>1</type>
+            <from class="org.drools.ruleflow.core.impl.JoinImpl" id="6">
+              <type>2</type>
+              <id>8</id>
+              <name>Join</name>
+              <incomingConnections id="7">
+                <org.drools.ruleflow.core.impl.ConnectionImpl id="8">
+                  <type>1</type>
+                  <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="9">
+                    <ruleFlowGroup>insurancecalcule</ruleFlowGroup>
+                    <id>4</id>
+                    <name>insurancecalcule</name>
+                    <incomingConnections id="10">
+                      <org.drools.ruleflow.core.impl.ConnectionImpl id="11">
+                        <type>1</type>
+                        <from class="org.drools.ruleflow.core.impl.ActionNodeImpl" id="12">
+                          <action class="org.drools.ruleflow.core.impl.DroolsConsequenceAction" id="13">
+                            <consequence>System.out.println(&quot;Insurance calculate&quot;);</consequence>
+                          </action>
+                          <id>9</id>
+                          <name>Action</name>
+                          <incomingConnections id="14">
+                            <org.drools.ruleflow.core.impl.ConnectionImpl id="15">
+                              <type>1</type>
+                              <from class="org.drools.ruleflow.core.impl.SplitImpl" id="16">
+                                <type>2</type>
+                                <constraints id="17">
+                                  <entry>
+                                    <org.drools.ruleflow.core.impl.ConnectionImpl reference="15"/>
+                                    <org.drools.ruleflow.core.impl.ConstraintImpl id="18">
+                                      <name>constraint</name>
+                                      <constraint>		not Rejection()
+		$policy : Policy( approved == true )
+</constraint>
+                                      <priority>0</priority>
+                                    </org.drools.ruleflow.core.impl.ConstraintImpl>
+                                  </entry>
+                                  <entry>
+                                    <org.drools.ruleflow.core.impl.ConnectionImpl id="19">
+                                      <type>1</type>
+                                      <from class="org.drools.ruleflow.core.impl.SplitImpl" reference="16"/>
+                                      <to class="org.drools.ruleflow.core.impl.ActionNodeImpl" id="20">
+                                        <action class="org.drools.ruleflow.core.impl.DroolsConsequenceAction" id="21">
+                                          <consequence>System.out.println(&quot;Rejection&quot;);</consequence>
+                                        </action>
+                                        <id>10</id>
+                                        <name>Action</name>
+                                        <incomingConnections id="22">
+                                          <org.drools.ruleflow.core.impl.ConnectionImpl reference="19"/>
+                                        </incomingConnections>
+                                        <outgoingConnections id="23">
+                                          <org.drools.ruleflow.core.impl.ConnectionImpl id="24">
+                                            <type>1</type>
+                                            <from class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="20"/>
+                                            <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="25">
+                                              <ruleFlowGroup>rejection</ruleFlowGroup>
+                                              <id>5</id>
+                                              <name>rejection</name>
+                                              <incomingConnections id="26">
+                                                <org.drools.ruleflow.core.impl.ConnectionImpl reference="24"/>
+                                              </incomingConnections>
+                                              <outgoingConnections id="27">
+                                                <org.drools.ruleflow.core.impl.ConnectionImpl id="28">
+                                                  <type>1</type>
+                                                  <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="25"/>
+                                                  <to class="org.drools.ruleflow.core.impl.JoinImpl" reference="6"/>
+                                                </org.drools.ruleflow.core.impl.ConnectionImpl>
+                                              </outgoingConnections>
+                                            </to>
+                                          </org.drools.ruleflow.core.impl.ConnectionImpl>
+                                        </outgoingConnections>
+                                      </to>
+                                    </org.drools.ruleflow.core.impl.ConnectionImpl>
+                                    <org.drools.ruleflow.core.impl.ConstraintImpl id="29">
+                                      <name>constraint</name>
+                                      <constraint>$policy : Policy( approved == false )
+</constraint>
+                                      <priority>1</priority>
+                                    </org.drools.ruleflow.core.impl.ConstraintImpl>
+                                  </entry>
+                                </constraints>
+                                <id>7</id>
+                                <name>Split</name>
+                                <incomingConnections id="30">
+                                  <org.drools.ruleflow.core.impl.ConnectionImpl id="31">
+                                    <type>1</type>
+                                    <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="32">
+                                      <ruleFlowGroup>risk assessment</ruleFlowGroup>
+                                      <id>3</id>
+                                      <name>risk assessment</name>
+                                      <incomingConnections id="33">
+                                        <org.drools.ruleflow.core.impl.ConnectionImpl id="34">
+                                          <type>1</type>
+                                          <from class="org.drools.ruleflow.core.impl.StartNodeImpl" id="35">
+                                            <id>1</id>
+                                            <name>Start</name>
+                                            <incomingConnections id="36"/>
+                                            <outgoingConnections id="37">
+                                              <org.drools.ruleflow.core.impl.ConnectionImpl reference="34"/>
+                                            </outgoingConnections>
+                                          </from>
+                                          <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="32"/>
+                                        </org.drools.ruleflow.core.impl.ConnectionImpl>
+                                      </incomingConnections>
+                                      <outgoingConnections id="38">
+                                        <org.drools.ruleflow.core.impl.ConnectionImpl reference="31"/>
+                                      </outgoingConnections>
+                                    </from>
+                                    <to class="org.drools.ruleflow.core.impl.SplitImpl" reference="16"/>
+                                  </org.drools.ruleflow.core.impl.ConnectionImpl>
+                                </incomingConnections>
+                                <outgoingConnections id="39">
+                                  <org.drools.ruleflow.core.impl.ConnectionImpl reference="15"/>
+                                  <org.drools.ruleflow.core.impl.ConnectionImpl reference="19"/>
+                                </outgoingConnections>
+                              </from>
+                              <to class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="12"/>
+                            </org.drools.ruleflow.core.impl.ConnectionImpl>
+                          </incomingConnections>
+                          <outgoingConnections id="40">
+                            <org.drools.ruleflow.core.impl.ConnectionImpl reference="11"/>
+                          </outgoingConnections>
+                        </from>
+                        <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="9"/>
+                      </org.drools.ruleflow.core.impl.ConnectionImpl>
+                    </incomingConnections>
+                    <outgoingConnections id="41">
+                      <org.drools.ruleflow.core.impl.ConnectionImpl reference="8"/>
+                    </outgoingConnections>
+                  </from>
+                  <to class="org.drools.ruleflow.core.impl.JoinImpl" reference="6"/>
+                </org.drools.ruleflow.core.impl.ConnectionImpl>
+                <org.drools.ruleflow.core.impl.ConnectionImpl reference="28"/>
+              </incomingConnections>
+              <outgoingConnections id="42">
+                <org.drools.ruleflow.core.impl.ConnectionImpl reference="5"/>
+              </outgoingConnections>
+            </from>
+            <to class="org.drools.ruleflow.core.impl.EndNodeImpl" reference="3"/>
+          </org.drools.ruleflow.core.impl.ConnectionImpl>
+        </incomingConnections>
+        <outgoingConnections id="43"/>
+      </org.drools.ruleflow.core.impl.EndNodeImpl>
+    </entry>
+    <entry>
+      <long>4</long>
+      <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="9"/>
+    </entry>
+    <entry>
+      <long>8</long>
+      <org.drools.ruleflow.core.impl.JoinImpl reference="6"/>
+    </entry>
+    <entry>
+      <long>9</long>
+      <org.drools.ruleflow.core.impl.ActionNodeImpl reference="12"/>
+    </entry>
+    <entry>
+      <long>1</long>
+      <org.drools.ruleflow.core.impl.StartNodeImpl reference="35"/>
+    </entry>
+    <entry>
+      <long>3</long>
+      <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="32"/>
+    </entry>
+    <entry>
+      <long>7</long>
+      <org.drools.ruleflow.core.impl.SplitImpl reference="16"/>
+    </entry>
+    <entry>
+      <long>10</long>
+      <org.drools.ruleflow.core.impl.ActionNodeImpl reference="20"/>
+    </entry>
+    <entry>
+      <long>5</long>
+      <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="25"/>
+    </entry>
+  </nodes>
+  <variables id="44"/>
+  <lastNodeId>10</lastNodeId>
+  <imports id="45">
+    <string>org.acme.insurance.base.Rejection</string>
+    <string>org.acme.insurance.base.Policy</string>
+  </imports>
+  <id>insuranceProcess</id>
+  <name>insurance-process</name>
+  <version>1.0</version>
+  <type>RuleFlow</type>
+</org.drools.ruleflow.core.impl.RuleFlowProcessImpl>
\ No newline at end of file

Added: labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/insurancefactor.drl
===================================================================
--- labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/insurancefactor.drl	                        (rev 0)
+++ labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/insurancefactor.drl	2007-08-28 04:53:37 UTC (rev 14683)
@@ -0,0 +1,124 @@
+package org.acme.insurance
+
+import org.acme.insurance.base.Rejection;
+import org.acme.insurance.base.Policy;
+import org.acme.insurance.base.Driver;
+import org.acme.insurance.base.DriverAdditionalInfo;
+import org.acme.insurance.base.AccessoriesCoverage;
+import org.acme.insurance.base.SupplementalInfo;
+
+
+rule "Driver is underage"
+	ruleflow-group "risk assessment"
+	when
+		not Rejection()	 
+		$driver : Driver ( age < 18)
+	then
+		$driver.updateInsuranceFactor(0.0);
+		insert(new Rejection("Driver is Underage"));
+		System.out.println("Driver is Underage");
+end
+
+
+rule "New licenced Driver"
+	ruleflow-group "risk assessment"
+	when
+		$driver : Driver ( licenceYears < 3 )
+	then
+		$driver.updateInsuranceFactor(1.2);
+		System.out.println("New Licenced driver " + $driver.getInsuranceFactor());		
+end
+
+rule "Driver Single Young Male Driver factor"
+	ruleflow-group "risk assessment"
+	when
+		$driver : Driver( genre == Driver.MALE, age < 25, maritalState == Driver.SINGLE )
+	then 
+		$driver.updateInsuranceFactor(1.6);
+		System.out.println("Driver Single Young Male Driver factor: " + $driver.getInsuranceFactor());
+end
+
+rule "Driver Mature Married With Young Child factor"
+	ruleflow-group "risk assessment"
+	when
+		$driver : Driver( genre == Driver.MALE, age > 40, maritalState == Driver.MARRIED, hasChildren == true )
+	then 
+		$driver.updateInsuranceFactor(1.5);
+		System.out.println("Driver Mature Married With Young Child factor: " + $driver.getInsuranceFactor());
+end
+
+rule "Priory Claimed Driver"
+	ruleflow-group "risk assessment"
+	when
+		$driver : Driver ( $prior : priorClaims > 2 )
+	then
+		$driver.updateInsuranceFactor((0.2 * $prior) + 1);
+		System.out.println("Priory Claimed Driver + 20% for each previous problem " + $driver.getInsuranceFactor());		
+end
+
+rule "Day Vehicle Place"
+	ruleflow-group "risk assessment"
+	when
+		$driver : Driver ( driverID : id )
+		$daddit : DriverAdditionalInfo ( driverId == driverID, dayVehiclePlace == DriverAdditionalInfo.STREET ) 
+	then
+		$driver.updateInsuranceFactor( 1.15 );
+		System.out.println("Day Vehicle Place: " + $driver.getInsuranceFactor());		
+end
+
+rule "Night Vehicle Place"
+	ruleflow-group "risk assessment"
+	when
+		$driver : Driver ( driverID : id )
+		$daddit : DriverAdditionalInfo ( driverId == driverID, nightVehiclePlace  == DriverAdditionalInfo.STREET ) 
+	then
+		$driver.updateInsuranceFactor(1.44); // streets are very dangerous dangerous at night ;) 
+		System.out.println("Night Vehicle Place: " + $driver.getInsuranceFactor());		
+end
+
+// Supplemental itens insurance 
+
+rule "Driver wants an extra Car"
+	ruleflow-group "risk assessment"
+	when
+		$driver : Driver ( driverID : id )
+		$supple : SupplementalInfo ( driverId == driverID, extraCar  == true) 
+
+	then
+		$driver.updateInsuranceFactor( 1.05 );
+		System.out.println("Driver wants an extra Car: " + $driver.getInsuranceFactor());		
+end
+
+rule "Driver wants extra assistence"
+	ruleflow-group "risk assessment"
+	when
+		$driver : Driver ( driverID : id )
+		$supple : SupplementalInfo ( driverId == driverID, extraAssistence   == true) 
+
+	then
+		$driver.updateInsuranceFactor( 1.05 );
+		System.out.println("Driver wants extra assistence: " + $driver.getInsuranceFactor());		
+end
+
+
+rule "Driver wants glass coverage"
+	ruleflow-group "risk assessment"
+	when
+		$driver : Driver ( driverID : id )
+		$supple : SupplementalInfo ( driverId == driverID, glassCoverage  == true) 
+
+	then
+		$driver.updateInsuranceFactor( 1.05 );
+		System.out.println("Driver wants glass coverage: " + $driver.getInsuranceFactor());		
+end
+
+rule "Driver wants non related expenses coverage"
+	ruleflow-group "risk assessment"
+	when
+		$driver : Driver ( driverID : id )
+		$supple : SupplementalInfo ( driverId == driverID, nonRelatedExpenses  == true) 
+
+	then
+		$driver.updateInsuranceFactor( 1.05 );
+		System.out.println("Driver wants non related expenses coverage: " + $driver.getInsuranceFactor());		
+end

Added: labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/marginalage.dslr
===================================================================
--- labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/marginalage.dslr	                        (rev 0)
+++ labs/jbossrules/trunk/experimental/drools-insurance/src/main/rules/approval/marginalage.dslr	2007-08-28 04:53:37 UTC (rev 14683)
@@ -0,0 +1,32 @@
+package org.acme.insurance;
+
+import org.acme.insurance.base.Rejection;
+import org.acme.insurance.base.Policy;
+import org.acme.insurance.base.Approve;
+import org.acme.insurance.base.Driver;
+import org.acme.insurance.base.DriverAdditionalInfo;
+import org.acme.insurance.base.AccessoriesCoverage;
+import org.acme.insurance.base.SupplementalInfo;
+
+expander acme.dsl
+
+rule "Driver is in marginal age"
+	ruleflow-group "risk assessment" 	
+	when
+		There is a Driver
+			- age is between 18 and 24 years old
+			- has had more than 1 prior claims
+	then
+		Reject Policy with explanation : 'No accidents allowed if in marginal age group'
+end
+
+rule "Quick approval - safe driver, any policy type"
+	ruleflow-group "risk assessment"
+	when		
+		Policy has not been rejected	
+		There is a Driver
+			- age is at least 30
+			- has had exactly 0 prior claims
+	then
+		Approve Policy with the reason : 'Driver is safe and mature.'
+end
\ No newline at end of file




More information about the jboss-svn-commits mailing list