please ask this question on the USER mailing list, and not the developer mailing list - which is for the core development OF drools, not WITH drools.

I suggest you also provide more information, or you will most likely get ignored. Please read anti-pattern instructions on this web page
http://www.jboss.org/drools/lists

Mark
On 29 Jul 2013, at 20:10, Nuwan Bandara <mail.nuwan@gmail.com> wrote:

Iím using the XLS decision table for the drools rules file. 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.

 

Hereís the function that I use in the decision table (.xls)

function boolean setCTCFlag(Object resultViewMapObj, String siteCode){

        boolean flag = false;

        Map<String, ResultView> resultViewMap = (Map<String, ResultView>) resultViewMapObj;

        List<ResultView> resultViewList = new ArrayList<ResultView>();

        resultViewList = new ArrayList<ResultView> (resultViewMap.values());

        ResultView resultView = new ResultView();

        resultView = resultViewList.get(0);

        if(resultView.getSampleView().getSample() != null){

            String sampleInd = resultView.getSampleView().getSample().getSampleIndicator();

            if(sampleInd != null && sampleInd.length() != 0){

                String[] sampleIndComp = sampleInd.split(""[^\\w\\s]"");

                for(int i = 0; i<sampleIndComp.length; i++){

                        LabelValueView labelValueView = new LabelValueView();

                        labelValueView.setLabel(sampleIndComp[i].trim());

                        labelValueView.setValue(" ");

                        // DOTO: this is the issue

                        //       folowing line gets executed but changes do not get reflected in the object.

                        //       Only happens when this called remotely.  

                        resultView.getDynamicFields().put("CTC_CLIENT_FLAG", labelValueView);

                        flag = true;

                }

            }

        }

        return flag;

    }

_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev