Ariba Supplier OnRamp 7.1 | webMethods Ariba Supplier OnRamp Documentation | webMethods Ariba Supplier OnRamp Installation and User’s Documentation | Implementing a Punchout Ordering System with Trading Networks | Creating OrderRequest Processing Rules
 
Creating OrderRequest Processing Rules
You can define a processing rule for each operation (new, update, or delete) of a OrderRequest, or you create one rule to apply to all operations. The purpose of a processing rule is to invoke custom code when OrderRequest operations are executed. To create a processing rule, you:
*Use Config to specify the operation and the names of the rule and its associated service and package.
*Use Trading Networks to specify conditional processing criteria for the rule.
*Use Designer to define the Integration Server service that the rule invokes.
*To create an OrderRequest processing rule
1. In the Ariba Supplier OnRamp Configuration screen, click the Use Trading Networks Support check box and click the Update button next to it.
The page displays the fields that support Trading Networks.
2. Click the Create button next to theOrderRequest Processing Rule label.
The Create Trading Networks Processing Rule for OrderRequest screen appears.
3. Complete the following fields and click the Submit button:
In this field...
Specify...
Operation
Select new, update, or delete. Select any if you want the rule to apply to all operations.
Rule Name
The name of the rule.
Rule Description
Optional. A text description of the rule.
Service Name
The name of the service that will be associated with the rule. Type the name in the following format:
folderName:serviceName
Package Name
The name of the package in which the service will be located.
4. View the rule from the Trading Networks Console to confirm that the processing rule was created, and to verify that the rule invokes the service you specified.
5. Move the processing rule above Default Rule and modify the processing rule to create more restrictive conditions when the rule is executed. For more information, see the webMethods Trading Networks Administrator’s Guide for your release.
6. Using Designer, display the service stub you specified and implement your OrderRequest processing inside the sequence labeled ADD YOUR CODE HERE.
The following fields are available in the pipeline for you to use:
Field
Description
OrderRequest
A record representing the OrderRequest.
operation
The OrderRequest operation type.
language
The language encoding specified in the request.
AttachmentWrapperCollection
If one or more attachments were sent with this OrderRequest, the collection object will be present in the pipeline.
Note:Trading Networks does not do anything special with the attachmentWrapperCollection. It is created by the Ariba Supplier OnRamp package and inserted into the pipeline before the Trading Networks service is invoked.
The following data fields are available for your convenience:
Field
Description
ReceiverID
The To credential Identity of the request.
SenderID
The From credential Identity of the request.
cXML_ReceiverIDDomain
The To credential Identity domain.
cXML_SenderIDDomain
The From credential Identity domain.
cXML_MarketplaceSenderID
If specified in the cXML Header, the From credential Identity with type marketplace.
cXML_MarketplaceSenderDomain
If specified in the cXML Header, the From credential Identity domain with type marketplace.
cXML_RoutingAgentID
The Sender credential Identity.
cXML_RoutingAgentDomain
The Sender credential Identity domain.
cXML_OrderDate
The Order Date.
cXML_OrderCurrency
The currency used in that order.
cXML_OrderID
The unique identifier for the order.
cXML_OrderTotal
The total amount for the order.
bizdoc
The Trading Networks document envelope. Advanced users can use the Trading Networks API to extract data from the bizdoc envelope that is not already extracted for you.
sender
The Trading Networks sender profile. Advanced users can use the Trading Networks API to extract data from the sender profile that is not already extracted for you.
receiver
The Trading Networks receiver profile. Advanced users can use the Trading Networks API to extract data from the receiver profile that is not already extracted for you.
language
The language used for the cXML request. This field may be set, depending on whether the cXML request has its xml:lang attribute set.
operation
The cXML Request operation type: new, update, or delete.
In addition, if you customize the processing rule to extract additional fields, those fields will also be available in the pipeline.
7. Ensure that you have created and implemented an OrderRequest handler, as described in Creating PunchOutSetupRequest Handlers.
8. In your implementation, you must create a serviceError record with a localized error message if there was an error.
The service stub's post processing will create the OrderResponse or ErrorResponse accordingly. The service stub will also perform all logging functions, if enabled.