Broadcast on Broadcast off
The Documentation for Project Zero has moved. Please update your bookmarks to: http://www.projectzero.org/documentation/

Video Three: Building and running the Store demo

This video shows the construction and operation of the Store demo. Clicking the link will take you to a detailed overview of the application. Store demo features a workflow requiring coordination between four different actors who initiate, approve, design and receive goods deliveries. This video is in three parts. Firstly, we'll extract the Store Demo from the Flow example project and customise it for our local environment. Secondly we'll use the graphical tooling to build the Flow component. Finally we'll run the application.

The video continues from "Getting Started", in which we created a new 'flowDemo' project, and an instance of the Flow examples. Here we copy the three 'order' directories from public, the 'orderdemo' directory from app/scripts and the zero.config file into our new project. Next we edit zero.config, removing sections relating to other samples, setting an email address that will be used when running the demo, and checking that our local SMTP server is set correctly. Finally we delete index.flow in the orderdemo.order directory, since we're going to recreate it ourselves. We start the project so as to make the graphical tooling available.

Part two starts with us switching to the graphical editor. We're going to recreate the Flow logic from the beginning. The employee will enter a new order into an HTML form and POST it to start a new Flow task - so we need a receivePOST activity. The order will be sent via email to a manager for approval, with the manager's email address coming from the content of the original HTML form. The initial POST now returns, informing the employee of a link to follow once the order has been fulfilled.

Next we use a receivereplyGET activity to wait for the manager to approve or reject the order. The 'input' to the activity will be displayed in the manager's web browser. If the manager approves the order, an email must be sent to a designer. The Flow will terminate if the manager rejects the order. Here we create a transition condition to enforce the behaviour we require.

Once the order has been delivered to the store, the employee will follow the link they were provided with earlier. The 'confirmation' receivereplyGET activity will handle this, and pass control to a final task in which the customer will be notified that their order is ready for collection. Now we can save and test the flow.

This is the initial form in which the employee records the content of a customer's order. The email fields are populated with the value that we added to zero.config earlier on. As expected, the employee is provided with a URL to visit once the order arrives back from the manufacturer. Next we switch to an email client to wait for the message sent to the manager. The manager receives the mail, clicks the link, reviews and approves the order. At some time later the order is received at the store. The employee follows the link they were provided earlier, and the customer is sent an email to say that their order is ready for collection. Here we switch back to the mail client to see that this has happened. That's the end of the Store demo. I hope you've found it helpful. Thank you for watching!

Back to the list of video demonstrations

r1 - 07 Aug 2007 - 10:41:24 - mnuttall
Syndicate this site RSS ATOM
Copyright 2007 © IBM Corporation | Privacy | Terms of Use | About this site