[Design of JBoss ESB] - Rule Parsing error while adding cutom object information in
by vsahni
Hi All,
I am trying to add a custom object such as ErrorList to a JBOSS-ESB message so that as the rules are excuted by rule engine I can update the message with some information such as errors. On following the steps listed below and deploying a rule parser error is thrown.
1) Action Processor:
ErrorList errorList = new ErrorList();
where ErrorList is a class containing ArrayList and a property to add a value to errorlist.
1) Setup Action Processor:
ErrorList errorList = new ErrorList();
message.getBody().add("TheErrorList",errorList);
2) Updating Message in .drl file as below:
rule "TEST"
when
errors : ErrorList()
then
errors.setError("ERROR1");
Log : test log";
end
3) jboss-xml definition where .drl file gets loaded:
<object-path esb="body.TheErrorList" />
Error:
:50:57,130 INFO [STDOUT] Message Property org.jboss.soa.esb.actions.current.a
er: [B@bf0023
:50:57,146 WARN [ActionProcessingPipeline] Unexpected exception caught while
ocessing the action pipeline
g.jboss.soa.esb.actions.ActionProcessingException: Could not parse the rules.
g.drools.lang.ExpanderException@116832f
at org.jboss.soa.esb.actions.ContentBasedWiretap.process(ContentBasedWir
ap.java:103)
at org.jboss.soa.esb.actions.ContentBasedRouter.process(ContentBasedRout
.java:50)
at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(
tionProcessingPipeline.java:265)
at org.jboss.soa.esb.listeners.message.MessageAwareListener$1.run(Messag
wareListener.java:297)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
or.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
ava:675)
at java.lang.Thread.run(Thread.java:595)
used by: org.jboss.soa.esb.services.routing.MessageRouterException: Could not
rse the rules. org.drools.lang.ExpanderException@116832f
at org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter.rout
JBossRulesRouter.java:155)
at org.jboss.soa.esb.actions.ContentBasedWiretap.routeMessage(ContentBas
Wiretap.java:132)
at org.jboss.soa.esb.actions.ContentBasedWiretap.process(ContentBasedWir
ap.java:98)
... 6 more
used by: org.jboss.soa.esb.services.routing.cbr.CBRException: org.drools.lang.
panderException@116832f
at org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter.read
leBase(JBossRulesRouter.java:208)
at org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter.rout
JBossRulesRouter.java:126)
... 8 more
used by: org.drools.rule.InvalidRulePackage: org.drools.lang.ExpanderException
16832f
at org.drools.rule.Package.checkValidity(Package.java:419)
at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:2
)
at org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter.read
leBase(JBossRulesRouter.java:205)
... 9 more
:50:57,161 WARN [MessageAwareListener] Error processing courier, backing off
r 1000 milliseconds
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108487#4108487
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108487
16 years, 10 months