Unable to execute rule - Need Help

Venu R
  • Venu R

    Venu R - 2009-03-18

    Below is the rule file that I am trying to execute and I am expecting to the set the values to the same object it does not set the values back to the object and returns duplicate objects.  I am using version 1.3 and I am using StatefulRuleSession.

    <?xml version="1.0" encoding="UTF-8"?>
       <description>Rule for Request Status</description>

       <synonymn name="requestStatus" class="com.view.bean.RequestStatusRuleBean" />

          If current request status is blank and user selected status is Draft
          then set
           1. status to Draft
           2. saveToHistory to No
           3. sendAutoEmailTo to PBS
       <rule name="Rule1" description="Draft Rule" >
        <if leftTerm="requestStatus.getCurrentStatus" op="=" rightTerm="" />
        <if leftTerm="requestStatus.getUserSelectedStatus" op="=" rightTerm="Draft" />
        <then method="requestStatus.setStatus" arg1="Draft" />
        <then method="requestStatus.setSaveToHistory" arg1="No" />
        <then method="requestStatus.setSendAutoEmailTo" arg1="PBS" />

    Help is appreciated.

    • Venu R

      Venu R - 2009-03-18

      No Worries I go it. I don't know  the reason why it was not executing but this is what I did I re-factored example1.Customer object to my object and it works.  I wish could know what's wrong is there any spl pojo requirement for JSR94 sepcs?

      But it still returns Duplicate object when I iterate the return list.


Log in to post a comment.