Arslan Ahson
Arslan Ahson

Reputation: 55

Fetch list of parent workflows, where each parent workflow consume a particular child custom workflow activity

In MS dynamics CRM, Can we determine where our custom workflow activity is used. All I want to know is the list of parent workflows.

For example if our custom workflow name is 'abc'. Then is there any utility who give us all workflows which used 'abc' as child workflow custom activity.

Upvotes: 2

Views: 1281

Answers (2)

James Wood
James Wood

Reputation: 17562

  1. Go to Settings.
  2. Customize the System.
  3. Expand Plug-in Assemblies.
  4. Select your assembly in the left hand navigation menu.
  5. Select your custom workflow activity in the right hand list.
  6. Click Show Dependencies.

This is effectively the UI way to do same thing as offered by Henk via the SDK.

Upvotes: 4

Henk van Boeijen
Henk van Boeijen

Reputation: 7918

You can use a RetrieveDependentComponentsRequest to get the dependencies for solution components. With this request you pass the ID and the type code of the component you need the dependencies of.

var request = new RetrieveDependentComponentsRequest
{
    ComponentType = 91, // PluginAssembly
    ObjectId = assemblyId
};

In the response you get a list of all dependencies. In case of an assembly containing workflow activities this list will contain the workflows using these activities.

I guess this is as close as you can get using the SDK. When you need to know exactly which workflows are using a specific activity, you need to process the workflow XAML files that can be found in the solution zip.

Upvotes: 4

Related Questions