Try OpenEdge Now
skip to main content
BPM Events User's Guide
XML messages

XML messages

As we have seen in Understanding BPM Events, BPM Events can receive, process and generate XML messages. These messages can be internal or external—for example, coming from the JMS event channel.
BPM Events uses XML oriented architecture for handling external events because of the progress of XML standardization and the increased adoption of XML-based systems.
Previously, XML event support of BPM Events was provided using XML-Java binding based on the Castor technology. In that approach, once an XML document was mapped to a Java object, it was handled like an ordinary Java object. It did not use an XML-based technology to handle XML objects. To overcome the limitations of XML-Java binding approach, BPM Events adopts XPath-oriented architecture for processing XML messages. Though the XML binding using Castor is supported for backward compatibility, it is deprecated in the current release.
BPM Events now provides a new configuration parameter to set the adapter for JMS message processing. The parameter, bpmevents.server.jms.adapter in the bpmevents.conf file, decides the adapter used by the BPM Events server to handle XML messages received via a JMS channel. In the current release, the default value of this parameter is 'dom' which uses the new XPath-based architecture, while the earlier technology based on Castor can be specified by setting its value to 'castor'. Therefore, if you change the value of this parameter, then you must restart the BPM Events server for the change to take effect. This also implies that rule applications based on XPath does not work with the Castor adapter implementation and vice versa. Application developers should ensure that all the rule applications are developed and published for a particular implementation.
BPM Events now accesses the XML message’s internal data by adapting XPath for rule condition and expression. This XPath-based approach makes XML binding unnecessary. XPath internally replaces the property accessor like a.b and there is no need to map XML data to Java classes generated by Castor/XMLBeans. The XPath-based architecture improves the runtime performance as compared to the XML binding approach. It can also support XML data that is not associated with XML schema.
The XPath-based architecture eliminates the need to generate Java classes from .xsd files, setting the classpath, and putting generated classes into proper location in deployment environments. This makes the entire process simple, and increases the ease of use. However, it lacks type checking (message validation) and existence of certain attributes for XPath while compiling.
While using XPath in BPM Events, it is important to integrate XML namespace into BPM Events because the repetitive supply of namespace for XPath is very inconvenient and error prone. Business Process Server introduces namespace declaration and special syntax to incorporate namespace declaration in the environment implicitly.
* Namespace declaration
* XML type
* XML data field access syntax
* XML data conversion
* New syntax for iteration