Sujeet Varakhedi [MSFT]

Lets say I have a XOML only workflow with a code activity and I want to bind the execute handler that is present in a 3rd party dll. How I do it in XOML

Basically the idea is that workflows can be tweaked by admins and whenever they change any workflows all they can do is point to a third party dll that will have handler code.


Re: Windows Workflow Foundation Referencing Handlers and and properties in a third party assembly

Robert Wilczynski

Hi Sujeet,

I don't think this is directly supported. You can:

1) use the CallExternalMethod activity with an interface like:

public interface IExternalMethodCaller

void CallMethod(string assemblyQualifiedClassName, string methodName);

An implementation of this data exchange service would load an assembly and the class it contains as specified by
assemblyQualifiedClassName, instantiate that class (if it's not static) and call a method methodName. All that would have to be done using reflection.

2) Use the above approach but with a custom activity. You would probably want some kind of custom activity designer or wizard that would make the process of selecting the assembly and method more user friendly.

Let me know if that answers you question.

Best regards,
Robert Wilczynski.