webMethods Event Routing 10.3 | Event Routing for Developers | Using the Event Routing Integration Server Built-In Services | Using the pub.event.routing:send Service
 
Using the pub.event.routing:send Service
The procedure below explains how to use the pub.event.routing: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.routing:send service
1. In the Service Development perspective in Designer, create a new document type from an existing event type, for example the PartInventoryLow event type.
You can use any event type that has previously been deployed to the Event Type Store in your Software AG installation. For more information about deploying event types, see Deploying EDA Event Types.
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. Select File/URL for source location, and 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. On the next page of the wizard, leave the schema-related processing options unchanged, and click Next.
e. Select the PartInventoryLow element as the root node, enable the Expand complex type inline option for a cleaner layout, then click Next.
f. 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.
Note: You can drag and drop the document type from Package Navigator view.
4. In the Tree or the Layout tab of the Flow service editor, insert an INVOKE pub.event.routing: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.routing:send service in the Service Input area.
6. 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.
7. 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.
8. Right click and select Run As > Run Flow Service to test your flow service.
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 © 2010-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.