Set Up an Evaluation Rule for Message-Processing Termination

You must implement a rule for terminating message processing.

Here's what you need to do:

  1. Download the XSL file of the message definition (export transformation package) for the message that you want to implement the rule for and add code as shown using the information for your scenario as outlined in step 2:

    <xsl:choose>
    
       <xsl:when test="/[xpath to the field you want evaluated]= '<value>'">
    
            <cmk:ProcessingConfiguration>
    
                <cmk:MessageValidationStatus><xsl:text>Skipped</xsl:text></cmk:MessageValidationStatus>
    
                <cmk:ValidationStatusDetail><xsl:text>Outbound Processing Rule Validation </xsl:text></cmk:ValidationStatusDetail>
    
                <cmk:ValidationStatusDescription><xsl:text>[Description]</xsl:text></cmk:ValidationStatusDescription>
    
                <cmk:LogMessage><xsl:text>false</xsl:text></cmk:LogMessage>
    
             </cmk:ProcessingConfiguration>
    
       </xsl:when>
    
    </xsl:choose>
  2. Insert your information as outlined:

    • [XPath to the field you want to evaluate]: Add an XPath to a field that can be modified to contain a value that will trigger the evaluation.

    • <Value>: Add the value for that evaluation.

    • Set MessageValidationStatus to Skipped or Error, whichever you want to set as the message status.

    • Set ValidationStatusDetail to Outbound Processing Rule Validation or to Inbound Processing Rule Validation, depending on whether you're implementing the evaluation functionality for an outbound or inbound message.

    • ValidationStatusDescription can be any description that reflects your reason to terminate message processing of that message such as Order created for billing only. The value you enter is displayed in Error Description in the log on the Manage Collaboration Messaging History page.

    • Set the LogMessage value to False, which results in the message not being logged, or True, which results in the message being logged.

      Note: The LogMessage applies only to outbound messages for additional recipients, but does not apply to the primary recipient.

When the value passed in the XML payload matches the XPath evaluation, the status variable is set to Skipped or Error and any further message processing is stopped. The outbound message is logged (depending on the the LogMessage value) without attempting delivery and and the inbound messages are logged and not delivered to the application.

Rule to Determine Message-Processing Termination in Predefined Purchase Order Messages

The XSL files associated with the predefined message definitions OAGIS_10.1_PROCESS_PO_OUT and OAGIS_10.1_PROCESS_PO_COLLAB_MSG_OUT include the code to evaluate for message-processing termination, as shown here. This code is commented out by default. To implement the rule, enable the code and update the XPath to be evaluated based on your implementation requirements.

<xsl:choose>

    <xsl:when test="/cmk:processOutboundCollaboration/cmk:OutboundCollaboration/tns:findOrderByPoHeaderIdResponse/tns:result/ns1:SupplierDFFAttribute1 = 'Skip'">

    cmk:ProcessingConfiguration>

       <cmk:MessageValidationStatus><xsl:text>Skipped</xsl:text></cmk:MessageValidationStatus>

       <cmk:ValidationStatusDetail><xsl:text>Outbound Processing Rule Validation </xsl:text></cmk:ValidationStatusDetail>

       <cmk:ValidationStatusDescription><xsl:text>Order created for billing only</xsl:text></cmk:ValidationStatusDescription>

    </cmk:ProcessingConfiguration>                                                                                                    

    </xsl:when>

     <xsl:when test="/cmk:processOutboundCollaboration/cmk:OutboundCollaboration/tns:getCmkInputPayloadResponse/tns:result/nsv2:PdfDraftPurchaseOrderHeaderVORow/nsv2:SupplierDFFAttribute1 = 'Skip'">

     <cmk:ProcessingConfiguration>

       <cmk:MessageValidationStatus><xsl:text>Skipped</xsl:text></cmk:MessageValidationStatus>

       <cmk:ValidationStatusDetail><xsl:text>Outbound Processing Rule Validation </xsl:text></cmk:ValidationStatusDetail>

       <cmk:ValidationStatusDescription><xsl:text>Order created for billing only</xsl:text></cmk:ValidationStatusDescription>

     </cmk:ProcessingConfiguration>                                        

    </xsl:when>

The outbound PO is skipped if the value in the header SupplierDFFAttribute1 is Skip.

Note:
  • OrderByPOHeaderResponse is applicable if there's no custom PO template being used for B2B messaging (when the profile option PO_ELECTRONIC_COMM_DATA_MODEL is set to No).

  • getCmkInputPayloadResponse is applicable if a custom PO template is being used for B2B messaging (when the profile option PO_ELECTRONIC_COMM_DATA_MODEL is set to Yes).