This is a discussion on Cars Online Part 5 - Order To Invoice - Solaris Rss ; Read the original article at The Crooked Stick This is the Third entry in this trail that is GlassFish ESB (OpenESB) and presents the final stage of the Cars Online ordering processand discusses the functionality available within the Order to ...
Read the original article at The Crooked Stick
This is the Third entry in this trail that is GlassFish ESB (OpenESB) and presents the final stage of the Cars Online ordering processand discusses the functionality available within the Order to Invoiceprocess. It will take you through the functionality provided andexplain how this is implemented to provide a real-time response to along running process. Now because the intention is to use this in ademonstration scenario the processes are all designed to run in minutesrather than in days.
We will also look at how this application is integrated with the
BackInBlack BPEL Monitor to provide the user / customer with aBusiness Skinned Order tracking functionality based on the in-buildOpen ESB / GlassFish ESB Monitoring tables and functionality.
Once the Business Process has been initiated it will follow theSteps define below but does not wait until completion before itreturns. Thus we can receive a response that the order has beenvalidated and sent but the process will continue to run Asynchronously.Alternatively we could have simply used JMS to provide the Asynchronousprocessing but this would not have given me the ability to seamlesslyintegrate with , and hence leverage, the Open ESB / GlassFish ESBMonitoring functionality.
Thesteps required to process an Order to completion are:
It can be seen from the BPEL process that this top level BusinessProcess does not contain any Technical functionality but rather simplycalls a series of Business Services that will execute the appropriatefunctionality. This provides a number of advantages because theBusiness Analyst can design this process and the Developer can buildthe Services. In addition because this will be a long runningtransaction it will be passivated to the database rather than remainingin memory whilst waiting for the appropriate response. The net resultof this is a reduction in the memory requirement of the process.
- Generate a Unique Order Id.
- Persist the Order to a database.
- Reply - This does not terminate the process but simply allows itto continue running Asynchronously.
- Validate The Order.
- Order Confirmation - Send an Email to the customer.
- Set-up Finance.
- Build the Car.
- Deliver to the Dealer.
- Ready for Pickup - Emails the Customer informing them that theycan pick up their car.
- Invoice - Send out Invoice by Email.
The persist order Business Service will simple take the orderdetails and write them to an appropriate database. At the moment itwill take write a limited set of information because that is all thatis needed for the demonstration.
If necessary we could link with the persistencedatabase to retrieve the full details.
The Validate Order process simply checks that all the requiredfields have been completed and then returns.
The Order Confirmation process will take the Order information, thathas been validated, and build the Order Confirmation email that willthen be send to the Customer and the Accounts email. The generatedemail will be displayed in HTML and contain a link that will allow theuser to link to the Cars Online Order Tracking screen. When this isselected the Customer Order information will be displayed along with aBusiness Skinned SVG Representation of the Order To Invoice BusinessProcess.
Although the current email is simple in its layout this providesenough information for the user and does not burden the email client.We could, if required, enhance this with a similar L&F to the webapplication.
The Finance Order process takes the Customer order information andarranges the previously agreed finance terms. If this is a Cash paymentthe it does not do anything because we already have the customers cash.
The Build Car process simulates the ordering of components andbuilding of the car. This is currently done using a number of waitprocesses because we can not actually build the vehicle.
Deliver to Dealer
The Delivery to the Dealer process would activate a human workflowthat receives the vehicle and takes it through the various dealerchecks and valeting.
Ready For Pick-up
Following the Delivery the Ready For Pick-up process will simplebuild a new email message that can be sent to the Customer informingthem that their car is now ready for them.
The Invoice process is the final Business Service to be executed andwill raise an invoice in the approriate end systems and then email itthe customer.