Order orchestration: validation services

After an order gets created successfully, validation is the first step in the order orchestration process. The validation process is triggered by successful creation of an order. IBM Sterling Order Management System application uses a set of services for performing order validation.

The list of services used in the order orchestration validation process are as following:
Table 1. List of services used in the order orchestration validation process
Service Name Description
PostMsgToValidationQ Service to post a message with order information to the validation queue to send order for validation. This service is called when ON_SUCCESS event of ORDER_CREATE transaction is invoked. The XML template for ON_SUCCESS event is provided with basic order information.
TriggerOrderValidation An integration server, OrderValidationIntgServer, triggers the order validation process by picking up the message from the validation queue and calling a composite service that synchronously invokes a custom API, ProcessOrderValidation.
ProcessOrderValidation Custom API that performs the validation process. The custom API that prepares input for validation request and invokes business rules using InvokeValidationRules service as well as processes the validation response from the rules engine.

The ProcessOrderValidation API calls the getOrderDetails API to fetch order information using an extensible template, getOrderDetailsForValidation. The output of the ProcessOrderValidation API is sent to the mapping service, PrepareMappingForValidation.

PrepareMappingForValidation This service invokes the application-provided sample implementation of validation rules. You must replace it with the actual translation of order data into validation request data.

This placeholder mapping service is provided with an XSL translator component to transform the input such that it maps to the rules engine input. The XSL needs to be provided on implementation of business rules. The output from the mapping service is used to make a REST call via HTTP ‘POST’ using the service, InvokeValidationRules.

InvokeValidationRules Custom API to build request for validation and invoke rules engine using a common service, InvokeBusinessRule. This service builds the final request with header and data.
This custom API must be configured to pass request header <name>-<value> pairs as system arguments for the HTTP REST call. The response from this service is processed as validation result.
  • If the validation result returns with isValid flag as true, the order status is changed to IN_PROGRESS by ORDER_PROCESS transaction. The ORDER_PROCESS transaction is a derived ChangeOrderStatus transaction. The OnStatusChange event is configured to place a message in the decomposition queue for further processing by triggering the PostMsgToDecompQ service.
  • If the validation result returns with isValid flag as false, the ORDER_PROCESS transaction is called to change the order status to SUSPENDED. An inbox record is inserted with error data and order information.
PostMsgToDecompQ This service is invoked by OnStatusChange event of ORDER_PROCESS transaction when a customer order is moved to IN_PROGRESS status to post messages to the decomposition queue.

Viewing validation services

To view the validation services, perform the following steps:
  1. From the Application Console menu, click Configuration > Launch Applications Manager. The Applications Manager opens in a new window.
  2. From the menu, click Applications > Application Platform.
  3. From the tree in the application rules side panel, double-click Process Modeling. The Process Modeling window displays in the work area.
  4. Select the Sales Order tab to view the corresponding process modeling tree for that base document type.
  5. In the Process Types swimlane, right-click on the Sales Order process type and choose Model Process. The Repository Details window and work area display for the process type.
  6. Choose the Service Definitions tab and expand the Validation service group.