Wednesday, March 3, 2010

Windows Workflow Foundation

Windows Workflow Foundation
Workflow is one of the new core capabilities (along with WPF aka Avalon and WCF aka Indigo) being added in the .NET Framework 3.0 release later this year. It provides an in-process workflow engine to process rules, a designer for VS 2005 to enable both developers and non-developers to define custom workflow processes graphically, and a new Workflow namespace to integrate these within code

ASP.NET and Workflows

A workflow built on Windows Workflow Foundation is a component that requires an ad hoc runtime environment to function. The workflow runtime environment is represented by the Workflow Runtime class. To host a workflow library, you create and configure an instance of the Workflow Runtime class to operate on a particular workflow type. For performance reasons, you normally create the runtime environment only once in the application lifetime and make it serves all incoming requests. In a Windows Forms application, you initialize the workflow runtime in the form's constructor and destroy it with the form when the application shuts down. So how does this work if you're using ASP.NET?
Once you have a workflow component up and running, calling it from within a Web app or Windows Forms shouldn't be an issue. As far as Windows Workflow Foundation-based workflows are concerned, ASP.NET developers have only a few small issues to face that are mostly related to the nature of Web applications.
Just like in Windows Forms, with ASP.NET you need to have just one instance of the workflow runtime created when the application starts. Unlike Windows Forms applications, though, a Web application works by accepting and processing requests. Requests are treated individually and don't know anything about each other. That leads to issues related to workflow persistence and threading.

WF (Windows Workflow Foundation) Features:-

· WF (Windows Workflow Foundation) supports sequential or state machine workflows. Sequential workflows usually co-ordinate activities that have a well-defined order and particular business rules and decision-making logic controls the flow between activities. Sequential workflows can contain purely automated processing, or can wait for external input from humans or external system events. State machine workflows allow the workflow to respond to external events that trigger further processing and transitions to other states.

· Developers / programmers use the Workflow Designer mixed with their associated Visual Studio environment to organize activities into a workflow definition that meets business requirements. Business users can review the resulting workflow design to see the implementation and verify that it meets their requirements.

· With use of workflow, complex business rules can be decoupled from application code making them easily to create, change & maintain. The WF (Windows Workflow Foundation) designer offers a way to specify business rules separate from other workflow logic.

· Workflows (WF) can encapsulate details for a complex business process including decision-making logic and business rules that can impact flow of communication, error handling, and compensating activities.

· Developers can easily encapsulate common workflow logic for the business domain into custom activities that can be reused across workflows and hide the complexity of a particular subset of logically related activities. Higher level, domain specific activities can also become building blocks for business analysts to design workflow definitions.

· The state of a long running workflow can be managed and traced with built-in services WF (Windows Workflow Foundation) offers for persistence and tracking.

· Human workflow can be integrated such that different applications and users can act with a particular workflow illustrate at different stages of execution.

Regard
Prateek Bhatnagar

No comments:

Post a Comment