Presentation is loading. Please wait.

Presentation is loading. Please wait.

Windows Workflow Foundation CON 230

Similar presentations


Presentation on theme: "Windows Workflow Foundation CON 230"— Presentation transcript:

1 Windows Workflow Foundation CON 230

2 课程内容安排 Windows Workflow Foundation 基础知识 Activity: 工作流的部件
演示: Building “Hello World” Activity: 工作流的部件 演示: Building custom activities Windows Workflow Foundation 多项创新 演示: State machine workflow application

3 Windows Workflow Foundation 基础知识
10/23/2019 2:30 PM Windows Workflow Foundation 基础知识 3 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

4 Windows Workflow Foundation
2019年10月23日2时30分 Windows Workflow Foundation 为微软产品及相关应用程序 提供通用的工作流设计框架与开发工具 统一的工作流技术 同时适用于微软产品及合作伙伴开发的.NET应用程序 同时适用于面向人的工作流与面向系统的工作流 为开发工作流应用提供通用的设计框架(Framework) 提供设计框架-而不是服务器 使工作流应用成为.NET开发的主流 有利于建立强大的合作伙伴生态系统 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

5 什么是工作流? A set of activities that coordinate
2019年10月23日2时30分 什么是工作流? A set of activities that coordinate people and / or software... 提交经理审批 检查库存 活动举例: …organized into a workflow. 类似流程图: 或是状态图 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

6 Windows Workflow Foundation
2019年10月23日2时30分 工作流场景 面向系统的工作流 面向人的工作流 参与者: 人、角色 流程特点: 灵活、不规则 数据:文档、非结构化数据 参与者: 应用程序、服务 流程特点: 可预测、规则 数据: 结构化数据 Business to Business Information Worker Line of Business Apps CRM ERP IT Management .NET Developer Windows Workflow Foundation © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

7 订单将在48小时内得到确认,并在30天之内发货。 多数供应商都已经确认了我们的订单,但是部分供应商却忘记了跟进。
2019年10月23日2时30分 对工作流的要求 现实世界 对工作流的要求 订单将在48小时内得到确认,并在30天之内发货。 长期运行并保持状态 多数供应商都已经确认了我们的订单,但是部分供应商却忘记了跟进。 灵活地控制流程 订单接下来应该怎么处理 透明度 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

8 Workflow and BizTalk Server
2019年10月23日2时30分 BizTalk Server Design Tools Accelerators Business Activity Monitor And Admin Tools Workflow Orchestration 工作流服务器 Messaging Transformation 将来的BizTalk Server将采用Windows Workflow Foundation 实现工作流 Adapters Visual Studio Designer WinFX Windows Workflow Foundation Windows Workflow Foundation © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

9 Windows Workflow Foundation
2019年10月23日2时30分 Windows Workflow Foundation Visual Designer 关键概念 工作流由一组活动组成 A Workflow Workflow在一个宿主应用程序中运行:任意应用程序或服务 An Activity 开发人员可以开发自定义的活动库 Custom Activity Library 组件 Windows Workflow Foundation 基本活动库:内置的基本的活动,并作为自定义活动的基础 Base Activity Library 运行时引擎: 运行工作流与状态管理 Runtime Engine 运行时服务: 宿主工作流与通讯 Runtime Services 可视化设计器:图形化的涉及器 Host Process © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

10 Workflow 基础 A workflow is a class
2019年10月23日2时30分 Workflow 基础 A workflow is a class Imports System.Workflow.Activities Public Class MyWorkflow Inherits SequentialWorkflow End Class A workflow class may be defined in markup <?Mapping XmlNamespace="Activities" ClrNamespace="System.Workflow.Activities" Assembly="System.Workflow.Activities" ?> <SequentialWorkflow x:Class="MyWorkflow" xmlns="Activities" xmlns:x="Definition"> </SequentialWorkflow> © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

11 工作流执行模式 标记语言 标记语言/代码 代码 应用程序 C#/VB C#/VB XAML XAML C#/VB XAML
2019年10月23日2时30分 工作流执行模式 标记语言 标记语言/代码 代码 应用程序 C#/VB C#/VB 应用程序生成代码 XAML XAML C#/VB XAML 工作流编译器 wfc.exe .NET 程序集 C#/VB 编译器 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

12 Building a Workflow

13 Activity: 工作流的部件 10/23/2019 2:30 PM 13
© 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

14 Activity 基础 Activity是工作流的部件 执行,重用与组合的基本单位 基本活动:工作流的步骤 组合活动:包含其他多个活动
2019年10月23日2时30分 Activity 基础 Activity是工作流的部件 执行,重用与组合的基本单位 基本活动:工作流的步骤 组合活动:包含其他多个活动 基本活动库:WWF提供的一组基本活动 合作伙伴能够开发自定义活动库 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

