Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Patch to Drools SE build 3.2.2-712210
Description
Worked with Gert on this. Asked if we could add the ability to set XML attribute values identified by an XPath to a supplied String value and a supplied XML attribute value identified by an XPath. Also, asked if would could add a way to ensure that the 'out' message is returned for InOptionalOut, InRobustOut, and InOut Exchanges where the endpoint is a Provider and returning the 'in' message if the 'out' does not exist.
Wasn't able to test because I couldn't get a JBI instance to initialize (jbi.ini()) in the DroolsComponentTest.
XML Attribute updating ability:
Message.java:
+Added setAttributeWithValue(xpathTo, string value) & setAttributeWithAttribute(xpathTo, xpathFrom)
Auto Reply:
DroolsEndpoint.java:
+Added feature to drools()
DroolsExecutionContext.java
+Added answer() as wrapper to JbiHelper to support Auto Reply
Improve Consistency:
Exchange.java:
+Added IN_MESSAGE & OUT_MESSAGE
JbiHelper.java:
+Used Exchange.IN_MESSAGE & Exchange.OUT_MESSAGE
+Added JBI_HELPER_KEY
Testing:
DroolsComponentTest.java
+Added testAutoReply(), testModifyXMLWithAValue(), testModifyXMLWithAnAttribute()
AutoReply.drl, XPathAttrMod-StringValue.drl, XPathAttrMod-XPathAttr.drl