views:

10

answers:

1

I have a windows workflow service 4.0 that calls a workflow located in another project (i.e. another assembly).

I have created a project reference in my workflow service project to the workflow in the other assembly.

I have set a breakpoint in the workflow service receive activity and this breakpoint is hit.

Next I step into the next activity which is an activity located in another project and the debugger does not work.

Also the other workflow is sending an email. It appears that the other workflow is not being called because I never receive an email from the workflow in the other project.

Any help is greatly appreciated.

This problem is very easy to reproduce in Visual Studio 2010.

1.) Create a new WCF Workflow Service Application project and save the solution.

2.) Add a new Activity Library to the solution.

3.) In the Activity Library, go to the toolbox and add a sequence activity. Add a code activity that writes to the event log. Compile the Activity Library and from the toolbox add the code activity the writes to the windows event log to the sequence activity.

4.) In the workflow service project, add a project reference to the Activity library project.

5.) In the workflow service project, after the ReceiveRequest activity and the Activity Library workflow activity.

6.) set a breakpoint in the workflowservice project ReceiveRequest activity and another breakpoint in the Activity Library code activity line that writes to the event log.

7.) Run the debugger and you will see that the Activity Library breakpoint is never hit and also if you run without the debugger, the activity library is never executed (you can check the windows event log to confirm that the activity library never executed).

Please advise on a resolution.

A: 

I have figured out the solution to the problem!

The problem is that you cannot just delete the SendResponse activity (to make it "One-Way" Fire and Forget) and add the ActivityLibrary activity located in another project after the ReceiveRequest Activity. You need to delete the ReceiveRequest activity and also delete the SendResponse activity and replace the ReceiveRequest activity with the Receive Activity to make it "One-Way".

Here is what I did to resolve the problem:

1.) I deleted ReceiveRequest and SendResponse activities.

2.) I added a Receive Activity and set the CanCreateInstance property to True.

3.) I added the Activity from the ActivityLibrary located in another project after the Receive Activity.

Good deal! It now works.

Leo Cono - http://www.PeopleFriends.com

Leo Cono