Set Up Message Processing Rules

You can modify the processing of an inbound or outbound message.

The message processing modification ways are:

  • You can set default values for a field.

  • You can make a field required.

  • You can terminate the processing of a message.

Set a Default Value or Make a Field Required

You can create a rule, one per field, to either define a default value for a field or make a field required. For example, you could make the Revision ID field required for a purchase order. Here's an example of the Manage Message Processing Rules dialog box, where you create the rules for requiring a value or setting a default value for a field.

Each rule must have a unique name and node XPath (which identifies the location of the field in the message). You then either define a default value for a field or specify whether a field is required, but you can't choose both. And you can apply only one rule per field.

The XPath location is based on the external message type of the trading partner (if a service provider isn't being used) or the external message type of the service provider.

For example, if the XPath for the Revision ID field in an OAGIS 10 compliant purchase order, the XPath would be: ProcessPurchaseOrder/DataArea/PurchaseOrder/PurchaseOrderHeader/RevisionID

For a cXML compliant purchase order, the XPath would be: cXML/Request/OrderRequest/OrderRequestHeader/@orderVersion

Set Up Default Values or Make a Field Required for a Trading Partner with a Service Provider

If your trading partner uses a service provider, and you want to set up required fields or set default values for fields in one of the messages they exchange, you first need to set up a message definition for the trading partner by overriding the service provider's message definition. See how to set up a trading partner with a service provider. Then take the steps to set up default values or required fields for a trading partner without a service provider.

Set Up Default Values or Make a Field Required for a Trading Partner Without a Service Provider

If your trading partner doesn't use a service partner, first you need to select the trading partner with which you want to exchange messages. Then select either the outbound or inbound message for which you want to set up processing rules.

Take these steps:

  1. In the Collaboration Messaging work area, click Manage B2B Trading Partners from the Tasks panel.

  2. On the Manage B2B Trading Partners page, in the Search section, select None in the Service Provider field. You can narrow the search further by entering values in these optional fields: Trading Partner ID and Partner ID Type. Then click Search.

  3. Select the trading partner and click Actions > Edit.

  4. On the Edit Trading Partner page, click either the Outbound Collaboration Messages tab or the Inbound Messages tab.

  5. Select the message for which you want to set up rules, and click Actions > Manage Message Processing Rules.

  6. In the Manage Message Processing Rules dialog box, you can either define a default value for a field or specify whether a field is required or optional. Do one of these:

    • To define a default value for a field, populate the Name, Node XPath, and Default Value fields.

    • To specify that a field must have a value, select the Required check box.

      Note: You can either assign a default value to a field or make it required, but not both.Click the Add Rows icon for more processing rules.
  7. Repeat Steps 5 and 6 until you're finished adding processing rules.

  8. Click OK.

  9. Click Save and Close.

Evaluate Whether to Terminate Processing of a Message

You can terminate message processing after message transformation based on the evaluation of the XPath in the XSL file associated with a message definition. If the XPath evaluation is true, then the message processing is terminated. An outbound message isn't sent to the trading partner. An inbound message isn't delivered to the application and the message is logged with a status of Skipped or Error. See the Set Up an Evaluation Rule for Message-Processing Termination section in the Message Implementation chapter for details on how to modify the XSL file.