Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C#
- Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C#
- K. Scott Allen
- 495字
- 2021-04-29 18:55:04
Chapter 1. Hello, Workflow
…thoughts arrive like butterflies — Gossard / Vedder
Windows Workflow might be the most significant piece of middleware to arrive on the Windows platform since COM+ and the Distributed Transaction Coordinator. The difference is, not every application needs a distributed transaction, but nearly every application does have a workflow encoded inside. To understand the types of problems Windows Workflow is designed to solve, let's talk about workflow in a generic sense.
What is a workflow? A simple definition would say a workflow is the series of steps, decisions, and rules needed to complete a specific task. Think of the workflow that takes place when you order food at the local pizza shop. You tell the cashier the type of pizza you want. The cashier passes this information to the cook, who gathers ingredients and puts a pizza in the oven. The cook hands a finished pizza to the cashier, who collects payment and completes the workflow by handing over your pizza. The work flows, to the cashier, then to the cook, and then back again.
During each of these steps, all parties are also evaluating rules and making decisions. Before accepting the order, the cook has to compare the order against the ingredients in stock. The cashier has to validate and process any coupons you might present, and notify the manager if you pay with a counterfeit looking bill.
Not every workflow has to involve humans (which is good, because humans complicate even the simplest process). A workflow can take place between two distributed software applications. For example, two content management applications might need to follow a specific set of steps and rules when synchronizing content in the middle of the night.
Most workflows are stateful, and often run for a relatively long time. Hopefully, your pizza will be ready within 30 minutes. During those 30 minutes, state information about your order, like the toppings you selected, has to be available. A different workflow happens when the pizza shop orders cheese. The cheese supplier might not deliver the mozzarella for 30 hours, and the pizza shop may not pay the cheese supplier for 30 days. During those 30 days, something needs to maintain the state of the workflow for a purchase.
A workflow may spend a large portion of its lifetime waiting for events to happen in the world around it. A workflow may be idle when waiting for a delivery, or waiting for a payment, or waiting for a pizza to finish in the oven. During these wait times, the workflow is idle and no resources are required by the workflow.
A workflow, then, is a series of steps to finish a task. A workflow is often long running and stateful, and often needs to wait on events and interact with humans. You can see workflows everywhere you look in the world. As software developers, we often have to codify the workflows around us into software applications.
- Photoshop CC 2018實用教程
- 數碼攝影后期高手之路(第2版)
- Pro/E Wildfire 5.0中文版入門、精通與實戰
- 好的PPT會說話:如何打造完美幻燈片
- Cinema 4D 2024+AI工具詳解與實戰(視頻微課·全彩版)
- Puppet 2.7 Cookbook
- 有趣的Flutter:從0到1構建跨平臺App
- Photoshop CS6從入門到精通
- 中文版Photoshop 2022基礎教程
- Photoshop CC完全自學教程:從入門到實踐(全新版)
- Power Query For Excel:讓工作化繁為簡
- 中文版AutoCAD 2022從入門到精通
- 用Studio One輕松制作你的短視頻音樂
- AI繪畫精講:Stable Diffusion從入門到精通
- 剪映專業版:PC端短視頻制作(全彩慕課版)