<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>wf Discussions Rss Feed</title><link>http://wf.codeplex.com/Thread/List.aspx</link><description>wf Discussions Rss Description</description><item><title>New Post: Gotta Compile the .XAMLX file before it will work right with CSharpExpressions</title><link>http://wf.codeplex.com/discussions/444990</link><description>&lt;div style="line-height: normal;"&gt;Your workflow will fail if it includes C# statements&lt;br /&gt;
&lt;br /&gt;
From the UnitTesting Samples:&lt;br /&gt;
Microsoft.Activities.UnitTesting\C#\MathServiceLibrary.Tests\IncrementServiceTest.cs&lt;br /&gt;
&lt;br /&gt;
instead of creating the host like this: &lt;br /&gt;
&lt;br /&gt;
line: 83&lt;br /&gt;
 // Setup the host&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;        var host = WorkflowInvokerTest.Create(xamlInjector.GetWorkflowService().Body);
        host.Extensions.Add(stubExtension);
&lt;/code&gt;&lt;/pre&gt;

Use this:&lt;br /&gt;
//Compile the Expressions First:&lt;br /&gt;
// Setup the host &lt;br /&gt;
&lt;pre&gt;&lt;code&gt;        var activity = xamlInjector.GetWorkflowService().Body;
        WorkflowCompiler.CompileExpressions(activity);
        var host = WorkflowInvokerTest.Create(activity);
        host.Extensions.Add(stubExtension);
&lt;/code&gt;&lt;/pre&gt;

&lt;pre&gt;&lt;code&gt; public static class WorkflowCompiler
    {
        public static void CompileExpressions(Activity activity)
        {
            // activityName is the Namespace.Type of the activity that contains the
            // C# expressions.
            string activityName = activity.GetType().ToString();

            // Split activityName into Namespace and Type.Append _CompiledExpressionRoot to the type name
            // to represent the new type that represents the compiled expressions.
            // Take everything after the last . for the type name.
            string activityType = activityName.Split('.').Last() + &amp;quot;_CompiledExpressionRoot&amp;quot;;
            // Take everything before the last . for the namespace.
            string activityNamespace = string.Join(&amp;quot;.&amp;quot;, activityName.Split('.').Reverse().Skip(1).Reverse());

            // Create a TextExpressionCompilerSettings.
            TextExpressionCompilerSettings settings = new TextExpressionCompilerSettings
            {
                Activity = activity,
                Language = &amp;quot;C#&amp;quot;,
                ActivityName = activityType,
                ActivityNamespace = activityNamespace,
                RootNamespace = null,
                GenerateAsPartialClass = false,
                AlwaysGenerateSource = true,
                ForImplementation = false
            };

            // Compile the C# expression.
            TextExpressionCompilerResults results =
                new TextExpressionCompiler(settings).Compile();

            // Any compilation errors are contained in the CompilerMessages.
            if (results.HasErrors)
            {
                throw new Exception(&amp;quot;Compilation failed.&amp;quot;);
            }

            // Create an instance of the new compiled expression type.
            ICompiledExpressionRoot compiledExpressionRoot =
                Activator.CreateInstance(results.ResultType,
                    new object[] { activity }) as ICompiledExpressionRoot;

            // Attach it to the activity.
            CompiledExpressionInvoker.SetCompiledExpressionRoot(
                activity, compiledExpressionRoot);
        }

    }&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;</description><author>Zapbbx</author><pubDate>Sat, 25 May 2013 22:26:51 GMT</pubDate><guid isPermaLink="false">New Post: Gotta Compile the .XAMLX file before it will work right with CSharpExpressions 20130525102651P</guid></item><item><title>New Post: Statemachine and Data</title><link>http://wf.codeplex.com/discussions/438309</link><description>&lt;div style="line-height: normal;"&gt;I can answer my own question for posterity.&lt;br /&gt;
