What Is an Activity Assembly-
An activity assembly is a compiled .NET assembly (.DLL
or .EXE
) that contains one or more workflow activities. These activities are reusable units of work that form the building blocks of a workflow application.
What’s Inside an Activity Assembly?
Typically, an activity assembly includes:
- Custom activity classes: These inherit from
System.Activities.Activity
(WF 4.x) orSystem.Workflow.ComponentModel.Activity
(WF 3.x). - Business logic for each activity (written in C#, VB.NET, etc.).
- Metadata for tooling and design-time support (optional).
- XAML files (in case of declarative workflows or activities).
Use Cases-
You would create an activity assembly when:
- You are building custom reusable workflow activities.
- You want to separate workflow logic into modular components.
- You’re sharing workflow components across multiple projects or teams.
- You want to create pluggable activity libraries for your workflows.
How It’s Used
- Compile the activity code into a
.DLL
. - Reference the
.DLL
in a workflow project. - Use the custom activity in a workflow, either in code or XAML.
Benefits of Activity Assemblies
- Reusability: Share custom logic across workflows.
- Encapsulation: Keep activity logic modular and clean.
- Maintainability: Easier to update, test, and manage.
- Design-time support: Show up in tools like Visual Studio Designer if properly attributed.