Why the drools modified object does not reflect the changes when I call the remote web service?
by Nuwan Bandara
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.
Environment into:
- JBoss 5
- Uses XLS decision table for the drools rules file
- Front end uses jbosseap5 and back-end users JBoss 5
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.
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;
}
12 years, 7 months
how to debug rules in JBoss AS?
by Marina
Hello,
I know one can debug rules (put breakpoints in .drl and ruleflow files) when
running/debugging an application as a Drools Application.
However, I would like to debug rules when my application is running in JBoss AS
- just like we do a normal debugging of a Remote application running in a
different JVM ,by enabling the JDWP on the server
(-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n) and then
connecting to the specified port.
Basically, I would like to be able to debug both my Java classes and rules
together. Is it possible?
thanks,
Marina
12 years, 7 months
brms depoylment diagrams
by Ravi Gupta
I am looking for deployment diagrams, from say dev to qa to prod
I know there are several "techniques", snapshots, webdav, import/export
entire repo.
Just wondering if there are some diagrams of rules sdlc in multiple
environments
12 years, 7 months
ruleEventProcessingType=STREAM not working with DRL resource from Gunvor
by mredhat
Platform:JBoss SOAP 5.2 for ESB deploymetn with BRMS Standalone 5.3 for
authoring and retrieving rules from Guvnor.I am executing CEP logic with the
BusinessRulesProcess ESB aciton. I pass it the following
properties:<property name="<b>ruleAgentProperties*"
value="kie-agent/ChangeSet.xml" /><property
name="ruleEventProcessingType" value="<b>STREAM*" />where
the ChangeSet.xml is as below. If I use the file-based url for the DRL
resource shown below, my CEP logic :not $rp2: DataResponse(id== "CEP-001",
this after [2m] $rq) from entry-point "Event Processing stream"works as
expected. However, if I pull the DRL resource from Guvnor using the http
resource below, this rule fires immediately as if the
ruleEventProcessingType of STREAM is being ignored.If you notice, I am using
the LATEST.drl and not LATEST.pkg do to an issue that seemed to be related
to different versions of MVEL from my SOA server and the BRMS server hosting
Guvnor. For what I am trying to test I hoped this would be an acceptable
workaround. I thought the SOA server would now parse the rules obtained
from Guvnor in the same way as when they are file based (i.e, same runtime
MVEL, drools core, etc.) If anyone has had a similar problem or see
something glaringly wrong please let me know!ChangeSet.xml:
--
View this message in context: http://drools.46999.n3.nabble.com/ruleEventProcessingType-STREAM-not-work...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 7 months