1.1 Hour 1 - Understanding Windows Workflow Foundation

 

1.1.1 What workflow is in general

  • A workflow is logic-consisting of one or more steps that are predicated by one or more conditions-that a system or person must perform to complete a function. Because the logic or process automated by a workflow generally consists of more than one step that may occur over a period of time, it must track the state of the overall process. Here are some examples of workflows: an order process, an expense report, and rescheduling a missed meeting.
  • In short, workflow consists of both logic and managing the process state.
  • benefits:
    1. Design-time transparency
    2. State management
    3. Runtime transparency

1.1.2 What Windows Workflow Foundation (WF) is

 

1.1.3 The main components of WF one-by-one

  • Standard Modeling Activities Activities are the unit of design and execution in WF. WF comes with a set of modeling constructs that it calls activities and a workflow designer. WF ships with approximately 30 activities. It calls these activities the Base Activity Library (BAL). The activities are largely segmented as follows: control flow activities, activities that facilitate data exchange between the workflow and the application running the workflow (a Windows Forms application, for example), one that permits arbitrary code to be written, and another group that supplies exception handling.
    1. control flow activities
      1. Sequence: a shell for other activities. It is equivalent to {}in C#. It is a block where activities may be added. A Sequenceactivity can hold a tree of activities.
  1. While: loops while the condition associated with it remains true.
  1. IfElse: holds one or more branches that are each governed by a condition. The first branch to return trueis executed; no other branches are executed.
  1. Listen: allows two or more branches to be added that each wait for an external event.
  2. Parallel: executes two or more branches concurrently. TheParallel activity will wait

for all branches to complete before completing.

  1. Replicator: can process a number of elements specified at runtime and can do so in serial or parallel. It is similar to the C# foreach statement with the additional capability to process in parallel as well as sequentially.
  1. EventHandlingScope: is similar to a Listenactivity but it allows the events to be received multiple times.
  1. data exchange activities
    1. CallExternalMethod: is used to send data from the workflow to the application running the workflow (the host).
    2. HandleExternalEvent: allows data to be sent from the

host to the workflow.

  1. WebServiceOutput and WebServiceInput: expose a workflow as a web service
  1. InvokeWebService: call a web service from a workflow
  2. Send: is used to connect to a WCF endpoint (or any compatible endpoint) from a workflow.
  3. Receive: is used to expose a workflow as a WCF Service.
  4. Code: points to a handler with standard .NET code. It can be used to add custom functionality to a workflow, although in many cases it is better to use a custom activity.
  1. Multiple Workflow Styles
    1. ConditionedActivityGroup: can be placed on both sequential and state machine workflows.
  1. sequential workflows: are recommended for deterministic processes that have a well-defined beginning and end.
  2. State machine workflows: are best suited for dynamic processes that iterate through states without a guaranteed order.
  1. Data-driven workflows: are best suited when the data determines the process execution order.
  2. In essence, a state machine workflow is an inverse sequential workflow. The events are on top and the sequential logic embedded when using a state machine workflow. In a sequential workflow it is the opposite.
  1. Hosting

    • WF is not a standalone application. WF is an engine that executes workflows on behalf of a host application. A Windows Forms, ASP.NET, Windows Service, or other Windows application starts the workflow engine running. The host application is then responsible for managing the life cycle of the workflow engine. The host application must remain active while workflows are running and communicate with the workflow engine. If the host application terminates while workflows are running, they will stop running. The host application needs to know the status of workflows the workflow engine is running on its behalf. It achieves this by subscribing to a number of events the workflow engine makes available to it. Three of the most common are completed,terminated, and idled.
  1. completed event: fired when a workflow completes processing successfully.
  2. terminated event: fired when the workflow completes unsuccessfully.
  3. idled event: the workflow is not complete but inactive.

1.1.4 Installation instructions and requirements

《WF in 24 Hours》读书笔记 - Hour 1 - Understanding Windows Workflow Foundation的更多相关文章

  1. 《Sams Teach Yourself Windows® Workflow Foundation in 24 Hours》读书笔记目录

    目录 1 Part I - The Basics 1.1 Hour 1 - Understanding Windows Workflow Foundation 1.2 Hour 2 - A Spin ...

  2. 2015.04.24,外语,读书笔记-《Word Power Made Easy》 12 “如何奉承朋友” SESSION 34

    1.no fatigue indefatigable([indi'fætigәb(ә)l] adj. 不知疲倦的)来自faigue,in-是反义词缀:后缀-able表示able to be,因此ind ...

  3. Windows环境下多线程编程原理与应用读书笔记(3)————Windows环境中的多线程实现(3)

    纤程 纤程(fiber): 相当于用户级别的线程或轻进程.纤程由Win32库函数支持,对核心是不可见的.纤程可以通过SwitchToFiber显示至另一合作纤程,以实现合作纤程之间的协同.线程是在Wi ...

  4. 读书笔记 Week6 2018-4-12

    Chap 24 重构 读书笔记 一.需求的变更 单纯就科目学习中的小项目来说,目标在一开始便被明确下来,即可定义一份严谨的列表来描述功能.故在原来的编程经历中,只要上交了程序便一切都没事儿了,也没有重 ...

  5. 《WF in 24 Hours》读书笔记 - Hour 3(1) - Workflow:添加宿主和事件监听

    1. 创建项目组,并添加一个Console Project和Activity Library,在Activity Library的项目中添加CodeActivity1和CodeActivity2,最终 ...

  6. 读书笔记--SQL必知必会18--视图

    读书笔记--SQL必知必会18--视图 18.1 视图 视图是虚拟的表,只包含使用时动态检索数据的查询. 也就是说作为视图,它不包含任何列和数据,包含的是一个查询. 18.1.1 为什么使用视图 重用 ...

  7. C#温故知新:《C#图解教程》读书笔记系列

    一.此书到底何方神圣? 本书是广受赞誉C#图解教程的最新版本.作者在本书中创造了一种全新的可视化叙述方式,以图文并茂的形式.朴实简洁的文字,并辅之以大量表格和代码示例,全面.直观地阐述了C#语言的各种 ...

  8. 《3D Math Primer for Graphics and Game Development》读书笔记1

    <3D Math Primer for Graphics and Game Development>读书笔记1 本文是<3D Math Primer for Graphics and ...

  9. 《如何在大学里脱颖而出(How to Win at College)》读书笔记

    <如何在大学里脱颖而出(How to Win at College)>读书笔记 图书简介 中文版: 英文版: 作者卡尔·纽波特(Cal Newport)于 2004 年6月以优等生荣誉学会 ...

随机推荐

  1. TCP/IP 3握手4挥手

    转:摘自<图解TCP/IP>P204 三次握手与四次挥手的状态转移图如下: 如图,由于第二次握手接收端发送SYN+ACK信号所以握手只用了三次,挥手由于接收端ACK和FIN分两次发的,所以 ...

  2. idea工程jdk设置问题

    经常用idea的朋友,会遇到一个问题,那就是你在单测的时候,会报一个jdk的错,截图如下: 我的解决方案是在pom.xml里配置一个节点: <properties> <maven.c ...

  3. 自定义样式 dialog

    自定义样式 dialog,可设置界面外点击屏幕外和返回键  是否消失 基本用法如下: CustomDialog.Builder customBuilder = new CustomDialog.Bui ...

  4. git学习(2)----入门

    一.git.github和gitlab的区别 Git诞生于2005年,大神Linus的作品,Github诞生于2008年,没有Git就没有GitHub,Github已成为全球最大的代(tong)码(x ...

  5. tf idf公式及sklearn中TfidfVectorizer

    在文本挖掘预处理之向量化与Hash Trick中我们讲到在文本挖掘的预处理中,向量化之后一般都伴随着TF-IDF的处理,那么什么是TF-IDF,为什么一般我们要加这一步预处理呢?这里就对TF-IDF的 ...

  6. 3D NAND闪存是个啥?让国内如此疯狂

    Repost: https://news.mydrivers.com/1/477/477251.htm 上个月底武汉新芯科技主导的国家级存储器产业基地正式动工,在大基金的支持下该项目将投资240亿美元 ...

  7. vue的路由配置

    路由,其实就是指向的意思,当我点击页面上的home按钮时,页面中就要显示home的内容,如果点击页面上的about 按钮,页面中就要显示about 的内容.Home按钮 => home 内容, ...

  8. [Algorithm] 10. Reverse Integer

    Description Given a 32-bit signed integer, reverse digits of an integer. Example Example 1: Input: 1 ...

  9. Mybatis中and和or的细节处理

    当一条SQL中既有条件查又有模糊查的时候,偶尔会遇到这样的and拼接问题.参考如下代码: <select id="listSelectAllBusiness"> sel ...

  10. python下载网络文件

    python下载网络文件 制作人:全心全意 下载图片 #!/usr/bin/python #-*- coding: utf-8 -*- import requests url = "http ...