08.01.2015 Views

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 9<br />

.<strong>NET</strong> 3.0: Windows Workflow<br />

Foundation<br />

Workflow is what happens when an item is moved through various stages or people<br />

through a fixed business process. This process contains a number of steps or activities<br />

that can be acted on by machines, people, or a combination of both, <strong>and</strong> can involve various<br />

rules. For example, when you first join a new company, a set of business processes<br />

gets invoked. You need to be added to payroll, you need an office to be assigned, equipment<br />

<strong>and</strong> furniture need to be set up, <strong>and</strong> so on. Behind the scenes, a business process<br />

kicks in for the new hire. Or, when a company sells something, it typically begins with<br />

receipt of a purchase order. The purchase order has to be entered into the business system.<br />

This sets up a requisition for the product from stock. If not enough of the product is<br />

available, more needs to be ordered. When enough of the product is available, it is moved<br />

to shipping. Shipping boxes them up <strong>and</strong> sends them to the customer. Billing then generates<br />

an invoice to send to the customer. Billing also tracks payment, <strong>and</strong> if the customer<br />

pays, the order is flagged as such. If they don’t pay by the time of the terms of the invoice,<br />

a new process for collections is kicked in.<br />

Throughout this entire scenario, an “item,” the purchase requisition, flows throughout<br />

the system. The item morphs <strong>and</strong> changes throughout, but as you can see from this<br />

example, it changes into what makes sense for the current stage in the process. The entire<br />

scenario is termed a workflow, <strong>and</strong> each of the actionable elements in it (entering the<br />

purchase order, building the order, etc.) is termed an activity.<br />

A workflow isn’t always linear. In fact, it is rarely linear. In the preceding scenario, the<br />

workflow could have gone in different directions based on different scenarios. For example,<br />

if the company has enough stock of whatever was ordered, the next step is to go to<br />

shipping <strong>and</strong> billing. If it doesn’t, the next step is to order new product <strong>and</strong> wait for the<br />

order to be fulfilled before it can go to shipping <strong>and</strong> billing. In this case, it is likely that a<br />

customer service workflow, informing the customer of the delay, would also kick in. This<br />

is what is called branching in workflow terminology.<br />

There are a number of different types of possible workflows. The preceding example<br />

is what is known as a sequential workflow, where the item flows from a known beginning<br />

point (receipt of the order) to a known endpoint (shipping, billing, <strong>and</strong> collecting).<br />

209

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!