Creating PunchOutSetupRequest Processing Rules
You can define a processing rule for each operation (create, edit, or inspect) of a PunchOutSetupRequest, or you create one rule to apply to all operations. The purpose of a processing rule is to invoke custom code when PunchOutSetupRequest 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 implement the
Integration Server service that the rule invokes.
To create a PunchOutSetupRequest 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 the PunchOutSetupRequest Processing Rule label.
The Create Trading Networks Processing Rule for PunchOutSetupRequest screen appears.
3. Complete the following fields and click the Submit button:
In this field… | Specify… |
Operation | Select create, edit, or inspect. 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 PunchOutSetupRequest processing inside the sequence labeled ADD YOUR CODE HERE.
7. The following fields are available in the pipeline for you to use.
Field | Description |
PunchOutSetupRequest | A record representing the PunchOutSetupRequest. |
operation | The PunchOutSetupRequest operation type. |
language | The language encoding specified in the request. |
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_PunchOut_BuyerCookie | The Ariba Buyer's BuyerCookie. |
cXML_PunchOut_BrowserFormPostURL | The Ariba Buyer's punchout URL. |
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. |
In addition, if you customize the processing rule to extract additional fields, those fields will also be available in the pipeline.
9. In your implementation, either you must return the catalogURL in a field called catalogURL or you must create a serviceError record with an error message if there was an error.
The service stub's post processing will create the SetupResponse or ErrorResponse accordingly. The service stub will also perform all logging functions, if enabled. In addition, if you customize the processing rule to extract additional fields, those fields will also be available in the pipeline.