• Event-Driven Activities

            <p>
            WF includes a group of activites that work together to provide event handling within workflow. Some of these activites wait for an external event(eg HandleExternalEventActivity), while others trigger and handle an event internally( DelayActivity) In both case, the activites implment the IEventActivity interface, which is a requirement for any activity that handles an event. Other activity are composites that act as containers for these event handler activities. EventDrivenActivity is similar to SequenceActivity in that it contains a set of child activites that are executed in sequence. However, EventDrivenActivity requires that first activity implment IEventActivity. When this first child executes, it immediately begins waiting for its event. Execution of the entire EventDrivenActivity is suspended until the event is received or the activity is canceled.
            </p>
            <p>
            Other actvities , such as ListenActivity as as containers for multiple instance of EventDrivenActivity. Each EventDrivenActivity represents a branch of execution that is triggered by a different event. The EventDrvienActivity is the only child activity permitted by the ListenActivity.
            </p>
    
  • Adding Workflow persistence service

            <p>
            This can be done programatically or declaratively. Below is section of code that do it programtically.
            </p>
    
  • Adding Local service in WF

            <p>
            There are two ways to add local service to workflow runtime, programatically or declaratively. Below is section of code that do it programatically.
            </p>
    
  • Local service(Data Exchange Service)

            <p>
            WF also supports another kind of service known as a local service (sometimes called a data exchange service). This is a service that you design and implement yourself. A local service can serve just about any purpose, but one general use is to facilitate communications between workflow instances and the host application. In contrast with this, core workflow services each have a purpose (e.g., persistence, tracking) that has been defined by Microsoft. You can develop alternate implementations for each core service, but that doesn’t change their defined purpose.
            </p>
            <p>
            A local service can be created via code or from entries in an application configuration file. There are three different ways to use a local service.
    
  • ConditionalAcitivityGroup

            <p>
            This Activity is like the combination of ParallelActivity and WhileActivity. The parent is ParallelActivity and the child is WhileActivity.
            </p>