Products | Versions |
---|---|
TIBCO ActiveMatrix BusinessWorks | - |
Not Applicable | - |
Resolution:
Following is the description of the sendMessage method:
----------------------------------------------------------------------------
Method: sendMessage
Timeout(millisecs): 10000
Description: A simple send utility. The message text is stored in a field named '_data_'.
Type: Open, Synchronous, IMPACT_ACTION
Arguments:
name: Subject
type: java.lang.String
description: Message subject
isOpen: true
name: Message
type: java.lang.String
description: Message Text
isOpen: true
Returns: None
----------------------------------------------------------------------------
************************************
So in BW we need to
1) Create a schema to be able to access the given "_data_" field.
2) Select "map" as message type.
3) Select the schema in the Output Editor.
The schema which works has the structure given below:
Please note that the string "_data_" element has to be included in a complex root element.
Otherwise though there will be no validation error, there will be no data in the output.
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element ref="_data_"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="_data_" type="xs:string"/>
*************************************
An example snippet of validation error which you might get without the above is as follows:
caused by: org.xml.sax.SAXException: validation error: unexpected content "_data_"; expected "Body"
({com.tibco.xml.validation}COMPLEX_E_UNEXPECTED_CONTENT) at /jms1:ActivityOutput[1]/Body[1]/_data_[1]
validation error: no declaration for element "_data_" ({com.tibco.xml.validation}COMPLEX_E_MISSING_ELEMENT_DECLARATION) at /jms1:ActivityOutput[1]/Body[1]/_data_[1]
com.tibco.xml.validation.exception.i: no declaration for element "_data_"