Using If/Else activity in Workflow Foundation
Introduction
In this post I will explain how to utilize the IF\Else activity and a declarative condition in the workflow to perform the conditional processing.
This workflow evaluates the order by taking the order value and if the order value < $1000 then it will approved by Manager other wise it requires vice president approval.
1. Create a new workflow project by selecting File->New->Project menu command visual studio displays the New Project dialogue window.
2. Select the Empty Workflow Project template from the dialogue box and say ok.
3. Add the new item to the empty workflow project and select the Sequential Workflow (with code separation) template from the above dialogue box.
4. Start the workflow by writing the following code in Main program.cs file.
In above code we have started the workflow runtime and loaded the workflow type that we are going to design in the next step.
Notice that we are also passing the OrderValue as the parameter to the workflow.
Related Posts:
4 commentsWindows Workflow Foundation Key Concepts with example
Introduction
This post discusses the key concepts of workflow foundation, authoring the sequential workflow using the visual studio 2008 designer for WF and debugging the workflows using visual studio 2008 designer.
You can Get the overview on windows workflow foundation before going to read this post.
1. Create the new workflow project by selecting the File->New->Project in
VS 2008 it displays the following dialogue box
select the Sequential Workflow Console Application template and say ok.
2. We now have a workflow project with workflow1.cs file in the solution. You delete this file and right click on the project and say Add->New Item from the context menu.
select the Sequential Workflow (with code separation) template from the above dialogue box.
Related Posts:
1 commentWindows Workflow Foundation Overview
Introduction
Windows Workflow Foundation is Framework for building the workflow enabled applications on windows. It consisting the workflow engine and designer. Workflow foundation supports both human and system workflow.
The Workflow Foundation can be used in the following scenarios
- Workflow within Line-of-business applications.
- User interface page flow
- Human workflow
- Workflow fro SOA applications
- Business rule driven workflow
Workflow foundation enables you to develop the applications with WCF and WPF technologies. Full support for VB.NET and C#, Debugging, a graphical designer for developing the workflow in code or markup.It also provides model and designer to build custom activities that encapsulate the workflow functionality for end users and can be reused across multiple projects.
Workflow Overview
A workflow is a set of activities which describes the process. It describes the short or long-running work.
Workflow Runtime
Every workflow instance is created and maintained by an in-process engine referred as the workflow runtime engine. There can be multiple workflow runtime engines in an application.
Workflow model can be executed inside any windows process including console applications, forms-based applications, Windows services, ASP.NET Web sites and web services. Because a workflow is hosted in process, workflow can easily communicate with its host application.
Activities Overview
Activities are elemental units in workflow. Activities are added to given flow path till it is completed then we say workflow instance is completed.
An activity can perform a single action, Example: writing a value to a database. It can be composite activity consist a set of activities. Activities have two types of behaviour design time and runtime.
WWF contains a library of standard activities and provides the mechanism for creating our own activity. This enables the extensibility and reusability between workflows.
Conclusion
This post explained the basic overview of workflow foundation and where can be it deployed. The coming posts discuss more in detail about the workflow foundation.
Related Posts:
3 comments
![Recommend [kalyanms1]](http://s3.amazonaws.com/arkayne-media/img/badge/logo-recommend-badge-medium.png)