Workflow Activity Authoring Using the Activity Class
The most basic way to create an activity using Windows Workflow Foundation (WF) in .NET Framework 4.6.1 is to create a class that inherits from Activity that creates functionality by assembling custom activities or activities from the Built-In Activity Library. This topic demonstrates how to create an activity that writes two messages to the console.
To create a custom Activity using the activity designer
Open Visual Studio 2012.
Select File, New, Project. Select Workflow 4.0 under Visual C# in the Project Types window, and select the v2010 node. Select Activity Library in the Templates window. Name the new project HelloActivity.
Open the new activity. Drag a Sequence activity from the toolbox onto the designer surface.
Drag a WriteLine activity into the Sequence activity. Enter
"Hello World"
(with quotes) into the Text field.Drag a second WriteLine activity into the Sequence activity, below the first one. Enter
"Goodbye"
(with quotes) into the Text field.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for