This post has been republished via RSS; it originally appeared at: Core Infrastructure and Security Blog articles.First published on MSDN on May 12, 2016
This post is based off of the technet article Walkthrough: Create a Logging Custom Activity and Deploy it to the FIM Portal
Creating a Workflow Activity Library and Activity in Visual Studio
The following procedure shows how to create a new workflow activity library in Visual Studio 2008. This library can contain one or more custom activities.
To create a new workflow activity library and activity file
Start Visual Studio - 2012 or greater
Create a new Workflow Activity Library. This example uses Visual C#, but you can also use Visual Basic.
On the File menu, point to New , and then click Project .
Under the Visual C# project types, select W orkflow . In the Templates pane, select Workflow Activity Library . (Be sure and change the .NET Framework to 3.5)
Select Workflow on the left under templates
Clear the Create directory for solution check box.
Name the library LoggingActivitiesLibrary , and then click OK .
The following illustration shows the New Project dialog box after you make these selections.
Add references to the FIM assemblies:
If Solution Explorer is not open, on the View menu, click Solution Explorer .
In Solution Explorer , right-click the References folder, and then click Add Reference .
In the Add Reference dialog box,
click the Browse tab, and browse to folder that contains the
Note: The default installation location for this assembly is C:\Program Files\Microsoft Forefront Identity Manager\2010\Service.
Select the Microsoft.ResourceManagement.dll assembly, and then click OK .
Set the application properties:
In Solution Explorer, right-click the Properties folder, and then click Open. This action opens a project properties file in the workspace that has the same name as your project. In this example, the file is named LoggingActivitiesLibrary.
Click the Application tab.
In Assembly name, type LoggingActivitesLibrary.
In Default namespace, type FIM.CustomWorkflowActivitiesLibrary.Activities.
In Target Framework, select .Net Framework 3.5 if its not already selected
Click on Save
Close the LoggingActivitiesLibrary file.
Create a new activity called RequestLoggingActivity:
In Solution Explorer, right-click LoggingActivitiesLibrary, click Add, and then click Activity.
Name the new activity RequestLoggingActivity.cs.
Lets take a look at the Solution Explorer an Examine what we have so far
Two new files appear in Solution Explorer: RequestLoggingActivity.cs and RequestLoggingActivity.Designer.cs.
In Solution Explorer, right-click Activity1.cs, and then click Delete.
To save the project, on the File menu, click Save All.
To build the project, on the Build menu, click Solution.
Lets take a look at yourj
You now have a Visual Studio project that contains references to FIM assemblies. It also contains two files that you will use to define the new activity: RequestLoggingActivity.cs and RequestLoggingActivity.Designer.cs.
Next, you add FIM out-of-box activities to the Toolbox so that you can specify the sequence of activities that define the custom activity.
Continue to Creating a Creating a Workflow Activity Library and Activity Part 2