Adding a Processing Rule
To add a processing rule
- In IBM® webMethods B2B, go to Rules
> Processing
rules. - Select an existing processing rule and click Add Processing Rule. Depending on the sequence in which you want to place the processing rule, select one of the options from Above, Below, or Last.
- Provide a name and description for the processing rule. Sequence displays the order in which the new processing rule appears.
- In the Configure Criteria step, specify the criteria that IBM webMethods B2B must use to select a processing rule to apply on receipt of an inbound document.
Criteria Description Sender criteria Criteria extract the values of the sender attribute (the sender of the document) to determine the sending partner. Then IBM webMethods B2B matches the sender partner from the document with the sender that you specify in the processing rule. For example, if you specify the sender criteria in a processing rule, IBM webMethods B2B uses the sender attribute value to find the profile for the sending partner. Then, IBM webMethods B2B matches that partner with the sender criteria in the processing rule. Select the sender criteria from the following list: - Any
- Matches with any known or unknown sender.
- Enterprise
- Matches only if the enterprise is the sender.
- Unknown
- Matches only with unknown senders.
- Selected
- Matches with a select group of senders.
Receiver criteria Criteria extract the values of the receiver attribute (the receiver of the document) to determine the receiver partner. Then IBM webMethods B2B matches the receiver partner in the document with the receiver that you specify in the processing rule. For example, if you specify the receiver criteria in a processing rule, IBM webMethods B2B uses the receiver attribute value to find the profile for the receiver partner. Then, IBM webMethods B2B matches the partner with the receiver criteria in the processing rule. Select the receiver criteria from the following list: - Any
- Matches with any known or unknown receiver.
- Enterprise
- Matches only if the enterprise is the receiver.
- Unknown
- Matches only with unknown receivers.
- Selected
- Matches with a select group of receivers.
Document Criteria match the type of business document that is used for the document you specify in the processing rule. For example, if you have an EDI UNEDIFACT D97B document of type ORDERS, define the document criteria to select a processing rule if the document matches with the ORDERS purchase order. - Any
- Matches with any type of document.
- Unknown
- Matches with unknown type of document.
- Selected
- Matches with a selected business document.
User status Criteria match the user status in the document to the user status criteria in a processing rule. For example, you might set the user status attribute to PENDING in certain circumstances. Then you can define a criteria to select a processing rule if the user status attribute is PENDING. The possible values are: - Any
- Matches with any type of user status.
- User specified status
- Matches with a user-specified status.
Type a value and click Add value to add a user status. You can add multiple user status values in a similar way.
Recognition error Criteria match with the value that you specify for the recognition of errors in a processing rule. For example, you might set up processing rule criteria to select the processing rule only if IBM webMethods B2B did not encounter errors. - May have errors
- Matches even if document may have errors.
- Has no errors
- Matches when a document has no errors.
- Has errors
- Matches even when a document has errors.
-
Click Next.
-
In the Configure extended criteria step, click Add Extended Criteria and provide the following details:
Field Description Attribute Select an attribute from the list. Data type Data type for the attribute is automatically selected. Operator Indicate how to match the Value against the value extracted from the documents. For example, you can match string values that contain specified characters using the operator Contains, match number values that are greater than a specified value using the operator Greater than, or match date values to a specified date using the operator Equals. The operator that you specify depends on the data type of the attribute specified Value Provide a value to match against the value extracted from the documents. If you use the operators Blank or Not blank, you do not need to specify a value in this field. You can specify the following value types specific to the attribute: - String
- Type the string. This match is case-sensitive.
- Number
- Type the number.
- Date and Time
- Click
to select the date from the
calendar or type the date and time by using the format yyyy-mm-dd hh:mm:ss and a
24-hour clock for hh.
Note: Ensure that the date and timestamp attributes in the incoming document payload is specified in UTC.You can use one or more extended criteria in a processing rule to identify documents with document attributes of your interest. For example, check that the incoming purchase order is not over or less than a certain amount.
-
Click Add. The extended criteria are added in the list of available extended criteria.
-
Click Next.
-
In the Configure pre-processing options step, specify the details for IBM webMethods B2B to decide the pre-processing actions before applying the processing rules.
Pre-processing action Description Duplicate check Checks if the shared document is a duplicate. - Yes
-
Check whether the document is a duplicate based on the following attributes:
- Document ID only
- Document ID and sender
- Document ID, sender, and receiver
- Document ID, sender, and document
- By starting a FlowService. You can write a FlowService in IBM webMethods Integration and select it by specifying the following details:
- The project name in which the FlowService is located.
- The FlowService you want to run for duplicate check.
- The username with which you want to run the FlowService. For the complete signature specification, see Checking for Duplicate Documents by Invoking a Flow Service in IBM webMethods Integration
- No
- Do not check for duplication.
- Defer to business document
- Check the business document for mention of a preference for duplicate checks and perform the relevant action.
Persist document Saves a copy of the document in IBM webMethods B2B. Save a copy based on one of the following options: - Yes
- Only unique documents. Save only unique documents to IBM webMethods B2B.
- All documents. Save all documents.
You can save the following parts of the documents:
- Content
- Save only the content part of the document.
- Attributes
- Save only the document attributes.
- Activity log
- Save only the activity logs of the document.
-
Click Next.
-
In the Configure actions step, specify the details for IBM webMethods B2B to perform on the document.
Action Description Stop processing duplicate documents Enable this option to stop duplicate documents from getting processed multiple times. Call an integration Call a Flow service that is designed by using IBM webMethods Integration or use any other integration software to start the service endpoint with basic authentication. By default, IBM webMethods Integration is selected. The timeout for IBM webMethods B2B to receive a response from an integration call is 5 minutes. If IBM webMethods B2B does not receive a response in this time frame, it timeouts and processes the transactions with an error.
When you call an integration from IBM webMethods B2B to IBM webMethods Integration, the content for the large document is null. To view the content of the large document, you must call getTransactionContentParts from IBM webMethods B2B operations in IBM webMethods Integration.
Important: You must have the Cloud-Tenant-Administrator role to create or update the processing rule when you call an integration to IBM webMethods Integration.In IBM webMethods Integration, provide the following details:
- Project
- Select a project where the Flow service resides.
- Flow service
- Select the Flow service that you want to run.Note: Ensure that the Flow service is enabled to start over HTTP in IBM webMethods Integration.
- Username
- Select the username to access the Flow service. Ensure that the user you select has the required roles and permissions to run this project. Use the filter to select the Flow service that is created or modified by any developer. The filter works based on the first name or last name of the developer. You can obtain this information from the Administration page under the IBM webMethods iPaaS App.
- Execution mode
-
IBM webMethods B2B can start the Flow service in one of the
following ways:
Asynchronous. IBM webMethods B2B continues with the remaining processing actions immediately. If there are no subsequent processing actions, IBM webMethods B2B returns to the caller that sent the document for processing. You can track the result of this type of Flow service on the Monitoring page in IBM webMethods Integration.
Synchronous. Before webMethods B2B runs the rest of the processing actions, IBM webMethods B2B waits for the Flow service to complete before it returns to the caller that sent the document for processing. You can track the result of this type of Flow service in the Course of transaction section.
Reliable. (Default) Allows IBM webMethods B2B to automatically retry running the failed Flow service by creating a task to track the completion. When IBM webMethods B2B attempts to run a Flow service and if the Flow service fails, webMethods B2B retries running the Flow service next until it succeeds before it reaches the maximum retry limit. If the Flow service execution reaches the maximum retry limit without succeeding, IBM webMethods B2B marks the Flow service execution task as failed
Tip: Use the Reliable execution mode for processing the large documents. This mode minimizes the risk of failures while it processes the document. - External Call
- Provide the following details:
- URL. Specify the URL with which you want to start a service endpoint.
- Username. Type the username to connect to the server on which the service endpoint is located.
- Password. Type the password to connect to the server that hosts the service endpoint.
- Execution mode. Select one of the modes from Asynchronous, Synchronous, and Reliable. IBM webMethods B2B starts the service in selected mode.
If you have a valid webMethods Cloud Container subscription, see Working with webMethods Cloud Container to configure the processing rule to run services on webMethods Cloud Container. For detailed information on the signature to use for calling a Flow service in webMethods Integration, see Service Signature for Calling a Flow service in webMethods Integration.
Send an email alert Send an email alert to the intended recipients. Provide the following details:
- Email to
- Specify the recipient of the email. Select one of the following values for the email recipient:
- Enterprise. Send an email alert to the enterprise.
- Sender. Send an email alert to the sending partner.
- Receiver. Send an email alert to the receiving partner.
- Specific email addresses. Send an email to a specific email address. A maximum of 128 email addresses can be added. The maximum character limit for an email address is 256 characters.
- Contact type
- Specify the type of contact. It can be either technical or administrative. This option does not appear if you add multiple email addresses. Ensure that you defined the contact type in the enterprise profile or the partner profile.
- Subject
- Type the email subject. The maximum character limit is 256 characters.
- Mail body
- Type the email content. The maximum character limit is 4096 characters.
If you want to make the body of the email message dynamic, you can include information from the pipeline in the mail body by using output template tags. The pipeline contains variables that can be used to dynamically populate the values. In addition, if the processing rule starts a service endpoint that runs synchronously, the pipeline also contain information that the service places in the pipeline. For example, you might want the message to specify the type of document that was received and the sender of the document. Or you might want to include a hyperlink that allows the recipient of the email message to view the document.
For information on the pipeline variables see Using pipeline variables and for the template tag to use while you draft the email, see Template Tag and Description.Note: The email body supports only plain-text and the%character is reserved for the template tags. The%character therefore is not allowed in the mail body.The Activity Log captures the email alert that is sent as part of this action.
Change user Status Specify the user status that you want to see in the transaction when the processing rule corresponding to the business document is triggered. The allowed character limit is 255. Deliver document webMethods B2B checks the receiver's profile and uses the delivery method that is identified in the profile as the preferred outbound channel. - On the Processing rule page, click the newly created processing rule to select it.
- On the header bar, activate
the
processing rule.