Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


Need help on rule execution

  • Hi all,

    I'm trying to execute this simple rule:

    <?xml version="1.0" encoding="UTF-8"?>
       <description>Rule Execution Set</description>

       <synonymn name="order" class="oasis.names.specification.ubl.schema.xsd.order_2.OrderType" />

          if the year of the issue date of the order is 2009, then
          set the new year to 2009
          set the month to 4
          set the day to 22
       <rule name="Rule1" description="change date rule" >
        <if leftTerm="order.getIssueDate.getValue.getYear" op="=" rightTerm="2009" />
        <then method="order.getIssueDate.getValue.setYear" arg1="2009" />
        <then method="order.getIssueDate.getValue.setMonth" arg1="4" />
        <then method="order.getIssueDate.getValue.setDay" arg1="22" />

    but I can't get the object modified as expected.
    One thing to notice is that the object "order" is a java tree created with JAXB. Could it be that rules can't be applied to too much complex objects?

    thanks and best regards,