An example logical rule format in XML.


<logical-rule name="some-rule" id="001" author="Some name" timestamp="some time">
  <conditions>
    <with-ejb class="biz.Customer" id="customer">
      <apply function="equals">
        <arg><get-prop name="name"/></arg>
        <arg>"John"</arg>
      </apply>
      <apply function="<">
        <arg><get-prop name="income"/></arg>
        <arg> 10,000 </arg>
      </apply>
    </with-ejb>
    <with-ejb class="biz.Offering" id="offering">

    </with-ejb>

  </conditions>

  <actions>
    <modify-ejb id="customer">
      <set-prop name="name">
        <apply function="concatenate">
          <arg><get-prop name="name"></arg>
          <arg>" is cool"</arg>
        </apply>
      </set-prop>

    </modify-ejb>

    <assert-ejb class="biz.Offering">

      <set-prop name="product">"Apple Pie"</set-prop>

      <set-prop name="discount">10</set-prop>

    </assert-ejb>

    <retract-ejb id="offering"/>

  </actions>

</logical-rule>