WF in Hours reading notes-Hour 1-understanding Windows Workflow Foundation

Source: Internet
Author: User

1.1Hour 1-understanding Windows Workflow Foundation1.1.1What workflow are in general
    • A workflow is logic-consisting of one, or more steps, that's 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 so may occur over a period Of time, it must track the state of the overall process. Here is 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.2What Windows Workflow Foundation (WF) is1.1.3The main components of WF One-by-one
    • Standard Modeling Activities Activities is 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-activities. It calls these activities the Base Activity Library (BAL). The activities is 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 Arbitr ary code to is 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's a block where activities may 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 is each governed by a condition. The first branch to return Trueis executed; No other branches is executed.
    1. Listen:allows, branches, and more are added to is, each of the wait for a external event.
    2. Parallel:executes or more branches concurrently. Theparallel activity would wait

For all branches to complete before completing.

    1. Replicator:can process A number of elements specified at runtime and can doing 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 is 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's better to use a custom activity.
    1. Multiple Workflow Styles
      1. Conditionedactivitygroup:can is placed on both sequential and state machine workflows.
    1. Sequential Workflows:are recommended for deterministic processes that has 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 was an inverse sequential workflow. The events is on top and the sequential logic embedded if 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, the executes workflows on behalf of a host application. A windows Forms, ASP, Windows Service, or other Windows application starts the workflow engine running. The host application is and then responsible for managing, the life cycle of the workflow engine. The host application must remain active while workflows is running and communicate with the workflow engine. If the host application terminates while workflows is running, they would stop running. The host application needs to know the status of workflows, the workflow engine is running on its behalf. It achieves the subscribing to a number of events, the workflow engine makes available to it. Three of the most common is 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.4Installation instructions and Requirements

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.