...
Syntax
Code Block |
---|
|
<publishEvent [eventSink="string"] [streamName="string"] [streamVersion="string"><publishEvent>
<eventSink>String</eventSink>
<streamName>String</streamName>
<streamVersion>String</streamVersion>
<attributes>
<meta>
<attribute name="string" type="dataType" default="" (value="literal" | expression="[XPath|json-eval(JSON Path)]") [type=string|integer|boolean|double|float|long]/>*
</meta>
<correlation>
<attribute name="string" type="dataType" default="" (value="literal" | expression="[XPath|json-eval(JSON Path)]") [type=string|integer|boolean|double|float|long]/>*
</correlation>
<payload>
<attribute name="string" type="dataType" default="" (value="literal" | expression="[XPath|json-eval(JSON Path)]") [type=string|integer|boolean|double|float|long]/>*
</payload>
<arbitrary> <arbitrary>
<attribute name="string" (valuetype="literaldataType" | expression="[XPath|json-eval(JSON Path)]") [type=string|integer|boolean|double|float|long]/>*default="" value="literal" />
</arbitrary>
</attributes>
</publishEvent> |
...
In this configuration, the Publish Event mediator uses four attributes to extract information from the ESB. This information is published in an event sink in WSO2 BAM the ESB named bamsample_event_sink
.
Code Block |
---|
|
<publishEvent>
<eventSink>bam<eventSink>sample_event_sink</eventSink>
<streamName>stream_88</streamName>
<streamVersion>1.1.2</streamVersion>
<attributes>
<meta>
<attribute name="http_method"
type="STRING"
defaultValue=""
expression="get-property('axis2', 'HTTP_METHOD')"/>
<attribute name="destination"
type="STRING"
defaultValue=""
expression="get-property('To')"/>
</meta>
<correlation>
<attribute name="date"
type="STRING"
defaultValue=""
expression="get-property('SYSTEM_DATE')"/>
</correlation>
<payload>
<attribute xmlns:m0="http://services.samples"
name="symbol"
type="STRING"
defaultValue=""
expression="$body/m0:getQuote/m0:request/m0:symbol"/>
</payload>
</attributes>
</publishEvent> |