Try OpenEdge Now
skip to main content
BP Server Developer's Guide
Messaging workstep : Process instance creation on a message : Start workstep message subscription

Start workstep message subscription

A start workstep of a template can subscribe to only one message. The creation of a process instance, optionally requires the priority and the process instance name prefix. If the JMS message header carries the property ReceiverPriority, then its value is used as the priority of the new process instance. Similarly, ReceiverInstanceAlias is used as the process instance name alias. If these properties are not present, then the default values are used.
The dataslot values of the new process instance may also be initialized with the property values of a message. The mapping of message property to dataslot names can be specified in the start workstep using the following semantics.
<Copy to="@orderIdDS">orderId</Copy>
In this mapping, the message property orderId points to an XPath (a location) in the message XML. The value of the orderid from that location in the message is copied to the dataslot orderIdDS. When mapping is not defined for a start workstep, the dataslots of the newly created instance are not initialized.

XML tags for start workstep

An example of how the XML tags are to be used for a start workstep is shown below.
<AtomicWS name="Start">
    <Message name="CreatePurchaseOrder">
    <Copy to="@SenderID">SenderInstanceId</Copy>
    <Copy to="@OrderID">orderId</Copy>
    <Copy to="@ItemName">item</Copy>
    <Copy to="@Quantity">quantity</Copy>
In the above example, the first <Copy> tag copies the sender process instance ID from the JMS message header property SenderInstanceID to the dataslot SenderID. The remaining <Copy> tags copy the data from message properties orderId, item and quantity to the dataslots OrderID, ItemName and Quantity respectively.