Sending an event to a process instance using the JMS interface

Steps for this task

  1. Create a message, for example, an ObjectMessage message.
    ObjectMessage message= queueSession.createObjectMessage();
  2. Set the JMSReplyToQueue.
    If you do not want to receive a reply, this step is optional.
    // Specify the destination object replies are to be sent to
    message.SetJMSReplyTo(replyToQueue);
  3. Set the JMS properties.
    You can specify the process instance ID (PIID) of the process instance instead of the process-instance name. If you specify both properties, the processInstanceName is used.
    message.SetStringProperty("wf$verb", "sendEvent");
    message.SetStringProperty("wf$processInstanceName",  "CustomerOrder");
    message.SetStringProperty("wf$event",  "OrderEvent");
  4. Send the specified OrderEvent event to the process instance, CustomerOrder.
    // Create event input message
    Order input = new Order("Chocolate");
    
    message.setObject(new ClientObjectWrapper(input));
    
    // Send message
    queueSender.send(message);
    If JMSReplyToQueue is set, an empty reply message returns if the event was sent successfully. The JMSCorrelationID is set to the JMSMessageID of the sendEvent request. Neither properties nor payload are set on the reply message.

Related concepts
Event activities



Searchable topic ID:   t6maceaj
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/wfapi/tasks/t6maceaj.html

Library | Support | Terms of Use | Feedback