Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Event Formatter Name - Property that used to uniquely identify a event formatter configuration.
  • Event Stream - Can select a event stream (Stream name with version) where you going to listen for events, It is numbered as "1".
  • Stream Attributes - Based on the event stream selected, It shows what are the attributes available at that stream. (It is only for reference when creating output mapping)
  • Output Transport Event Adaptor Name - Transport Event adaptor which you going to use to publish the events from CEP. (Output Transport Event Adaptors which are created are listed here). It is numbered as "2". Based on the Transport Event Adaptor that selected sections "3", "4" and "5" will change accordingly.
  • Output Mapping Type - This property can be change based on the transport event adaptor selected. Some transport event adaptors can support for multiple types of mappings. User can select the required mapping type from the list. Is is numbered as "3"
  • Email Address - Since, you have selected email type transport event adaptor "emailAdaptor"; you need to provide an email address which used to send emails. 
  • Subject - Subject of the email.

...

Code Block
languagehtml/xml
<eventFormatter name="QuotationFormatter" xmlns="http://wso2.org/carbon/eventformatter">
  <from streamName="stockStream" version="1.0.0"/>
  <mapping type="json">
    <inline>{  "quotedata:StockQuoteDataEvent": {    "quotedata:StockSymbol": "{{symbol}}",    "quotedata:LastTradeAmount": "{{price}}"  }}</inline>
  </mapping>
  <to transportAdaptorNameeventAdaptorName="emailAdaptor" transportAdaptorTypeeventAdaptorType="email">
    <property name="email.address">[email protected]</property>
    <property name="email.subject">Quotation Details</property>
  </to>
</eventFormatter>