The WaitForNotificationBase Class has a Result, which is correctly written with my data.&lt;br /&gt;
And here comes the general part on how to bring data from one Activity to another:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;SourceActivity: write Data in Result (this is a normal OutArgument)&lt;/li&gt;
&lt;li&gt;In Destination create a variable (eg MyVariable) which has to have the same type as the OutArgument of Source&lt;/li&gt;
&lt;li&gt;
Assign: InArgument = MyVariable (this sounds pretty weird, but it really has to be this way)&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;
Look here for further info from Guru of Workflow: &lt;a href="http://blogs.msdn.com/b/rjacobs/archive/2011/05/25/passing-values-between-workflow-activities.aspx" rel="nofollow"&gt;http://blogs.msdn.com/b/rjacobs/archive/2011/05/25/passing-values-between-workflow-activities.aspx&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>heilmannseder</author><pubDate>Wed, 03 Apr 2013 12:38:15 GMT</pubDate><guid isPermaLink="false">New Post: Statemachine and Data 20130403123815P</guid></item><item><title>New Post: Statemachine and Data</title><link>http://wf.codeplex.com/discussions/438309</link><description>&lt;div style="line-height: normal;"&gt;Hello,&lt;br /&gt;
&lt;br /&gt;
I have a basic question to StateMachines in WF4.&lt;br /&gt;
How is it possible to pass data to the StateMachine?&lt;br /&gt;
This is from the WaitForNotificationExtension.cs from Rjacobs:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;protected void RaiseNotification(TNotification notification, TValue data)
        {
            // Ignore if the workflow instance is not set yet
            if (this.workflowInstanceProxy == null)
            {
                return;
            }

            // If a bookmark is pending for this notification resume it
            this.workflowInstanceProxy.BeginResumeBookmark(
                new Bookmark(notification.ToString()),
                data,
                (asr) =&amp;gt;
                {
                    // If the bookmark cannot be resumed, queue the event
                    if (this.workflowInstanceProxy.EndResumeBookmark(asr) != BookmarkResumptionResult.Success)
                    {
                        this.QueueNotification(notification, data);
                    }
                },
                null);
        }&lt;/code&gt;&lt;/pre&gt;

When I debug into this, I see that the &amp;quot;data&amp;quot; is sent, but I don't know how this &amp;quot;data&amp;quot; has to be.&lt;br /&gt;
I tried it with a Dictionary&amp;lt;string, object&amp;gt;, where my String is the InArgument of my CodeActivity. But this was alway null.&lt;br /&gt;
Now my question(s):&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Can I pass data in the StateMachine.Explicit Example from Ron Jacobs?&lt;/li&gt;
&lt;li&gt;In which Entity can I pass data? Transition, State oder CodeActivity?&lt;/li&gt;
&lt;li&gt;
How has this data to be built?&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;
Thanks in advance.&lt;br /&gt;
&lt;br /&gt;
Tobi&lt;br /&gt;
&lt;/div&gt;</description><author>heilmannseder</author><pubDate>Thu, 28 Mar 2013 12:25:11 GMT</pubDate><guid isPermaLink="false">New Post: Statemachine and Data 20130328122511P</guid></item><item><title>New Post: Tracking Records not appearing after Close with WorkflowServiceTestHost</title><link>http://wf.codeplex.com/discussions/402471</link><description>&lt;div style="line-height: normal;"&gt;I am trying to upgrade my inventory tracking system and I wonder can this tracking records method be integrated in my &lt;a href="http://www.barcodelib.com/net_barcode_reader/barcodes/upca.html" rel="nofollow"&gt;UPC-A&lt;/a&gt; barcode recording system. &lt;br /&gt;
&lt;/div&gt;</description><author>eddiecook</author><pubDate>Wed, 27 Mar 2013 02:32:49 GMT</pubDate><guid isPermaLink="false">New Post: Tracking Records not appearing after Close with WorkflowServiceTestHost 20130327023249A</guid></item><item><title>New Post: State Machine WF Service Instance crashes when I active tracing</title><link>http://wf.codeplex.com/discussions/396128</link><description>&lt;div style="line-height: normal;"&gt;I am also receiving a similar error:&lt;br /&gt;
&lt;br /&gt;
I have the settings in config&lt;br /&gt;
i.e. in the behavior extensions&lt;br /&gt;
&amp;lt;add name=&amp;quot;workflowServiceTrace&amp;quot; type=&amp;quot;Microsoft.Activities.Extensions.Diagnostics.WorkflowServiceTraceElement, Microsoft.Activities.Extensions&amp;quot; /&amp;gt;,&lt;br /&gt;
in the behaviors&lt;br /&gt;
&amp;lt;workflowServiceTrace /&amp;gt;&lt;br /&gt;
and in the system.diagnostics&lt;br /&gt;
&amp;lt;trace autoflush=&amp;quot;false&amp;quot; indentsize=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;listeners&amp;gt;
    &amp;lt;add name=&amp;quot;myListener&amp;quot; type=&amp;quot;System.Diagnostics.TextWriterTraceListener&amp;quot; initializeData=&amp;quot;TextWriterOutput.log&amp;quot; /&amp;gt;
    &amp;lt;remove name=&amp;quot;Default&amp;quot; /&amp;gt;
  &amp;lt;/listeners&amp;gt;
