Creating a Simple Hello Workflow Application
We will create a very simple workflow that will be the equivalent to this code:
C#
private static void
SayHello()
{
Console.WriteLine("Hello Workflow 4");
}
Visual Basic
Private Shared Sub
SayHello()
Console.WriteLine("Hello Workflow 4")
End Sub
- Start Microsoft Visual Studio 2010 from Start | All Programs | Microsoft Visual Studio 2010.
- Create
a new project in Visual Studio 2010
of type Workflow Console Application
(under the Workflow project type) in
either the Visual C# or Visual Basic projects Templates list. Ensure
.NET Framework 4 is selected as the target runtime, and name it HelloWorkflow.
Name the solution Begin, set the desired
location, and click OK.Creating a new Workflow Console Application (C#)
- Since
your business process is a 1 step process, you can simply add a WriteLine activity to implement the
process. From the Toolbox, drag a WriteLine activity and drop it on the
design surface.Adding a WriteLine activityNote: If the Toolbox window is not visible, select Toolbox from the View menu.
- Set
the WriteLine Text property to "Hello
Workflow 4".Setting the Text propertyNote: The WriteLine activity is a simple activity that will display a message on the console. The text property is an Expression which could be the result of calling a function or evaluating the property of an object. In this case, the expression is a literal string so you must quote the string.
- Press
CTRL+F5 to build and run the workflow without debugging. The application
should run in a console window and print the message “Hello Workflow 4”.The completed HelloWorkflow application
Creating a new Workflow Console Application (Visual Basic)
|
Nice Thanks For sharing
ReplyDeleteUrmm...Nice...It Was So Helpful!
ReplyDelete