Introduction: Activities are the units of work that are composed to produce workflow based functionality. In WF4 activities explicitly declare their inputs and outputs via arguments. The Standard Activity Library are introduced a number of low level activities. These low level activities include Assign, Add to Collection, Remove for Collection, Clear for Collection, Invoked Method.

// Run the workflow to the first idle point where a bookmark named "FirstName" exists host.TestWorkflowApplication.RunEpisode(firstBookmark, TestTimeout);// Resume the workflow with the first name firstBookmark, // The name of the bookmark to resume expectedFirst, // The value to resume the bookmark with lastBookmark, // The name of the next bookmark to wait for TestTimeout);// Resume the workflow with the last name and run until complete, abort or timeout host.TestWorkflowApplication.ResumeEpisodeBookmark(lastBookmark, expectedLast, TestTimeout);// Assert// The text lines property captures text written with the WriteLine activity into an array of strings// There are three WriteLines plus an extra empty element at the end Assert.AreEqual(4, host.TextLines.Length); Assert.AreEqual(expectedGreeting, host.TextLines[2],"The greeting was not correct"); }finally { host.Tracking.Trace(); } } }}