0 Replies Latest reply on Jul 8, 2008 12:01 AM by x490812

    When is interpolation done for components.xml?

      Here is a fragment of my components.xml...


      <drools:rule-agent name="isDealRuleBase" 
         url="http://#{serverInfoTest.webServerURL}/drools-jbrms/org.drools.brms.JBRMS/package/com.homeq.cam.deal.domain.isDeal/LATEST"
         local-cache-dir="/var/data/cam"
         poll="30"
         auto-create="true">
        </drools:rule-agent>
      .
      .
       <drools:managed-working-memory 
             name="isDealWorkingMemory" 
             auto-create="true" 
             rule-base="#{isDealRuleBase}"/>
             
      .
      .
      



      Here is a fragment of pageflow.jpdl.xml


      <decision name="isDealQualified">
               <handler class="com.homeq.drools.HomEqDroolsDecisionHandler">
                  <workingMemoryName>isDealWorkingMemory</workingMemoryName>
                  <assertObjects>
                     <element>#{loanInfo}</element>
                  </assertObjects>
               </handler>
                <transition to="isPreviousMod" name="yes"></transition>
                <transition name="no" to="isFastTrackQualified"></transition>
           </decision>
      



      The application boots with no problems, but when the  pageflow executes, it immediately goes into com.homeq.drools.HomEqDroolsDecisionHandler - never calls serverInfoTest.getWebServerURL(); The  interpolation of #{serverInfoTest.webServerURL} never occurs and I get the following...


      4:50:46,898 ERROR [STDERR] RuleAgent(default) INFO (Mon Jul 07 14:50:46 PDT 2008): Configuring with newInstance=false, secondsToRefresh=30
      14:50:46,914 ERROR [STDERR] RuleAgent(default) INFO (Mon Jul 07 14:50:46 PDT 2008): Configuring package provider : URLScanner monitoring URLs:  http://#{serverInfoTest.webServerURL}#{serverInfoTest.webServerURL}/drools-jbrms/org.drools.brms.JBRMS/package/com.homeq.cam.deal.domain.isDeal/LATEST with local cache dir of \var\data\cam
      14:51:02,164 ERROR [STDERR] RuleAgent(default) WARNING (Mon Jul 07 14:51:02 PDT 2008): Was an error contacting http://#{serverInfoTest.webServerURL}#{serverInfoTest.webServerURL}/drools-jbrms/org.drools.brms.JBRMS/package/com.homeq.cam.deal.domain.isDeal/LATEST. Reponse header: {}
      14:51:02,164 ERROR [STDERR] RuleAgent(default) EXCEPTION (Mon Jul 07 14:51:02 PDT 2008): Was unable to reach server.. Stack trace should follow.
      14:51:02,164 ERROR [STDERR] java.io.IOException: Was unable to reach server.
      14:51:02,164 ERROR [STDERR]      at org.drools.agent.URLScanner.hasChanged(URLScanner.java:145)
      14:51:02,164 ERROR [STDERR]      at org.drools.agent.URLScanner.getChangeSet(URLScanner.java:109)
      14:51:02,164 ERROR [STDERR]      at org.drools.agent.URLScanner.loadPackageChanges(URLScanner.java:88)
      14:51:02,164 ERROR [STDERR]      at org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:330)
      14:51:02,164 ERROR [STDERR]      at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:298)
      



      Why was the EL expression in  components.xml (i.e., #{serverInfoTest.webServerURL} not interpolated? is interpolation handled by the declared class, in this case, RuleAgent, or is interpolation done before the class is passed its parameters?