Skip to main content

PEX Messaging

Within the PEX framework, most messages sent between business hosts are objects instantiated from one of the following subclasses:

Language Message Class
Java com.intersystems.enslib.pex.Message
.NET InterSystems.EnsLib.PEX.Message
Python iris.pex.Message

You simply add properties to your subclass, and then pass instantiated objects of the subclass using methods like SendRequestAsync() and SendRequestSync(). Within InterSystems IRIS, the message object written in the PEX-supported language corresponds to an object of class EnsLib.PEX.Message, which makes the message persistent and dynamic. By manipulating the object of type EnsLib.PEX.Message, you can reference any property in the external PEX object. Internally, the PEX object is represented as JSON as it passes between business hosts, so viewing the messages in the Management Portal are displayed in JSON format.

Though you can use other message objects, they must still be persistent if they are being passed between business hosts. To pass an object to a built-in ObjectScript component, you use the type IRISObject and map it to the persistent object expected by that component. For example, if you are sending a message to the EnsLib.PubSub.PubSubOperation, you would map the IRISObject to EnsLib.PubSub.Request. Trying to pass a non-persistent object as a message between business hosts results in a runtime error.

Objects sent from an inbound adapter to a business service are arbitrary and do not need to be persistent.

Note:

The messages sent are limited to the InterSystems IRIS maximum string length.

FeedbackOpens in a new tab