Technical solution

Atom collections can be used by Company A to expose order data without granting Company B access to their CICS system. Event processing can be used to monitor the status of the orders that Company B has processed.

Company A stores order data in a New Orders VSAM file. When an order for any product is made, the order is appended to the new orders file. Company A must expose the contents of new orders file as an Atom collection. By exposing the contents of the file as an Atom collection, Company B can make GET, POST, PUT, and DELETE requests to the Atom collection. For more information about Atom collections, see Atom documents. The Atom collection, therefore, enables Company B to access and update the order data. Company A must also create two other VSAM files for fulfilled orders and unfulfilled orders. These files must also be exposed as Atom collections so that Company B can notify Company A of status of each order by making a POST request to the appropriate file.

The processing application (OPA) used by Company B must be able to issue Atom collection requests to the Atom collections supplied by Company A. To obtain the order data, the OPA must make a GET request to the new orders Atom collection. As a result of this GET request, the new orders Atom collection supplies the OPA with the order data in the new orders file. The OPA determines if there is sufficient stock levels of the products ordered to fulfill the order.

If there are sufficient levels of stock then the order can be fulfilled. When the order has been processed the OPA notifies Company A by issuing a POST request to the fulfilled orders Atom collection. Company A can use event processing to monitor for POST request to this collection. When a POST request is made, an event is triggered to alert Company A that an order has been successfully processed.

If there is insufficient stock of the product to fulfill the order, the order is not processed. The OPA notifies Company A of an unprocessed order by issuing a POST request to the unfulfilled orders Atom collection. Company A can use event processing to monitor for POST request to this collection. When a POST request is made, an event is triggered to alert Company A that an order has not been processed due to a lack of stock.

After the OPA sends the appropriate POST request to either the fulfilled orders or unfulfilled orders Atom collections, the original order can be deleted from the new orders file. To do this, the OPA sends a DELETE request to the new orders Atom collection.

Figure 1 shows a flow diagram of the order fulfillment process, as described preceding paragraphs, including the Atom collection requests and responses and the event processing triggers.

Figure 1. Flow diagram describing the Atom feed and event processing concepts for this scenario
The left side of this diagram displays the new orders, unfulfilled orders, and fulfilled orders files and how these files are exposed as Atom collections and when EP events are triggered. The right side of the diagram shows the flow of the order processing application as described in this topic.