&amp;lt;/trace&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

I am using version 2.0.3.9 of the Microsoft.Activities.Extensions and just recently we have started to encounter the following message when using the service trace.&lt;br /&gt;
&lt;br /&gt;
{&amp;quot;An error occurred while calling tracking participants causing the instance to be aborted.  See the inner exception for more details.&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
{An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:&lt;br /&gt;
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.&lt;br /&gt;
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)&lt;br /&gt;
   at System.Activities.Hosting.WorkflowInstance.WorkflowInstanceControl.EndFlushTrackingRecords(IAsyncResult result)&lt;br /&gt;
   at System.ServiceModel.Activities.Dispatcher.WorkflowServiceInstance.OnEndFlushTrackingRecords(IAsyncResult result)&lt;br /&gt;
   at System.Activities.Runtime.WorkItem.OnTrackingComplete(IAsyncResult result)}&lt;br /&gt;
&lt;br /&gt;
This was working but just recently this started, almost like some kind of Windows update may have changed something.&lt;br /&gt;
We are using the .net framework v4.0.30319&lt;br /&gt;
&lt;/div&gt;</description><author>thxmike</author><pubDate>Fri, 22 Mar 2013 15:01:57 GMT</pubDate><guid isPermaLink="false">New Post: State Machine WF Service Instance crashes when I active tracing 20130322030157P</guid></item><item><title>New Post: State Machine WF Service Instance crashes when I active tracing</title><link>http://wf.codeplex.com/discussions/396128</link><description>&lt;div style="line-height: normal;"&gt;I am also receiving a similar error:&lt;br /&gt;
&lt;br /&gt;
I have the settings in config&lt;br /&gt;
i.e. in the behavior extensions&lt;br /&gt;
&amp;lt;add name=&amp;quot;workflowServiceTrace&amp;quot; type=&amp;quot;Microsoft.Activities.Extensions.Diagnostics.WorkflowServiceTraceElement, Microsoft.Activities.Extensions&amp;quot; /&amp;gt;,&lt;br /&gt;
in the behaviors&lt;br /&gt;
&amp;lt;workflowServiceTrace /&amp;gt;&lt;br /&gt;
and in the system.diagnostics&lt;br /&gt;
&amp;lt;trace autoflush=&amp;quot;false&amp;quot; indentsize=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;listeners&amp;gt;
    &amp;lt;add name=&amp;quot;myListener&amp;quot; type=&amp;quot;System.Diagnostics.TextWriterTraceListener&amp;quot; initializeData=&amp;quot;TextWriterOutput.log&amp;quot; /&amp;gt;
    &amp;lt;remove name=&amp;quot;Default&amp;quot; /&amp;gt;
  &amp;lt;/listeners&amp;gt;
&amp;lt;/trace&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

