Adding a Processing Rule
On the Processing Rules page, the sequence of processing rules is important because, for every inbound document, webMethods.io B2B selects an appropriate processing rule in the specified sequence. Therefore, for the matching to happen in the correct sequence, ensure that you place a processing rule with specific criteria above a general processing rule that accepts any document from any sender or receiver.
To add a processing rule
In webMethods.io 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 following: 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 webMethods.io B2B must use to select a processing rule to apply on receipt of an inbound document.
Criteria Description Sender criteria Criteria extracts the values of the sender attribute (the sender of the document) to determine the sending partner. Then webMethods.io B2B matches the sender partner from the document with the sender you specify in the processing rule. For example, if you specify the sender criteria in a processing rule, webMethods.io B2B uses the value extracted for the sender attribute to find the profile for the sending partner. Then, webMethods.io B2B matches that partner with the sender criteria in the processing rule. The possible values are: - 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 extracts the values of the receiver attribute (the receiver of the document) to determine the receiver partner. Then webMethods.io B2B matches the receiver partner in the document with the receiver you specify in the processing rule. For example, if you specify the receiver criteria in a processing rule, webMethods.io B2B uses the value extracted for the receiver attribute to find the profile for the receiver partner. Then, webMethods.io B2B matches the partner with the receiver criteria in the processing rule. The possible values are: - 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 matches 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, you can the define document criteria to select a processing rule if the document matches with the ORDERS purchase order. The possible values are: - Any. Matches with any type of document.
- Unknown. Matches with unknown type of document.
- Selected. Matches with a selected business document.
User status Criteria matches with the value of the user status in the document to the user status criteria specified in a processing rule. For example, you might set the user status attribute to PENDING in certain circumstances, and you can then define 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 matches with the value 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 webMethods.io B2B did not encounter errors. The possible values are: - 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 you specify depends on the data type of the attribute specifiedValue 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 value types specific to the attribute selected as follows:- 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 using the format yyyy-mm-dd hh:mm:ss and a 24-hour clock for hh.
Note: Ensure that the date and time stamp 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, you could check that the incoming purchase order is not above or below 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 webMethods.io B2B to decide the pre-processing actions to perform before applying the processing rules:
Pre-processing action Description Duplicate check Checks if the shared document is a duplicate. The possible values you can set are: - Yes. Check if 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
- 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 webMethods.io B2B. Save a copy based on one of the following options: - Yes
- Only unique documents. Save only unique documents to webMethods.io B2B.
- All documents. Save all documents. The parts of the documents you can save are:
- Content. Save only the content part of the document.
- Attributes. Save only the document attributes.
Note: If you reprocess a document without saving document attributes, you might get unexpected results. Because if the attributes are not saved, the document would not match the intended processing rule. Instead, the document would match another processing rule, such as the Default rule, and webMethods.io B2B would perform the processing actions defined in that rule. - Activity log. Save only the activity logs of the document.
Click Next.
In the Configure actions step, specify the details for webMethods.io B2B to perform on the document.
Action Description Call an integration Call a FlowService that is designed using webMethods.io Integration or use any other integration software to invoke the service endpoint with basic authentication. webMethods.io Integration is selected by default. - webMethods.io Integration
Provide the following details:
- Project. Select a project where the FlowService resides.
- FlowService. Select the FlowService you want to run.
Note: Ensure that the FlowService is enabled to be invoked over HTTP in webMethods.io Integration.
- Username. Select the username to access the FlowService.
Ensure that the user you select has the required roles and permissions to execute this project.
The filter allows you to select the FlowService 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 My cloud App. - Execution mode. webMethods.io B2B can invoke the FlowService in one of the following ways:
- Asynchronous. webMethods.io B2B continues with the remaining processing actions immediately. If there are no subsequent processing actions, webMethods.io B2B returns to the caller that sent the document for processing. You can track the result of this type of FlowService on the Monitoring page webMethods.io Integration.
- Synchronous. Before performing the rest of the processing actions, webMethods.io B2B waits for the FlowService to complete before returning 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 webMethods.io B2B to automatically retry running the failed FlowService by creating a task to track the completion. When webMethods.io B2B attempts to execute a FlowService and if the FlowService fails, webMethods.io B2B retries running the FlowService subsequently until it succeeds or until it reaches the maximum retry limit. If the FlowService execution reaches the maximum retry limit without succeeding, webMethods.io B2B marks the FlowService execution task as failed
.
- External Call
Provide the following details:
- URL. Specify the URL with which you want to invoke a service endpoint.
- Username. Type the username to connect to the server on which the service endpoint resides.
- Password. Type the password to connect to the server hosting the service endpoint.
- Execution mode. webMethods.io B2B can invoke the service in one of the following ways:
- Asynchronous
- Synchronous
- Reliable (default)
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 FlowService in webMethods.io Integration, see Service Signature for Calling a FlowService in webMethods.io Integration.
See webMethods.io B2B Connectors for a tutorial on the various connectors you can invoke on webMethods.io 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 either be technical or administrative. This option does not appear if you add multiple email addresses. Ensure that you have already 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 using output template tags. The pipeline contains variables that can be used to dynamically populate the values. In addition, if the processing rule invokes a service endpoint that executes synchronously, the pipeline would also contain any 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 drafting 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 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.io B2B checks the receiver's profile and uses the delivery method that is identified in the profile as the preferred outbound channel. - webMethods.io Integration
On the Processing rule page, click the newly created processing rule to select it.
On the header bar, activate
the processing rule.
Changing the Sequence of a Processing Rule
Arrange the rules in the sequence you require so that the processing rules that have specific criteria listed above rules with general criteria. Also, the Default rule does not ignore any document, and webMethods.io B2B uses it to match any document that does not match any other processing rule you defined.
Tip: Software AG recommends that you keep the Default rule as the last rule on the Processing rules page when no search criterion is applied.
To change the sequence of a processing rule
In webMethods.io B2B, go to Rules
> Processing rules.
Select the processing rule.
The selected row is highlighted as shown in this example:
Move the selected processing rule up
or down
in the processing sequence:
- To move up, click
to decrease the sequence number of the processing rule.
- To move down, click
to increase the sequence number of the processing rule.
Using the example of the Steering supplier 2 rule in the image in the previous step, moving up means that the processing rule at sequence 11, changes to position 10. Subsequently, an inbound document first tries to match with Steering supplier rule before trying to match with the Tyre supplier rule.
Using the example of the Steering supplier 2 rule in the image in the previous step, moving down means that the processing rule at sequence 11, changes to position 12. Subsequently, an inbound document first tries to match with Seat supplier rule before trying to match with the Steering supplier rule.
Tip: If you have a large list of processing rules, click
to set a target sequence number to move a processing to a specific position and click Move.
Note: When you change the sequence of a single processing rule, the entire processing rule list gets re-ordered to accommodate the change. Therefore, changing the sequence of a processing rule does not lead to a change in its last modified time.
What are Native Processing Rules?
webMethods.io B2B has a set of native processing rules to ensure the intended functions and flows for processing specific set of business documents. Therefore, you cannot delete or modify a native processing rule. However, you can change the sequence of the native processing rules and activate or deactivate them for to make webMethods.io B2B use the processing rules you create instead of using the native to process inbound documents.
The native processing rules in webMethods.io B2B are:
Native Processing Rule Name | Description |
---|---|
EDIINT Send Message Using Channel | Sends a synchronous EDIINT message using the outbound channel configured for a partner. |
EDIINT Send MDN Message Using Channel | Sends an asynchronous MDN message using the outbound channel configured for a partner. |
Deliver Functional Acknowledgement | Delivers a functional acknowledgement using the outbound channel configured for a partner. |
EDIINT Process Message | Persists EDIINT messages received from a partner. webMethods.io B2B creates several transaction documents for an inbound EDIINT document with the payload type EDI by splitting the payload, group, and interchange of the message. |
EDIINT Process MDN Message | Processes and persists EDIINT MDN messages received from a partner. |
Profile Validation Standard Fields | Ensures that all the required standard fields of a partner profile have no blank values. |
Profile Validation Profile | Validates a partner profile for standard fields. In addition to validating all the mandatory fields, it ensures that the partner profile has the corporation data, and the required identity type, and identity value. If a preferred outbound channel is selected, it validates all the mandatory values that are specified for the channel. Note: If a partner is exchanging an EDIINT AS2 document, the partner must have the EDIINT AS2 identity type in addition to the existing identity types, for the transaction to be processed successfully. |
Profile Validation Extended Fields | Validates the extended profile fields. |
Default Rule | Matches an inbound document with any sender, any receiver, any document type, any document user status, and any recognition errors. The pre-processing actions in the default processing rule indicate that webMethods.io B2B must use the settings mentioned in the inbound document. The default processing rule is not editable. Tip: Software AG recommends that you keep the Default rule as the last rule on the Processing rules page when no search criterion is applied. |
For details on a default processing rule, see How Does a Default Processing Rule Work?
How Does a Default Processing Rule Work?
The Default processing rule, also known as Default rule, matches with an inbound document having:
- Any known or unknown sender
- Any known or unknown receiver
- Any known or unknown type of business document
- Any user status
- A document that may have errors
Pre-processing actions in the default processing rule indicate that webMethods.io B2B must use the settings in the document. The Default rule is not editable.
Any document that webMethods.io B2B receives, therefore meets the criteria of the Default rule.
Tip: Software AG recommends that you keep the Default rule as the last rule on the Processing rules page when no search criterion is applied.
Unknown Document and Unknown Partners
If a document does not match any of the supported business documents or if it matches with multiple types of business documents, the document is considered to be of an unknown document.
If a document was sent by one of your partners, but webMethods.io B2B cannot determine the sender (for example, the document is unknown and the document sender attribute could not be extracted), webMethods.io B2B considers the sender as an Unknown partner.
However, you can also create a processing rule above the default processing rule for webMethods.io B2B to process all the inbound document that are of Unknown type.
To search for documents with Unknown partners, search for unknown. Search is not case-sensitive.
Service Signature for Calling a Flow Service in webMethods.io Integration
A signature is an agreement between webMethods.io B2B and webMethods.io Integration. After you call an integration on webMethods.io Integration, webMethods.io B2B receives the results of service execution and displays the information either in the form of tasks in case of Reliable execution mode and also as an entry in the Course of transaction section of the corresponding transaction.
Input Request
The input parameters for the service are:
Field | Sub-field | Description | ||
---|---|---|---|---|
metadata | Document Metadata is a composite object containing the fields: | |||
sender | String Name of the recognized sender. | |||
receiver | String Name of the recognized receiver. | |||
documentType | String Name of the recognized business document. | |||
documentId | String Internal ID extracted as a transaction attribute. | |||
userStatus | String Status that you or a partner assign to a document (for example, Needs Approval). | |||
groupId | String Identifier that associates a transaction with other transactions in a group. | |||
conversationId | String Identifier that associates a transaction with other transactions that are processed by a business process. | |||
attributes | Document Key-Value pairs of all extracted attributes of the transaction (key is attribute name, and value is attribute value). For example, cost, trackingId. Note: Attribute name is case-sensitive. |
|||
Parameter | Description | |||
$duplicate | String Identifier of duplicate documents. The document is identified as duplicate when the value is set as true . The default value is false .Note: You can prevent spurious execution of an integration by using the $duplicate attribute in the attributes list parameter available in all the requests that webMethods.io B2B makes to webMethods.io Integration. Based on the value of the $duplicate parameter you can choose to execute the integration again or ignore it. |
|||
request | Document Request message is a composite object containing the fields: | |||
content | String Content of the document encoded in Base64. | |||
contentPartNames | String List The list of all the names of the content parts in the specified transaction. Note: This field can be used in getTransactionContentParts operation to get the content parts of the associated contentPartNames. |
|||
type | String Type of content being sent. The following codes pertain to file type of the inbound document:
|
|||
encoding | String Type of encoding used to encode the content in the request message.
The content is encoded in the UTF-8 standard. You cannot alter this standard. |
Output Response
The output received from webMethods.io Integration must adhere to the following output signature:
Field | Sub-field | Description |
---|---|---|
error | Document Error is a composite object containing the fields: | |
code | String Error code received from webMethods.io Integration. | |
message | String Error message associated with the error code in webMethods.io Integration. | |
response | Document Response message is a composite object containing the fields: | |
content | String Content of the document encoded in Base64. | |
type | String Type of content being sent. | |
encoding | String Type of encoding that was used to encode the content in the response message. If the response does not contain the encoding method, webMethods.io B2B considers the content to be using base64 encoding in UTF-8 standard. |
Depending on the response received from webMethods.io Integration after the service is executed, appropriate information is displayed on webMethods.io B2B. Ensure that you use the setHTTPResponse flow function in webMethods.io Integration to set the HTTP status code for webMethods.io B2B to interpret the status of the transaction.
The response can only be one of the following objects (error or response):
- response: HTTP status code range for success scenarios is 200-299.
- error: Use an appropriate HTTP status code to indicate how the error should be interpreted on webMethods.io B2B using the setHTTPResponse flow function. For example, if you are accessing an unauthorized resource, use HTTP status code 401 for webMethods.io B2B to interpret it as an unauthorized request.
Example of Request Payload
Example of the Flow Service request during the Call an Integration action in the processing rule, for an XML payload:
{
"metadata": {
"sender": "Acme Corporation",
"receiver": "SoftwareAG",
"documentType": "PurchaseOrderRequest",
"documentId": "53o5dn00ec9rmuok00000070",
"userStatus": "IGNORED",
"groupId": null,
"conversationID": null,
"attributes": {
"country": "UNITED STATES"
}
},
"request": {
"content": "<encoded content>",
"type": "1",
"encoding": "UTF8",
"contentPartNames": [
"xmldata"
]
}
}
Note: For an EDI payload, the conversationID
and GroupID
are populated with values.
Example of Response Payload
Example of the Flow Service response to signal successful execution:
{
"response": {
"content": "<encoded content>",
"type": "text",
"encoding": "UTF-8"
}
}
Example of the Flow Service response to signal execution failure:
{
"error": {
"code": "USER_STATUS_FAILED",
"message": "Failed to update user status for transaction 53o5dn00ec9rmuok00000070"
}
}
How Do I Use the Pipeline Variable Values?
You can use the tags to populate values of pipeline variables to generate email content dynamically during runtime.
For example, if the document type is purchase order, the sender’s corporation name is XYZ Steel Company, and the organizational unit is Alloys Division, the above sample message body would be rendered as follows:
B2B received a purchase order document from XYZ Steel Company– Alloys Division. You can view the document at http://xyzcompany/b2b/#/transactions/55mffm00eb0pdptc000000c1/summary/live
For a detailed list of tags that you can use, see Template Tag and Description.
You can use the following pipeline variables in your email body. The variables are case-sensitive.
Variable Category | Related variables values that can be retrieved using template tags |
---|---|
sender |
|
receiver |
|
document |
|
userStatus | bizdoc/UserStatus |
custom attributes | Any custom attributes defined by you. For example, if you defined an attribute by name checkcustomstatus, then you can retrieve the variable value using bizdoc/Attributes/checkcustomstatus |
List of Template Tags and their Descriptions
You can use tags to dynamically load the values of pipeline variables in emails.
Tags are case sensitive (For example, %value%
, not %VALUE%
or %Value%
).
All text between %…%
symbols in a tag must appear in one line (without line breaks).
%value%
Use the %value%
tag to insert the value of a specified variable in an email.
Syntax
%value \[Variable\] \[option option option...\]%
Arguments
Variable specifies the name of the variable whose value you want to insert in the code. You may specify the name of a variable that exists in the pipeline or the following keywords or reserved words:
Variable | Description |
---|---|
$key |
Inserts the path of the runtime variable. |
Options
You can use any of the following options with this tag. To specify multiple options, separate the options with spaces.
Option | Description | |
---|---|---|
null=’AnyString’ |
Specifies the string that you want the server to insert when Variable is null. You specify the string in AnyString . For example, %value carrier null=’No Carrier Assigned’% . |
|
empty=’AnyString’ |
Specifies the string that you want the server to insert when Variable contains an empty string. You specify the string in AnyString . For example: %value description empty=’Description Not Found’% . |
|
index=IndexNum |
Specifies the index of an element that you want to insert. You can use this option to extract an element from an array variable. Specify an integer that represents the element’s position in the array. (Arrays are zero based.) For example: %value backItems index=1% . |
|
encode(Code) |
Encodes the contents of Variable prior to inserting it, where Code specifies the encoding system you want the server to apply to the string. |
|
Code | Encoding Used | |
XML |
XML encoding | |
b64 |
Base-64 encoding | |
URL |
URL encoding | |
none |
No encoding | |
decode(Code) |
Decodes the contents of Variable prior to inserting it, where Code specifies the way in which variable is currently decoded. |
|
Code | Decoding Used | |
b64 |
Base-64 decoding | |
URL |
URL decoding | |
+nl |
Adds a new line character. For example:%value +nl /items/qty% %value +nl /arrivalDate% The result of the tag is: 10 10/18/20 |
Effect On Scope
None