Fusion Order Demo Project
Fusion Order Demo Project
information to the internal customer service application called Storefront Service. Storefront Service then stores the customer information in a database. The customer can then browses products, add them to their online shopping cart, and place the order. User ngreenbe is the only user not required to register before placing an order.
When a registered customer uses Global Company s storefront user interface, the user interface invokes the Storefront Service and provides authentication. A registered user builds up their shopping cart, and places an order. When the order is submitted, the following events take place: After an order is placed, the following sequence occurs to complete the order: 1. Oracle ADF Business Component writes the order to a database with schema for Fusion Order Demo, and raises a NewOrderSubmitted event using the Event Delivery Network (EDN). The data associated with this event is the order ID. 2. Because the OrderPendingEvent mediator subscribes to the NewOrderSubmitted event, the EDN layer notifies the OrderPendingEvent mediator of the new order. 3. The OrderPendingEvent mediator receives the order and routes the input order ID to the OrderProcessor BPEL process. 4. The OrderProcessor BPEL process receives the order ID from the database, using a bind entity activity to bind to the exposed Oracle ADF Business Component Storefront Service service. Some of the information about the order used later in the process is: Customer ID Items the customer purchased Credit card used Shipping address chosen 5. The BPEL process initiates Storefront Service, passing it the order ID, to retrieve information about the customer. 6. The BPEL process then sends the purchase amount, credit card type, and credit card number to CreditCardAuthorizationService, which verifies if the customer's credit card is valid. If credit card is not valid, the BPEL process cancels the order. If credit card is valid, the BPEL process sends the order to the RequiresApprovalRule business rule to determine if the order requires approval by management. 7. The RequiresApprovalRule business rule evaluates if manual approval is required. The business rule contains a rule that requires manual approval for orders over $2,000.
8. For those orders requiring manual approval, the BPEL process invokes the ApprovalHumanTask human task, which in turn performs the following: Routes a message to an assignee named jstein, who then approves or disapproves the order. Publishes the OnTaskAssigned event. The OrderApprovalTaskAssignedMediator mediator subscribes this event, and if an Oracle BAM Server is configured, it uses an Oracle BAM Adapter to send the assignee ID jstein (based on the ECID) of the order to the Oracle BAM Server. 9. If the order is approved, the BPEL process sends the order information to the following suppliers in parallel to obtain a bid: Internal supplier by using the InternalWarehouseService BPEL process, also located in OrderBookingComposite External supplier by using the PartnerSupplierMediator mediator, which in turn routes to the ExternalPartnerSupplier BPEL process or SpringPartnerSupplierMediator spring component, located in another composite called PartnerSupplierComposite 10. The two suppliers respond with their bids, and the BPEL process sends the bids to the EvaluatePreferredSupplierRule business rule. 11. The EvaluatePreferredSupplierRule business rule chooses the supplier with the lower of the two bids. 12. The BPEL process invokes the FulfillOrder mediator, which performs the following four operations: Stores the order in a temporary queue and uploads it to the fulfilment system in batch mode overnight Routes the order to USPS If an Oracle BAM Server is configured, it uses an Oracle BAM Adapter to send data about the order (based on order ID) to the Oracle BAM Server. If an Oracle BAM Server is configured, it uses an Oracle BAM Adapter to send data about the time for the order to process (based on the instance ID) to the Oracle BAM Server. 13. Once the order is fulfilled, the BPEL process sets the order to complete. 14. The BPEL process invokes the NotificationService service, which sends the customer an E-mail notification with the purchase order information. 15. When the order completes, the OrderPendingEvent mediator publishes the OrderCompleted business for the OrderProcessor process. While not depicted in Figure, the OrderBookingComposite composite provides the following processing flow for approved orders:
1. The UpdateOrderStatus mediator performs the following: Publishes business event OrderUpdateEvent and sends the order ID to the OrderProcessor BPEL process. If an Oracle BAM Server is configured, it uses an Oracle BAM Adapter to send data about the order ID and order status to the Oracle BAM Server. 2. The OrderUpdateEventMediator mediator subscribes to business event OrderUpdateEvent, sends the order ID to StoreFrontService, and waits for the StoreFrontService to respond with updated details about the order. To aid with the tracking of an order, the OrderBookingComposite composite contains sensors to provide a method for implementing trackable fields on messages. For example, the CreditCardAuthorization service has a composite sensor that indicates if the credit card was authorized. In addition, the OrderProcessor BPEL process also uses sensors for various activities. For example, the Scope_AuthorizeCreditCard scope in the OrderProcessor BPEL process, which verifies that the customer has acceptable credit using the CreditCardAuthorizationService service, uses a sensor for tracking. When you monitor instances of a composite through Oracle Enterprise Manager Fusion Middleware Control Console, you can monitor the sensors for both the composite and the BPEL process.