I am using version 2.0.3.9 of the Microsoft.Activities.Extensions and just recently we have started to encounter the following message when using the service trace.&lt;br /&gt;
&lt;br /&gt;
{&amp;quot;An error occurred while calling tracking participants causing the instance to be aborted.  See the inner exception for more details.&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
{An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:&lt;br /&gt;
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.&lt;br /&gt;
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)&lt;br /&gt;
   at System.Activities.Hosting.WorkflowInstance.WorkflowInstanceControl.EndFlushTrackingRecords(IAsyncResult result)&lt;br /&gt;
   at System.ServiceModel.Activities.Dispatcher.WorkflowServiceInstance.OnEndFlushTrackingRecords(IAsyncResult result)&lt;br /&gt;
   at System.Activities.Runtime.WorkItem.OnTrackingComplete(IAsyncResult result)}&lt;br /&gt;
&lt;br /&gt;
This was working but just recently this started, almost like some kind of Windows update may have changed something.&lt;br /&gt;
We are using the .net framework v4.0.30319&lt;br /&gt;
&lt;/div&gt;</description><author>thxmike</author><pubDate>Fri, 22 Mar 2013 13:27:08 GMT</pubDate><guid isPermaLink="false">New Post: State Machine WF Service Instance crashes when I active tracing 20130322012708P</guid></item><item><title>New Post: InvokeWorkflow limitation question</title><link>http://wf.codeplex.com/discussions/437506</link><description>&lt;div style="line-height: normal;"&gt;The comment at the top of the InvokeWorkflow class clearly states that it is subject to the rules of the WorkflowInvoker. One of these rules is no bookmarks.&lt;br /&gt;
&lt;br /&gt;
Would it be possible to rewrite or create a new InvokeWorkflow that would allow bookmarks? What would allow bookmarks and give me the ability to at runtime load a workflow and execute it?&lt;br /&gt;
&lt;/div&gt;</description><author>pmccoy</author><pubDate>Thu, 21 Mar 2013 14:22:32 GMT</pubDate><guid isPermaLink="false">New Post: InvokeWorkflow limitation question 20130321022232P</guid></item><item><title>New Post: CleanProject Shell Extension</title><link>http://wf.codeplex.com/discussions/334371</link><description>&lt;div style="line-height: normal;"&gt;I just wonder what is point of using a &lt;a href="http://www.barcodelib.com/net_barcode/main.html" rel="nofollow"&gt;barcode generator&lt;/a&gt; under this situation？&lt;br /&gt;
&lt;/div&gt;</description><author>troyswift</author><pubDate>Fri, 08 Mar 2013 01:42:07 GMT</pubDate><guid isPermaLink="false">New Post: CleanProject Shell Extension 20130308014207A</guid></item><item><title>New Post: WWF 4.5 C# Help with invoking a child workflow via LoadAndInvokeWorkflow</title><link>http://wf.codeplex.com/discussions/404638</link><description>&lt;div style="line-height: normal;"&gt;Hello, check this &lt;a href="http://msdn.microsoft.com/en-us/library/29110be7-f4e3-407e-8dbe-78102eb21115#CompiledXaml" rel="nofollow"&gt;http://msdn.microsoft.com/en-us/library/29110be7-f4e3-407e-8dbe-78102eb21115#CompiledXaml&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>vhbfnet</author><pubDate>Tue, 26 Feb 2013 10:21:29 GMT</pubDate><guid isPermaLink="false">New Post: WWF 4.5 C# Help with invoking a child workflow via LoadAndInvokeWorkflow 20130226102129A</guid></item><item><title>New Post: XamlInjector "decompiles" the activity</title><link>http://wf.codeplex.com/discussions/434047</link><description>&lt;div style="line-height: normal;"&gt;It looks like if you use VB expressions this is not an issue. Apparently XamlInjector doesn't support C# expressions.&lt;br /&gt;
&lt;/div&gt;</description><author>lmisiuda</author><pubDate>Sat, 23 Feb 2013 01:00:31 GMT</pubDate><guid isPermaLink="false">New Post: XamlInjector "decompiles" the activity 20130223010031A</guid></item><item><title>New Post: XamlInjector "decompiles" the activity</title><link>http://wf.codeplex.com/discussions/434047</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
I want to test the workflow and want to replace activiteis with XamlInjector.&lt;br /&gt;
It looks like that XamlInjector doesn't support expressions.&lt;br /&gt;
I've created simple activty that just calls WriteLine and Text is expression string.Format(...).&lt;br /&gt;
If I compile it and run as in example below I don't see problems.&lt;br /&gt;
&lt;br /&gt;
How can I make it work with XamlInjector? Is there another solution to this problem?&lt;br /&gt;
&lt;br /&gt;
That works:&lt;br /&gt;
&lt;br /&gt;
Activity toRun = new MyActivity();&lt;br /&gt;
var testHost =  new WorkflowInvokerTest(toRun);&lt;br /&gt;
var result = testHost.TestActivity();&lt;br /&gt;
&lt;br /&gt;
That doesn't:&lt;br /&gt;
&lt;br /&gt;
var xamlInjector = new XamlInjector(&amp;quot;MyActivity.xaml&amp;quot;);&lt;br /&gt;
var testHost =  new WorkflowInvokerTest(xamlInjector.GetActivity());&lt;br /&gt;
var result = testHost.TestActivity();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Best regards,&lt;br /&gt;
Lukasz&lt;br /&gt;
&lt;/div&gt;</description><author>lmisiuda</author><pubDate>Fri, 22 Feb 2013 00:23:31 GMT</pubDate><guid isPermaLink="false">New Post: XamlInjector "decompiles" the activity 20130222122331A</guid></item><item><title>New Post: Reading delay value from config file</title><link>http://wf.codeplex.com/discussions/283960</link><description>&lt;div style="line-height: normal;"&gt;I think your suggestion is feasible but I think it maybe be good to integrate it with  Excel&lt;br /&gt;
&lt;br /&gt;
&lt;a href="Excel" rel="nofollow"&gt;http://www.barcodelib.com/excel_barcode/main.html&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>blakeshiller</author><pubDate>Wed, 20 Feb 2013 04:05:26 GMT</pubDate><guid isPermaLink="false">New Post: Reading delay value from config file 20130220040526A</guid></item><item><title>New Post: Is WWF a supported MS service?</title><link>http://wf.codeplex.com/discussions/415295</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;....cuz to judge by the last couple months here there must be some other place or no other place.&lt;/p&gt;
&lt;/div&gt;</description><author>justSteve</author><pubDate>Mon, 24 Dec 2012 03:09:51 GMT</pubDate><guid isPermaLink="false">New Post: Is WWF a supported MS service? 20121224030951A</guid></item><item><title>New Post: WWF 4.5 C# Help with invoking a child workflow via LoadAndInvokeWorkflow</title><link>http://wf.codeplex.com/discussions/404638</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;I would like to have a main file based Workflow invoke a file based child workflow.&lt;/p&gt;
&lt;p&gt;I have tried this and the main file works fine as soon as I call the child from the main using a LoadAndInvokeWorkflow activity I get the following error.&lt;/p&gt;
&lt;p&gt;&amp;quot;Expression Activity type 'CSharpReference`1' requires compilation in order to run. &amp;nbsp;Please ensure that the workflow has been compiled.&amp;quot;&lt;/p&gt;
&lt;p&gt;I know when invoking a workflow with C# via code you need to add the following:&lt;/p&gt;
&lt;p&gt;Activity service = ActivityXamlServices.Load(xamlxName,new ActivityXamlServicesSettings{
&lt;span style="color:#ff0000"&gt;CompileExpressions = true&lt;/span&gt; });&lt;/p&gt;
&lt;p&gt;But I would have expected that Microsoft.Activities.Extensions to have that included or at least have a setting somewhere.&lt;/p&gt;
&lt;p&gt;But I can't find any or get this to work.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;</description><author>mtod</author><pubDate>Mon, 26 Nov 2012 20:11:03 GMT</pubDate><guid isPermaLink="false">New Post: WWF 4.5 C# Help with invoking a child workflow via LoadAndInvokeWorkflow 20121126081103P</guid></item><item><title>New Post: Extensions doesn't show on Visual studio after installation</title><link>http://wf.codeplex.com/discussions/356263</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I had the same issue with VS 2012 when installing with Nuget or when downloading the DLL and reference them into my project. There is nothing new in the toolbar. I tried also with VS 2010 and I also had the same issue.&lt;/p&gt;
&lt;p&gt;I found a workaround: in the toolbox, right click and click on &amp;quot;Add Tab&amp;quot;, then enter the name that you want (i.e. &amp;quot;Microsoft.Activities.Extensions&amp;quot;), then just below this new tab, right click and click on &amp;quot;Choose Items...&amp;quot;, then in the tab System.Activities
 Components, click on browse and select the Microsoft.Activities.Extensions.dll, then if you look, the new activities contained in this dll should appear in the list and have been checked. Click Ok. Now the activities should appear just below the tab that you
 created.&lt;/p&gt;
