Take the 2-minute tour ×

I can't figure out where my program flow is going in my WF 4 application. I have a Flow chart with a series of an AddToCollection and two code activities. When I step through, it hits the AddToCollection breakpoint and then just continues, skipping my code activities as if they weren't even there. I have no idea where to look because I am very new to WF 4.

Here is a XAML snippet if it helps:

<AddToCollection x:TypeArguments="x:String" Collection="[EmailList]" 
                 Item="abc@blah.com" />
    <FlowStep x:Name="__ReferenceID0">
      <local:CompileEmailBody EmailBody="{x:Null}" EmailList="[EmailList]"
                              Products="[Products]" SwProduct="[SwProduct]" 
                              Type="Request" />
        <FlowStep x:Name="__ReferenceID1">
          <local:SendEmail Message="{x:Null}" Body="[EmailBody]" 
                           EmailList="[EmailList]" />

Anything helps, I have no idea where to start! Cheers

UPDATE This is how I run the workflow from my controller:

        inputs.Add("ProductLines", plArray);
        inputs.Add("SwProduct", prodString);
        var wfApp = new WorkflowApplication(new VersionedCompositionWorkflow(), inputs);
        wfApp.Extensions.Add(new TraceTrackingParticipant());

Answer It turns out that I had not initialized the List that the collection was mapping to. For some reason I didn't get any errors with WorkflowApplication but I did with WorkflowInvoker I will give a right answer to anyone who can tell me why this could have happened.


share|improve this question
If your host is WorkflowServiceHost then enable trace and tracking. And if using WorkflowApplication then enable tracking. Analyze trace or tracking table data then you can identify the issue behind this behavior. –  Vivek Jul 10 '12 at 5:31
@Vivek you might want to read this question on Meta. Also, where are the code activities? It might be easier to snap a pic of the relevant part of the workflow in the designer and add it to the question... –  Will Jul 10 '12 at 12:45
@Ron thank you for the article, its very informative, however i tried using the TraceTrackingParticipant as it says, but the output doesn't show anything. –  jryancanty Jul 10 '12 at 16:48
@Will I actually replaced my CodeActivities with a simple Assign to see and it still exited after AddToCollection. I have updated my question to show what I have done. –  jryancanty Jul 10 '12 at 16:48

Your Answer



Browse other questions tagged or ask your own question.