Try OpenEdge Now
skip to main content
BP Server Developer's Guide
Messaging workstep : Message subscriber workstep : Message properties and dataslot mappings

Message properties and dataslot mappings

For the subscribed message, the message properties in the payload of the message meta-data may be mapped to the dataslots of the process. BP Server uses this mapping information to extract the data from message payload using the XPath specified in the message file, and copy the extracted data to the corresponding mapped dataslot.
Similarly, the header properties in the message meta-data can also be mapped to the dataslots of the process. This mapping information is used to fetch the value of the header property and copy it to the corresponding mapped dataslot.
The received message is processed for data extraction as per the order specified in the message subscription list. BP Server invokes the message handler with the received message as input to the handler only after extracting data from the message and copying to the specified dataslot. The message handler for the "Message Subscriber WorkStep" is optional. Since BP Server already takes care of the data extraction from the message based on the mapping definitions, the handler is required only when any additional processing of the received message is needed.

XML tags for subscriber workstep

An example of how the XML tags are to be used for a subscriber workstep is shown below.
<MessageSubscriberWS name="MsgWaitWS">
    <Duration value="7200">2h</Duration>
    <OnMessage waitFor="ANY">
    <Message name="NewProduct" count="5">
    <Copy to="SenderID"> SenderInstanceId</Copy> //header property
    <Copy to="@ds1">prodId</Copy> //payload property
    <Copy to="@ds2">prodName</Copy> //payload property
    <Copy to="@ds3">price</Copy> //payload property
In the above example, the first <Copy> tag copies the value of the JMS Header property SenderInstanceId into the dataslot SenderID. The remaining <Copy> tags copy the data from the message properties prodId, prodName and price to the dataslots ds1, ds2 and ds3 respectively. The value for the message property "prodId" is retrieved from the message payload using the specified XPath expression in the message file.