&lt;/div&gt;</description><author>arnaudvh</author><pubDate>Fri, 23 Nov 2012 14:36:54 GMT</pubDate><guid isPermaLink="false">New Post: Extensions doesn't show on Visual studio after installation 20121123023654P</guid></item><item><title>New Post: VS2012, .NET 4.5 Project, Extensions Nuget Installation and no new activity in the Toolbar </title><link>http://wf.codeplex.com/discussions/396129</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I had the same issue with VS 2012 when installing with Nuget or when downloading the DLL and reference them into my project. There is nothing new in the toolbar. I tried also with VS 2010 and I also had the same issue.&lt;/p&gt;
&lt;p&gt;I found a workaround: in the toolbox, right click and click on &amp;quot;Add Tab&amp;quot;, then enter the name that you want (i.e. &amp;quot;Microsoft.Activities.Extensions&amp;quot;), then just below this new tab, right click and click on&amp;nbsp;&amp;quot;Choose Items...&amp;quot;, then in the tab System.Activities
 Components, click on browse and select the Microsoft.Activities.Extensions.dll, then if you look, the new activities contained in this dll should appear in the list and have been checked. Click Ok. Now the activities should appear just below the tab that you
 created.&lt;/p&gt;
&lt;/div&gt;</description><author>arnaudvh</author><pubDate>Fri, 23 Nov 2012 14:36:05 GMT</pubDate><guid isPermaLink="false">New Post: VS2012, .NET 4.5 Project, Extensions Nuget Installation and no new activity in the Toolbar  20121123023605P</guid></item><item><title>New Post: Tracking Records not appearing after Close with WorkflowServiceTestHost</title><link>http://wf.codeplex.com/discussions/402471</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;I'm experiencing unexpected results with WorkflowServiceTestHost.&lt;/p&gt;
&lt;p&gt;Stripped-down example code (Insert Code Snippet chokes on this):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var service = new WorkflowService { Body = rootActivity };&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var endpointAddress = new EndpointAddress(new Uri(EndpointUri));&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; using (var host = WorkflowServiceTestHost.Open(service, endpointAddress))&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var client =&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ChannelFactory&amp;lt;IParameterizedWorkflow&amp;gt;.CreateChannel(&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new BasicHttpBinding(), endpointAddress);&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const string StringArgumentValue = &amp;quot;cow&amp;quot;;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const int IntArgumentValue = 42;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; client.CreateInstance(StringArgumentValue, IntArgumentValue);&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; host.Close();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; host.WaitForHostClosed();&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IDictionary&amp;lt;string, object&amp;gt; variables =&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; host.Tracking.Records&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .OfType&amp;lt;ActivityStateRecord&amp;gt;()&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Single(x =&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x.Activity.Name == RootActivityName&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;&amp;amp; x.State == &amp;quot;Closed&amp;quot;)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Variables;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assert.That(variables[StringVariableName], Is.EqualTo(StringArgumentValue));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assert.That(variables[IntVariableName], Is.EqualTo(IntArgumentValue));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The goal is to test my custom CreateInstance activity, which is embedded in a Sequence. CreateInstance is a NativeActivity that contains a Receive and a SendReply.&lt;/p&gt;
&lt;p&gt;This test passes if run in isolation. However, if it's run with other tests, it fails on the LINQ statement (&amp;quot;Sequence contains no matching element&amp;quot;). I can't see where it's sharing any state.&lt;/p&gt;
&lt;p&gt;.NET 4.0, Microsoft.Activities.UnitTesting v2.0.6.9 (it failed on a much older version as well).&lt;/p&gt;
&lt;p&gt;What do I need to do to get this test to pass reliably?&lt;/p&gt;
&lt;/div&gt;</description><author>bsorensen</author><pubDate>Thu, 08 Nov 2012 22:41:10 GMT</pubDate><guid isPermaLink="false">New Post: Tracking Records not appearing after Close with WorkflowServiceTestHost 20121108104110P</guid></item><item><title>New Post: VS2012, .NET 4.5 Project, Extensions Nuget Installation and no new activity in the Toolbar </title><link>http://wf.codeplex.com/discussions/396129</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When I install&amp;nbsp;Microsoft.Activities.Extensions with Nuget, I don't see any new activity in the toolbar.&lt;/p&gt;
&lt;p&gt;Any Idea why?&lt;/p&gt;
&lt;/div&gt;</description><author>BulentCOSKUN</author><pubDate>Wed, 19 Sep 2012 19:05:26 GMT</pubDate><guid isPermaLink="false">New Post: VS2012, .NET 4.5 Project, Extensions Nuget Installation and no new activity in the Toolbar  20120919070526P</guid></item><item><title>New Post: State Machine WF Service Instance crashes when I active tracing</title><link>http://wf.codeplex.com/discussions/396128</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;I have added Workflow Service Trace behavior in web.conf file and working state machine start generating exceptions when I test it with WCF client.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I can see trace output in VS OUTPUT &amp;nbsp;window but in the end it crashes with following message;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;WorkflowInstance Aborted [XXXXXX] Reason &amp;quot;An error occurred while calling tracking participants causing the instance to be aborted. &amp;nbsp;See the inner exception for more details. InnerException Message: The given key was not present in the dictionary.&amp;quot;&lt;/p&gt;
&lt;p&gt;I have added following line web.config&amp;nbsp;behavior extensions&amp;nbsp;and &amp;lt;workflowServiceTrace/&amp;gt; tag in to&amp;nbsp;service behaviors&amp;nbsp;section.&lt;/p&gt;
&lt;p&gt;&amp;lt;add name=&amp;quot;workflowServiceTrace&amp;quot; type=&amp;quot;Microsoft.Activities.Extensions.Diagnostics.WorkflowServiceTraceElement, Microsoft.Activities.Extensions&amp;quot;/&amp;gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any Idea?&lt;/p&gt;
&lt;/div&gt;</description><author>BulentCOSKUN</author><pubDate>Wed, 19 Sep 2012 18:52:30 GMT</pubDate><guid isPermaLink="false">New Post: State Machine WF Service Instance crashes when I active tracing 20120919065230P</guid></item><item><title>New Post: chm available for download, does not work</title><link>http://wf.codeplex.com/discussions/358408</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Have you tried to unblock the chm file?&lt;/p&gt;
&lt;p&gt;File -&amp;gt; Properties (from Windows Explorer) there is an unblock button.&lt;/p&gt;&lt;/div&gt;</description><author>Krimson</author><pubDate>Tue, 04 Sep 2012 13:48:30 GMT</pubDate><guid isPermaLink="false">New Post: chm available for download, does not work 20120904014830P</guid></item></channel></rss>