15 Activity 基础 Activities are classes: “属性”和“事件”由开发人员定义
2019年10月23日2时30分 Activity 基础 Activities are classes: “属性”和“事件”由开发人员定义 “方法” 由开发人员定义,但由工作流运行时调用 既可以包含在工作流应用程序之中,又可以单独部署为活动库 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

16 A SendMail Activity using System.Workflow.ComponentModel;
2019年10月23日2时30分 A SendMail Activity using System.Workflow.ComponentModel; public partial class SendMail : System.Workflow.ComponentModel.Activity { public SendMail() { InitializeComponent(); } protected override Status Execute(ActivityExecutionContext context) // my logic here to send the return Status.Closed; } public partial class SendMail public string subject; public string Subject { get { return subject; } set { this.subject = value; } } private void InitializeComponent() // designer generated this.ID = "SendMail"; © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

17 Building an Activity

18 Windows Workflow Foundation 多项创新
10/23/2019 2:30 PM Windows Workflow Foundation 多项创新 18 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

19 创新:可扩展的框架 基本的工作流的模型 自定义行为库 特定的工作流包 基本行为 多种用途 创建/扩展/组合基本行为 适用特定应用程序的活动库
2019年10月23日2时30分 创新:可扩展的框架 基本的工作流的模型 自定义行为库 特定的工作流包 Compliance Compose activities CRM Extend activity RosettaNet IT Mgmt Author new activity Out-of-Box Activities Base Workflow Model 工作流开发的流程: 活动-〉活动库-〉行业中的工作流包 基本行为 多种用途 创建/扩展/组合基本行为 适用特定应用程序的活动库 适用于行业的活动库 包含自主知识产权 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

20 创新: 灵活的工作流Hosting Hosting the Runtime Host 进程 可以将应用程序嵌入到工作流中也可
2019年10月23日2时30分 创新: 灵活的工作流Hosting Hosting the Runtime 可以将应用程序嵌入到工作流中也可 以在应用程序中运行工作流 Microsoft Hosts Windows SharePoint Services IIS/ASP host BizTalk future version MBS future version Others Host 进程 工作流 Runtime Engine 工作流必须放在应用程序中使用 Pluggable Services © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

21 创新:灵活的工作流设计 同时支持面向人和系统的工作流 顺序模式 基于规则的模式 状态机模式 流程驱动处理顺序 商务规则驱动处理顺序
2019年10月23日2时30分 创新:灵活的工作流设计 同时支持面向人和系统的工作流 顺序模式 基于规则的模式 状态机模式 Rule1 Step1 Step1 Step1 Event Data Step2 Step2 Rule2 Step2 Event Ditigal Olympic中采用顺序的工作流s 比较工作流的三种模式 顺序工作流 非常适合以下类型的操作,即该操作由依次执行直至最后一个活动完成的步骤的管线表示。但是,顺序工作流的执行并非完全是顺序的。它们仍然可以接收外部事件或者启动并行任务,在这种情况下,确切的执行顺序可能有所不同。 状态机工作流 由一组状态、转换和操作组成。首先,将一个状态表示为起始状态,然后,基于事件执行向另一个状态的转换。状态机工作流可以具有确定工作流结束的最终状态。 让我们假设您选择并创建了一个新的顺序工作流控制台应用程序项目。Visual Studio 2005 解决方案资源管理器将包含两个文件 — workflow1.cs 以及最初从视图中隐藏的 workflow1.designer.cs。这两个文件表示创建的工作流。Windows Workflow Foundation 工作流包含工作流模型文件和一个代码文件类。workflow1.cs 类是可在其中写入您自己的工作流业务逻辑的代码文件类。workflow1.designer.cs 类表示活动示意图的说明。该文件由 Visual Studio 2005 按照与 Microsoft Windows Forms 项目中的窗体非常类似的方式自动管理。当向工作流中添加活动时,Visual Studio 2005 会用以编程方式生成活动示意图的 Microsoft C# 代码更新设计器类。要继续使用 Windows 窗体的类比,那么工作流类似于窗体,而活动类似于控件。 流程驱动处理顺序 商务规则驱动处理顺序 事件/事务驱动处理过程 规则的 用于结构化工作流中 灵活的,数据驱动 用于结构化的工作流中 事件驱动 用于面向人的工作流中 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

22 创新:可视化的开发平台 工作流设计器 可视化调试 支持顺序模式与状态机模式 行为设计器 创建新行为 可从父行为继承 顺序模式设计器
2019年10月23日2时30分 创新:可视化的开发平台 工作流设计器 可视化调试 支持顺序模式与状态机模式 顺序模式设计器 状态机模式设计器 行为设计器 创建新行为 可从父行为继承 介绍工作流开发设计界面 行为设计器 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

23 A State Machine Workflow

24 2019年10月23日2时30分 © 2005 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

25 填反馈表

26


Download ppt "Windows Workflow Foundation CON 230"

Similar presentations


Ads by Google