Building Your Event-Driven Architecture : Implementing Event-Driven Architecture with Software AG Products : How EDA Components Connect to the Event Bus : Connecting to the Event Bus Using the EDA-Related Integration Server Built-In Service
Connecting to the Event Bus Using the EDA-Related Integration Server Built-In Service
Integration Server enables you to transform non-Software AG EDA event data into Software AG EDA event data using the pub.event.nerv:send built-in service. Integration Server constructs an EDA event using the parameters defined in the service and sends the event to the event bus using NERV. You can use the pub.event.nerv:subscribe built-in service to subscribe to events that NERV receives, and unsubscribe using pub.event.nerv:unsubscribe.
Important:  
The procedure below explains how to use the pub.event.nerv:send service to send events. It assumes that you are familiar with working with built-in services and flow services in Software AG Designer. For more information about IS built-in services, see the PDF publication webMethods Integration Server Built-In Services Reference. For more information about working with flow services, see the PDF publication webMethods Service Development Help.
To send EDA events using the pub.event.nerv:send IS built-in service
1. In the Service Development perspective in Designer, create a new document type from an existing event type, for example the PartInventoryLow event.
a. Use the PartInventoryLow event name as a name for the new document type and click Next.
b. Select XML Schema as source type and click Next.
c. Browse to the PartInventoryLow event type in the Event Type Store and click Next.
By default, the PartInventoryLow event type is located in the Software AG_directory \common\EventTypeStore\WebM\Sample\InventoryMngt\1.0 directory.
d. Select the PartInventoryLow element as the payload root node and click Next.
e. On the next page of the wizard you can configure the namespace prefixes to be used for representing namespaces found in the schema. Leave the entries unmodified, and click Finish.
2. Create a new empty flow service.
3. In the Input/Output tab of the Flow service editor, in the Input Parameters panel, insert a document reference to the new document type you created in step 1.
4. In the Tree tab of the Flow service editor, insert an INVOKE pub.event.nerv:send step.
5. In the Pipeline view, link the document reference from the Pipeline Input area to the event/body node of the pub.event.nerv:send service in the Service Input area.
6. In the Service Input area, set the value of the Kind variable to Event.
7. In the Service Input area, set the value of the Type variable to the full event type name, in this example {http://namespaces.softwareag.com/EDA/WebM/Sample/InventoryMgmt/1.0}PartInventoryLow.
8. In the Service Input area, set the value of the documentTypeName variable to refer to the document type you created in step 1.
This is required in order to assert that the namespace declarations are added to the XML document emitted as an EDA event.
9. Right click and select Run As > Run Flow Service to send events using the flow service. You can use the following input:
<?xml version="1.0" encoding="UTF-8"?>
<IDataXMLCoder version="1.0">
<record javaclass="com.wm.data.ISMemDataImpl">
<record name="PartInventoryLow" javaclass="com.wm.data.ISMemDataImpl">
<record name="ns:PartInventoryLow" javaclass="com.wm.data.ISMemDataImpl">
<record name="ns:Part" javaclass="com.wm.data.ISMemDataImpl">
  <value name="ns:ItemID">154</value>
  <value name="ns:ItemName">Car</value>
  <value name="ns:Model">Audi A4</value>
  <value name="ns:Color">Grey</value>
  <value name="ns:Shape">Standard</value>
</record>
  <value name="ns:InventoryLevel">1</value>
  <value name="ns:DesiredInventoryLevel">2</value>
</record>
</record>
</record>
</IDataXMLCoder>
Note:  
The name attribute of the second <record> element must match the name of the document reference configured as the input of the flow service.
Copyright © 2016 - 2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback