《WF in 24 Hours》读书笔记 - Hour 1 - Understanding Windows Workflow Foundation

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,布布扣,bubuko.com

《WF in 24 Hours》读书笔记 - Hour 1 - Understanding Windows Workflow
Foundation

时间: 2024-10-13 06:31:46

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

《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 Around Windows Workflow Foundation 1.3 Hour 3 - Learning Basic Hosting 1.4 Hour 4 - Learning Host-Workflow Data Exchange 1.5 Hour 5 - Creating an Esca

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,因此indefatigable指unable to be fatigued.名词是indefatigability (n.不疲劳,不屈不挠). 2.how simple can one be? ingenuous([in'd?enju?s] adj. 坦白的, 正直的, 天真的)是一个褒义词,尽管它有同义词n

《高可用MySQL》读书笔记1 – Windows环境下压缩版MySQL安装

近日在读O'REILIY系列的<高可用MySQL>, 自然少不了主从(Master-Slave)配置和横向扩展相关的内容.Master-Slave这东西吧,在许多公司都是标配,开发中基本天天都用,遇到的问题自然也不少(如主从不同步,Master宕机),但操作权限非常有限.有些东西,只有自己看了.做了,才能真正知道原理是什么,也才能更好的去把握. 本文是高可用MySQL的第一篇读书笔记,主要记录Windows环境下压缩版MySQL(基于安装版的傻瓜式安装过程这里不再提及)的安装过程. 1. 从官

《WF in 24 Hours》读书笔记 - Hour 2(1) - 第一个Workflow程序

创建第一个Workflow项目 1. 创建Workflow项目 – 选择Workflow Console Application 2. 添加CodeActivity 3. 打开CodeActivity,添加一行代码到Execute方法中 1 public sealed class CodeActivity1 : CodeActivity 2 { 3 // Define an activity input argument of type string 4 public InArgument<st

OCP读书笔记(24) - 题库(ExamD)

301.Which command is used to configure RMAN to perform a compressed backup for every backupexecuted?A. BACKUP AS COMPRESSED BACKUPSET DATABASEB. BACKUP AS COMPRESSED COPY OF DATABASEC. CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSETD.

《Effective C++》读书笔记汇总

我之前边读<Effective C++>边写下每个条款的读书笔记,这一版是C++11之前的版本.这里我将每个条款令我印象深刻的点小结一下. 1.C++包括:Plain C(面向过程).OOP(面向对象).模板(泛型和模板元编程).STL(C++标准库). 2.用inline.enum.const代替#define.#define定义的宏,一旦复杂起来,高手都很难掌控.不要带入C的习惯. 3.灵活使用const前缀.不需要进行改变的数据加上const前缀.指针的const前缀有两种形式,cons

《30天自制操作系统》读书笔记(2)hello, world

让系统跑起来 要写一个操作系统,我们首先要有一个储存系统的介质,原版书似乎是06年出版的,可惜那时候没有电脑,没想到作者用的还是软盘,现在的电脑谁有软驱?不得已我使用一张128M的SD卡来代替,而事实上你用的是U盘还是软盘对我们的操作系统没有影响,缺点是你的U盘刷入系统后容量只能是1440 MB,即当年流行的3.5英寸软盘的大小,当然不用担心,再格式化一次(用DiskGeniu),就可以恢复. 我做事情的话,总是怕自己的努力的结果白费了,害怕辛辛苦苦看完这本书但是发现做出来的东西现在根本没法用,

Javascript读书笔记:函数定义和函数调用

定义函数 使用function关键字来定义函数,分为两种形式: 声明式函数定义: function add(m,n) { alert(m+n); } 这种方式等同于构造一个Function类的实例的方式: var add = new Function("m", "n", "alert(m+n);"); Function类构造方法的最后一个参数为函数体:"alert(m+n);",前面的都是函数的形参,参数必须是字符串形式的:&

【转】《windows核心编程》读书笔记

这篇笔记是我在读<Windows核心编程>第5版时做的记录和总结(部分章节是第4版的书),没有摘抄原句,包含了很多我个人的思考和对实现的推断,因此不少条款和Windows实际机制可能有出入,但应该是合理的.开头几章由于我追求简洁,往往是很多单独的字句,后面的内容更为连贯. 海量细节. 第1章    错误处理 1.         GetLastError返回的是最后的错误码,即更早的错误码可能被覆盖. 2.         GetLastError可能用于描述成功的原因(CreatEvent)