<div dir="ltr"><p class="">When I use the local drools rules instance, object gets updated and reflects
the changes accordingly but when I use the remote web service call to use the
remote drools engine, rules get executed correctly but updated values does not get
reflected back in the return object.</p>
<p class=""><br></p><p class="">Environment into:</p><p class=""></p><ul><li>JBoss 5</li><li>Uses XLS decision table for the drools rules file<br></li><li>Front end uses jbosseap5 and back-end users JBoss 5</li></ul><div>
<br></div><div>Currently I have drools engine running on front end server (referred as local) and back-end server (referred as remote) both. When I call the local drools engine it works. But when I call the remote server through REST web server function get executed correctly but updated values are not in the object when it comes back to the front end.</div>
<p></p><p class="">Here’s the function that I use in the decision table (.xls)<br></p><p class=""></p>
<p class="">function boolean setCTCFlag(Object resultViewMapObj, String
siteCode){</p>
<p class=""> boolean flag =
false;</p>
<p class=""> Map<String,
ResultView> resultViewMap = (Map<String, ResultView>)
resultViewMapObj;</p>
<p class="">
List<ResultView> resultViewList = new
ArrayList<ResultView>();</p>
<p class=""> resultViewList
= new ArrayList<ResultView> (resultViewMap.values());</p>
<p class=""> ResultView
resultView = new ResultView();</p>
<p class=""> resultView =
resultViewList.get(0);</p>
<p class="">
if(resultView.getSampleView().getSample() != null){</p>
<p class=""> String
sampleInd = resultView.getSampleView().getSample().getSampleIndicator();</p>
<p class="">
if(sampleInd != null && sampleInd.length() != 0){</p>
<p class="">
String[] sampleIndComp =
sampleInd.split(""[^\\w\\s]"");</p>
<p class="">
for(int i = 0; i<sampleIndComp.length; i++){</p>
<p class="">
LabelValueView labelValueView = new LabelValueView();</p>
<p class="">
labelValueView.setLabel(sampleIndComp[i].trim());</p>
<p class="">
labelValueView.setValue(" ");</p>
<p class=""> // DOTO: this is the issue</p>
<p class="">
// folowing line gets
executed but changes do not get reflected in the object.</p>
<p class="">
// Only happens when this
called remotely. </p>
<p class="">
resultView.getDynamicFields().put("CTC_CLIENT_FLAG",
labelValueView);</p>
<p class="">
flag = true;</p>
<p class=""> }</p>
<p class=""> }</p>
<p class=""> }</p>
<p class=""> return flag;</p>
<p class=""> }</p></div>