SMILA 1.0 API documentation

org.eclipse.smila.processing.bpel.util
Class MessageHelper

java.lang.Object
  extended by org.eclipse.smila.processing.bpel.util.MessageHelper

public final class MessageHelper
extends java.lang.Object

Utility class to create and parse the DOM XML messages which we use to talk to the ODE engine, and sync workflow objects to the blackboard.

Author:
jschumacher

Constructor Summary
MessageHelper(java.util.Properties properties)
          create instance.
 
Method Summary
 org.w3c.dom.Element createMessage(Blackboard blackboard, java.lang.String[] recordIds, java.lang.String requestId)
          create workflow objects for specified IDs, create DOM representations of this record list and embed it as BPEL message.
 java.lang.String[] parseMessage(Blackboard blackboard, org.w3c.dom.Element message)
          sync workflow objects from DOM message to blackboard and return IDs of workflow objects.
 java.lang.String[] parseMessage(Blackboard blackboard, org.w3c.dom.Element message, org.w3c.dom.Node indexVariable)
          sync workflow objects from DOM message to blackboard and return IDs of workflow objects.
 java.lang.String parseRequestId(org.w3c.dom.Element message)
          read request Id from message variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageHelper

public MessageHelper(java.util.Properties properties)
create instance.

Parameters:
properties - configuration properties
Method Detail

parseRequestId

public java.lang.String parseRequestId(org.w3c.dom.Element message)
read request Id from message variable.

Parameters:
message - variable value
Returns:
request Id

parseMessage

public java.lang.String[] parseMessage(Blackboard blackboard,
                                       org.w3c.dom.Element message)
sync workflow objects from DOM message to blackboard and return IDs of workflow objects.

Parameters:
blackboard - to sync workflow objects to.
message - DOM message from BPEL engine containing workflow objects.
Returns:
IDs of workflow objects in message

parseMessage

public java.lang.String[] parseMessage(Blackboard blackboard,
                                       org.w3c.dom.Element message,
                                       org.w3c.dom.Node indexVariable)
                                throws ProcessingException
sync workflow objects from DOM message to blackboard and return IDs of workflow objects.

Parameters:
blackboard - to sync workflow objects to.
message - DOM message from BPEL engine containing workflow objects.
Returns:
IDs of workflow objects in message
Throws:
ProcessingException

createMessage

public org.w3c.dom.Element createMessage(Blackboard blackboard,
                                         java.lang.String[] recordIds,
                                         java.lang.String requestId)
                                  throws ProcessingException
create workflow objects for specified IDs, create DOM representations of this record list and embed it as BPEL message. This is done by appending them to <message><records> elements.

Parameters:
blackboard - blackboard to read records from.
recordIds - IDs of workflow objects in message
requestId - internal requset id.
Returns:
DOM representation of workflow objects
Throws:
ProcessingException - error creating workflow record.

SMILA 1.0 API documentation