<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Kushal Shah - Workflows</title><link>http://blogs.msdn.com/kushals/default.aspx</link><description /><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>VisualWorkflowTracking aka WorkflowSimulator</title><link>http://blogs.msdn.com/kushals/archive/2009/12/22/visualworkflowtracking-aka-workflowsimulator.aspx</link><pubDate>Tue, 22 Dec 2009 21:17:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9940235</guid><dc:creator>kushals</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/kushals/comments/9940235.aspx</comments><wfw:commentRss>http://blogs.msdn.com/kushals/commentrss.aspx?PostID=9940235</wfw:commentRss><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In the Beta2 SDK,&amp;#160; we shipped a sample called WorkflowSimulator. Essentially, the sample is using the tracking APIs to have a visual understanding of the Workflow execution logic.&lt;/p&gt;  &lt;p&gt;Thus, as we hit “Run Workflow”, we get the debug kind of adornments on each activity that executed.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/VisualWorkflowTrackingWithStepService_B776/VisualWorkflowTracking_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="VisualWorkflowTracking" border="0" alt="VisualWorkflowTracking" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/VisualWorkflowTrackingWithStepService_B776/VisualWorkflowTracking_thumb.png" width="489" height="416" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Let’s actually dwell deeper and understand how we used the Designer and the Debugger APIs to achieve the same.&lt;/p&gt;  &lt;p&gt;To understand that, let’s take a step back and take a look at the debugging architecture:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/VisualWorkflowTrackingWithStepService_B776/DebuggingArchitecture_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="DebuggingArchitecture" border="0" alt="DebuggingArchitecture" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/VisualWorkflowTrackingWithStepService_B776/DebuggingArchitecture_thumb.png" width="501" height="377" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The most important piece in the slide above are:&lt;/p&gt;  &lt;p&gt;We have a 1:1 mapping between the activity objects on the designer surface and their corresponding line numbers&lt;/p&gt;  &lt;p&gt;Similarly, we can also have a 1:1 mapping between the Activity Object that is executed at the Runtime and the unique Instance Id corresponding to the activity at the Runtime.&lt;/p&gt;  &lt;p&gt;Thus from the above two bullets, we essentially have a mapping between the Activity Object &amp;lt;-&amp;gt; Xaml Line No &amp;lt;-&amp;gt; Activity Instance Id&lt;/p&gt;  &lt;p&gt;This is achieved by the following lines of code:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;//Mapping between the Object and Line No.&lt;/span&gt;
Dictionary&amp;lt;&lt;span class="kwrd"&gt;object&lt;/span&gt;, SourceLocation&amp;gt; wfElementToSourceLocationMap = 
                                            UpdateSourceLocationMappingInDebuggerService();
            
&lt;span class="rem"&gt;//Mapping between the Object and the Instance Id&lt;/span&gt;
Dictionary&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;, Activity&amp;gt; activityIdToWfElementMap = 
                            BuildActivityIdToWfElementMap(wfElementToSourceLocationMap);&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;With this mappings now in place, we essentially plug in our custom tracking participant and as the TrackingRecords are received, we map them back to the Activity Objects and thus to their specific Xaml Line Nos.&lt;/p&gt;

&lt;p&gt;Something like:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/VisualWorkflowTrackingWithStepService_B776/DataMappings_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="DataMappings" border="0" alt="DataMappings" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/VisualWorkflowTrackingWithStepService_B776/DataMappings_thumb.png" width="507" height="381" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;These Xaml Line No (also called as SourceLocation) are now provided to the DebuggerService – which then provides us with the adornment on the activity corresponding to which the tracking record was just received.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;//Show the Debug like adornment&lt;/span&gt;
&lt;span class="kwrd"&gt;this&lt;/span&gt;.WorkflowDesigner.DebugManagerView.CurrentLocation = srcLoc;&lt;/pre&gt;

&lt;pre class="csharpcode"&gt;where srcLoc is the XamlLineNo. mapping to the activity that was just executed.&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;You can find the sample by downloading the SDK &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=35ec8682-d5fd-4bc3-a51a-d8ad115a8792#tm"&gt;here&lt;/a&gt;. You want to browse to WF\Application\WorkflowSimulator sample.&lt;/p&gt;

&lt;p&gt;Finally, a note about the title.&lt;/p&gt;

&lt;p&gt;Though the sample itself is called as Workflow Simulator; we are not in any way simulating the Workflow runtime. The Workflow runtime is executing as is. It is about the applications that can leverage the functionality/APIs which we are trying to showcase through the sample. For example, developers can leverage it as a Workflow Replay sample by archiving all the tracking records in a database and then channeling it to this application one at a time so that you can specifically know how the runtime executed a specific Workflow sometime in the past.&lt;/p&gt;

&lt;p&gt;To showcase, this functionality in a primitive manner, I printed out all the tracking records on the right side of the application as they are emitted one at a time. If you double click on any specific record, it will take you(in terms of debug adornment) to the activity in the workflow to whom the tracking data corresponds to.&lt;/p&gt;

&lt;p&gt;Similarly, you can think about applications like a Workflow Simulator as well as Visual Workflow Monitoring for a better understanding of the Workflow behavior with various inputs to your domain specific Workflow.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Kushal.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9940235" width="1" height="1"&gt;</description></item><item><title>Differentiating between Cut-Copy-Paste/Undo-Redo/Drag-Drop/Move</title><link>http://blogs.msdn.com/kushals/archive/2009/12/04/differentiating-between-cut-copy-paste-undo-redo-drag-drop-move.aspx</link><pubDate>Fri, 04 Dec 2009 20:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9932753</guid><dc:creator>kushals</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/kushals/comments/9932753.aspx</comments><wfw:commentRss>http://blogs.msdn.com/kushals/commentrss.aspx?PostID=9932753</wfw:commentRss><description>&lt;P&gt;A couple of customers have asked this one, as they work with the Programming Model, how do I know if an activity has been drag-dropped vs Copy-Pasted vs an Undo-Redo happened.&lt;/P&gt;
&lt;P&gt;How do the customers use it? Well, for one of them they wanted to change the name of the activity if it is a Copy-Paste as against a Undo_Redo. For example. In case of a Copy-Pasted activity, the new name should be Sequence2. While for a Undo-Redo, the name should still be Sequence1.&lt;/P&gt;
&lt;P&gt;The bad news is there is no simple way to recognize the differenced. However, with certain bit of work, we can certainly differentiate between them.&lt;/P&gt;
&lt;P&gt;Undo-Redo: Through the UndoEngine.IsUndoRedoInProgress&lt;/P&gt;
&lt;P align=justify&gt;Copy-Paste vs a Move: This is the tricky one. There is no easy way to recognize this one. Hence we need to use the ModelService.ItemAdded and ModelService.ItemRemoved events. So in case a copy-paste happens we would only get the ModelService.ItemAdded event. However if a move happens we will get the ModelService.ItemRemoved and then the ModelService.ItemAdded events. Just ensure both the items are the same one and you have differentiated between the two.&lt;/P&gt;
&lt;P align=justify&gt;Finally for a drag drop from the toolbox, simply have a property within the activity where its value is null and once instantiated, have the property value to be non-null. That way you would know for sure that it is not a drag-drop in the subsequent times.&lt;/P&gt;
&lt;P align=justify&gt;&amp;nbsp;Thanks,&lt;/P&gt;
&lt;P align=justify&gt;Kushal.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9932753" width="1" height="1"&gt;</description></item><item><title>Using the Sequence Styling</title><link>http://blogs.msdn.com/kushals/archive/2009/11/22/using-the-sequence-styling.aspx</link><pubDate>Mon, 23 Nov 2009 06:55:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9927127</guid><dc:creator>kushals</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/kushals/comments/9927127.aspx</comments><wfw:commentRss>http://blogs.msdn.com/kushals/commentrss.aspx?PostID=9927127</wfw:commentRss><description>&lt;p&gt;One of the most commonly used designers and generally the root is the Sequence activity. Of course, we spent some amount of time adding the animation and styling to the the Sequence Activity Designer. &lt;/p&gt;  &lt;p align="justify"&gt;However, due to a number of reasons(costs mainly), the activity designer is internal. However, the good news is customers can take advantage of the styling and animation that of the sequence designer so all the composite designers can avail to it and have a consistent experience throughout their workflow authoring.&lt;/p&gt;  &lt;p align="justify"&gt;This is through:&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160; &amp;lt;ContentPresenter x:Uid=&amp;quot;ContentPresenter_1&amp;quot; Content=&amp;quot;{Binding}&amp;quot; Style=&amp;quot;{x:Static sacdt:DesignerStylesDictionary.SequenceStyle}&amp;quot;/&amp;gt;&lt;/p&gt;  &lt;p align="justify"&gt;where sacdt is for System.Activities.Core.Presentation.Themes namespace in System.Core.Presentation assembly.&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;Thanks,&lt;/p&gt;  &lt;p align="justify"&gt;Kushal.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9927127" width="1" height="1"&gt;</description></item><item><title>IActivityTemplateFactory</title><link>http://blogs.msdn.com/kushals/archive/2009/11/12/iactivitytemplatefactory.aspx</link><pubDate>Fri, 13 Nov 2009 03:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9921729</guid><dc:creator>kushals</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/kushals/comments/9921729.aspx</comments><wfw:commentRss>http://blogs.msdn.com/kushals/commentrss.aspx?PostID=9921729</wfw:commentRss><description>&lt;P&gt;As part of workflow authoring, it is always the case where the customer says, I like your out of box activity, however it has too many arguments/properties. I don't want to ask my user to set all these properties. And hence, now I would need to write a custom activity which has some of these properties and arguments already configured and maybe hidden as well from the user.&lt;/P&gt;
&lt;P&gt;We faced the same dilemma as we were working on our Messaging activities. We wanted the user to know about the Receive and SendReply activities. However we knew that giving them separately would be not an easy configuration task for every user. To solve this problem and the customer asks we talked above, we came up with IActivityTemplateFactory.&lt;/P&gt;
&lt;P&gt;In a nutshell, it is like pre-configuring your existing out of box activities as and when they are dropped on the the designer surface. And to check a simple example of it, look at ReceiveAndSendReply activity under the Messaging category in VS toolbox. If you lookup, we do not have any activity called ReceiveAndSendReply in the System.Activities assembly. It is the IActivityTemplate that is being termed as ReceiveAndSendReply.&lt;/P&gt;
&lt;P&gt;The interface IActivityTemplateFactory is something like:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;interface&lt;/SPAN&gt; IActivityTemplateFactory
  {
      Activity Create(DependencyObject target);
  }&lt;/PRE&gt;
&lt;P&gt;
&lt;STYLE type=text/css&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;
Now as part of the implementation, in the Create method, you can create the instances of the objects/activities you want to be dropped on the workflow designer along with their pre-configured properties/arguments.&lt;/P&gt;
&lt;P&gt;Internally, as part of drag drop from toolbox, generally an Activator.CreateInstance(type of activity) happens. However if we recognize the type is derived form IActivityTemplateFactory, then we do all the ‘typeobject’.Create.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;sealed&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;class&lt;/SPAN&gt; MyDelayActivity : IActivityTemplateFactory
    {
        &lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; Activity Create(DependencyObject target)
        {
            &lt;SPAN class=kwrd&gt;return&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; System.Activities.Statements.Delay
            {
                DisplayName = &lt;SPAN class=str&gt;"DelayActivityTemplate"&lt;/SPAN&gt;,
                Duration = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; TimeSpan(0,0,10)

            };
        }
    }&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P&gt;Add this activity to the toolbox, drag drop it on the workflow, immediately you would see the Delay activity with its properties/arguments configured with ‘DisplayName’ as “DelayActivityTemplate” and the ‘Duration’ set to 10 seconds.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kushal.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9921729" width="1" height="1"&gt;</description></item><item><title>Morphing</title><link>http://blogs.msdn.com/kushals/archive/2009/11/11/morphing.aspx</link><pubDate>Thu, 12 Nov 2009 04:38:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9921176</guid><dc:creator>kushals</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/kushals/comments/9921176.aspx</comments><wfw:commentRss>http://blogs.msdn.com/kushals/commentrss.aspx?PostID=9921176</wfw:commentRss><description>&lt;p align="justify"&gt;Lets talk about a couple of common customer scenarios/questions that I have encountered till date.&lt;/p&gt;  &lt;p align="justify"&gt;1. Workflow authors want to use the generic activities such that they can start with Activity&amp;lt;Object&amp;gt; and then dynamically without having to replace the activity on the canvas want it to be changed to Activity&amp;lt;string&amp;gt;. Specifically, this should happen without having the user to remove the activity from the canvas and then replacing it with the right generic definition, there is no simple way.&lt;/p&gt;  &lt;p align="justify"&gt;2. Depending on some property value or some activity added/removed from the workflow, the author would want to see that a specific activity A is replaced by activity B. How do we go about doing that?&lt;/p&gt;  &lt;p align="justify"&gt;3. Refactoring of Workflows into simpler custom activities. Currently out of the product, we do not provide a refactoring mechanism where a activity composition can be refactored into a custom activity type and then replace the workflow with this type instead of the complete definition.&lt;/p&gt;  &lt;p align="justify"&gt;4. The workflow author would want to surround his activity with other composite activity. And instead of deleting/cut-pasting his activity – the author would want to just wrap his leaf activity as soon as the composite activity is hovered over the leaf activity during drag drop.&lt;/p&gt;  &lt;p align="justify"&gt;5. Workflow authors sometimes start with a simple activity and as they configure the activity he would want that additional activities be added on to the workflow. And this should happen dynamically based on property configurations without having the user to drag drop each activity separately. &lt;/p&gt;  &lt;p align="justify"&gt;All these scenarios can be accomplished using a concept we call Morphing of the Model Items. Example, say we have a Workflow wiht a root Sequence and its children being as follows:&lt;/p&gt;  &lt;p align="justify"&gt;Sequence&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;Activity1&lt;/p&gt;    &lt;p align="justify"&gt;PlaceHolderActivity&lt;/p&gt;    &lt;p align="justify"&gt;Activity2&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="justify"&gt;This Workflow needs to be replaced as:&lt;/p&gt;  &lt;p align="justify"&gt;Sequence&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;Activity1&lt;/p&gt;    &lt;p align="justify"&gt;MyNewActivity&lt;/p&gt;    &lt;p align="justify"&gt;Activity2&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="justify"&gt;Couple of things need to happen to accomplish this&lt;/p&gt;  &lt;p align="justify"&gt;1. Of course the model item representing the PlaceHolderActivity on the workflow designer surface needs to be replaced by the model item representing MyNewActivity.&lt;/p&gt;  &lt;p align="justify"&gt;2. Also, the Sequence activity’s Children collection needs to be updated so that the index with PlaceHolderActivity is replaced to the MyNewActivity.&lt;/p&gt;  &lt;p align="justify"&gt;3. Finally, we also need to ensure that all the incoming and outgoing links in Sequence towards and pointing out of the PlaceHolderActivity needs to now reference the MyNewActivity.&lt;/p&gt;  &lt;p align="justify"&gt;How do we achieve this:&lt;/p&gt;  &lt;pre class="csharpcode"&gt; &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Morph(ModelItem oldModelItem, ModelItem newModelitem)
        {
            &lt;span class="kwrd"&gt;try&lt;/span&gt;
            {
                MorphHelper.MorphObject(oldModelItem, newModelitem);
            }
            &lt;span class="kwrd"&gt;catch&lt;/span&gt;(Exception ex)
            {
                &lt;span class="rem"&gt;//MessageBox.Show(ex.Message);&lt;/span&gt;
            }
           
        }&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p align="justify"&gt;Please note that this will also have the properties’ values form the old PlaceHolderActivity would also be copied over to the new activity if there is a common subset between the two activities’ property collection.&lt;/p&gt;

&lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;Thanks,&lt;/pre&gt;

&lt;pre class="csharpcode"&gt;Kushal.&lt;/pre&gt;

&lt;pre class="csharpcode"&gt;&amp;#160;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9921176" width="1" height="1"&gt;</description></item><item><title>Toolbox and Custom Activities</title><link>http://blogs.msdn.com/kushals/archive/2009/10/28/toolbox-and-custom-activities.aspx</link><pubDate>Wed, 28 Oct 2009 17:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9914229</guid><dc:creator>kushals</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/kushals/comments/9914229.aspx</comments><wfw:commentRss>http://blogs.msdn.com/kushals/commentrss.aspx?PostID=9914229</wfw:commentRss><description>&lt;p align="justify"&gt;Couple of customers have complained that I have my assembly with all the custom activities referenced in the Workflow project and still I don't see them even on a Re-build in my toolbox.&lt;/p&gt;  &lt;p align="justify"&gt;Hence, I wanted to clarify the functionality we have in place for having custom activities show up in the toolbox:&lt;/p&gt;  &lt;p align="justify"&gt;1. If your custom activity is part of the same project, once you build the project and if the build succeeds, the activity would appear in the Toolbox under the current activity’s namespace name category.&lt;/p&gt;  &lt;p align="justify"&gt;2. If your custom activity is part of the different project in the same solution though as your workflow, it would appear still appear in the toolbox on a build, again under the activity’ namespace name category. Please specifically note that you would not need to add the project or assembly references to your custom activity projects into your workflow project. The assembly reference would be added automatically as part of the drag drop of the activity into the workflow.&lt;/p&gt;  &lt;p align="justify"&gt;3. Finally, if you have an assembly with custom activities which is not part of the solution, then, the user would have to use the “Choose Toolbox Items” dialog launched through the “Choose Items…” context menu in toolbox. In this dialog the user would need to click on the “System.Activities” tab and through the Browse, select the custom activity assembly and click OK. &lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/ToolboxandCustomActivities_E7A6/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/ToolboxandCustomActivities_E7A6/image_thumb.png" width="541" height="396" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="justify"&gt;This should get the custom activities in the list and clicking on “OK” on this dialog should add the custom activities from this assembly in the toolbox. They would then be added to the category under/from which the Choose toolbox Items was launched. Again, in this case the assembly reference wouldn't be immediately added to the workflow project. Only on the drag-drop of any activity from this assembly, would the assembly reference would be added.&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="justify"&gt;Thanks,&lt;/p&gt;  &lt;p align="justify"&gt;Kushal.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9914229" width="1" height="1"&gt;</description></item><item><title>Adding Activities on the designer programmatically</title><link>http://blogs.msdn.com/kushals/archive/2009/10/27/adding-activities-on-the-designer-programmatically.aspx</link><pubDate>Tue, 27 Oct 2009 14:57:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9913524</guid><dc:creator>kushals</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/kushals/comments/9913524.aspx</comments><wfw:commentRss>http://blogs.msdn.com/kushals/commentrss.aspx?PostID=9913524</wfw:commentRss><description>&lt;p align="justify"&gt;One of the common asks that customers have is how to add/remove activities from the workflow designer during its authoring – automatically though. &lt;/p&gt;  &lt;p align="justify"&gt;Example, If a specific property for a certain activity is changed, we would want that certain activities are added or removed from the workflow in its designer. &lt;/p&gt;  &lt;p align="justify"&gt;How do we go about doing that?&lt;/p&gt;  &lt;p align="justify"&gt;Well, we need to use model item infrastructure to go about it. If you have a custom designer for your custom composite activity, you can override the OnModelItemChanged event. Check the condition you want to base the addition or deletion of the activity and then:&lt;/p&gt;  &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;  &lt;div align="justify"&gt;   &lt;pre class="csharpcode"&gt;ModelItem myItem = &lt;span class="kwrd"&gt;this&lt;/span&gt;.ModelItem;
&lt;span class="kwrd"&gt;do&lt;/span&gt;
{
    myItem = myItem.Parent;
}
&lt;span class="kwrd"&gt;while&lt;/span&gt; (myItem.Parent.ItemType != &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(Sequence));

myItem.Parent.Properties[&lt;span class="str"&gt;&amp;quot;Activities&amp;quot;&lt;/span&gt;].Collection.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; Sequence());&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;

&lt;p align="justify"&gt;where ‘this’ corresponds to the Activity Designer where you have overridden the OnModelItemChaged event.&lt;/p&gt;

&lt;p align="justify"&gt;In the code above, essentially I am getting hold of the model item representing the specific activity and then walking up the tree till I find the root activity. To the root I am saying, can you add another Sequence activity at the last activity in the workflow.&lt;/p&gt;

&lt;p align="justify"&gt;You would notice that immediately a Sequence activity would be added onto your workflow as the specific Model item has changed triggering the event.&lt;/p&gt;

&lt;p align="justify"&gt;Another variation of the above customer ask is, we do not want only one specific activity to be added. We want multiple changes including a few activities added or deleted. Or having a few properties configured specifically when a specific model change happens in the workflow.&lt;/p&gt;

&lt;p align="justify"&gt;We can do that as follows:&lt;/p&gt;

&lt;div align="left"&gt;
  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; (ModelEditingScope editingScope = &lt;span class="kwrd"&gt;this&lt;/span&gt;.ModelItem.Root.BeginEdit(&lt;span class="str"&gt;&amp;quot;Activities&amp;quot;&lt;/span&gt;))
 {
  &lt;span class="kwrd"&gt;this&lt;/span&gt;.ModelItem.Root.Properties[&lt;span class="str"&gt;&amp;quot;Activities&amp;quot;&lt;/span&gt;].Collection.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; Sequence());
  &lt;span class="kwrd"&gt;this&lt;/span&gt;.ModelItem.Root.Properties[&lt;span class="str"&gt;&amp;quot;Activities&amp;quot;&lt;/span&gt;].Collection.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; Sequence());
  &lt;span class="kwrd"&gt;this&lt;/span&gt;.ModelItem.Root.Properties[&lt;span class="str"&gt;&amp;quot;Activities&amp;quot;&lt;/span&gt;].Collection.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; Sequence());
  &lt;span class="kwrd"&gt;this&lt;/span&gt;.ModelItem.Root.Properties[&lt;span class="str"&gt;&amp;quot;Activities&amp;quot;&lt;/span&gt;].Collection.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; Sequence());

 editingScope.Complete();

 }&lt;/pre&gt;
  &lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/div&gt;

&lt;pre class="csharpcode"&gt;&amp;#160;&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p align="justify"&gt;In the code above the important thing is that all activities are being added or removed as a single unit of work. Meaning, you can Undo once and all the four Sequence activities added would be removed. Redo once and all of them would be added in a single go. Something like Transaction in the Fx. Our designer equivalent for the same is ModelEditingScope.&lt;/p&gt;

&lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;

&lt;p align="justify"&gt;Thanks,&lt;/p&gt;

&lt;p align="justify"&gt;Kushal.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9913524" width="1" height="1"&gt;</description></item><item><title>Adding Variables, Expressions and Bindings Programmatically</title><link>http://blogs.msdn.com/kushals/archive/2009/10/26/adding-variables-expressions-and-bindings-programmatically.aspx</link><pubDate>Mon, 26 Oct 2009 19:29:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9913120</guid><dc:creator>kushals</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/kushals/comments/9913120.aspx</comments><wfw:commentRss>http://blogs.msdn.com/kushals/commentrss.aspx?PostID=9913120</wfw:commentRss><description>&lt;p&gt;I am assuming we already know how to add activities on to the designer surface dynamically using the designer programmatic APIs. If not please take a &lt;a href="http://blogs.msdn.com/kushals/archive/2009/10/27/adding-activities-on-the-designer-programmatically.aspx"&gt;look here&lt;/a&gt;.&lt;/p&gt;  &lt;p align="justify"&gt;Another variation of the ask is we want to add variables and arguments to our activities/workflows at design time dynamically. Example scenario: If a specific activity is drag dropped and its input type is same as the output of the previous activity on the workflow, bind the input of this newly added activity to the output of the other activity.&lt;/p&gt;  &lt;p align="justify"&gt;Yes, we would need a variable here so that we can bind it to the InArgument and the OutArgument of the activities to link them for data flow. &lt;/p&gt;  &lt;p align="justify"&gt;How do we go about doing it: &lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; myStrName = &lt;span class="str"&gt;&amp;quot;myStrName&amp;quot;&lt;/span&gt;;
Variable&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt; mySimpleVar= &lt;span class="kwrd"&gt;new&lt;/span&gt; Variable&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt; { Name = myStrName };
myItem.Parent.Properties[&lt;span class="str"&gt;&amp;quot;Variables&amp;quot;&lt;/span&gt;].Collection.Add(mySimpleVar);&lt;/pre&gt;
&lt;style type="text/css"&gt;





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p align="justify"&gt;This was just about adding a variable. How about providing a default value to the variable. Lets&amp;#160; see how we go about doing that:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;mySimpleVar.Default = &lt;span class="kwrd"&gt;new&lt;/span&gt; VisualBasicValue&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt;
{
      ExpressionText = &lt;span class="str"&gt;&amp;quot;\&amp;quot;Kushal\&amp;quot;&amp;quot;&lt;/span&gt;,
};&lt;/pre&gt;

&lt;p&gt;Next step/hurdle – What if the variable is of some user defined type? We would then need to add a namespace declaration as part of the Imports section in the Workflow&lt;style type="text/css"&gt;





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/p&gt;

&lt;p&gt;Example: If you want to create a variable of type fooClass defined in assembly – fooAssembly.dll and namespace - foo, we would go about as follows:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; requiredAssemblyName = 
                    &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(foo.fooClass).Assembly.GetName().Name;

&lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; requiredNamespace = &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(foo.fooClass).Namespace;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;pre class="csharpcode"&gt;VisualBasicSettings vbSettings = &lt;span class="kwrd"&gt;new&lt;/span&gt; VisualBasicSettings();
vbSettings.ImportReferences.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; VisualBasicImportReference
{
        Assembly = requiredAssemblyName,
        Import = requiredNamespace
});


mySimpleVar.Default = &lt;span class="kwrd"&gt;new&lt;/span&gt; VisualBasicValue&amp;lt;foo.fooClass&amp;gt;
{
       ExpressionText = &lt;span class="str"&gt;&amp;quot;new foo.fooClass()&amp;quot;&lt;/span&gt;,
         Settings = vbSettings

};&lt;/pre&gt;
&lt;style type="text/css"&gt;





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;Now the rest is about the binding of the outArgument of one activity to the inArgument of the other activity. For example:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;Argument myArg = 
          Argument.Create(&lt;span class="kwrd"&gt;typeof&lt;/span&gt;(foo.fooClass),ArgumentDirection.In);&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;pre class="csharpcode"&gt;myArg.Expression =   &lt;span class="kwrd"&gt;new&lt;/span&gt; VisualBasicValue&amp;lt;foo.fooClass&amp;gt;
{
                        ExpressionText = myStrName
};

&lt;span class="kwrd"&gt;this&lt;/span&gt;.ModelItem.Properties[&lt;span class="str"&gt;&amp;quot;Response&amp;quot;&lt;/span&gt;].SetValue(myArg);
                               &lt;/pre&gt;
&lt;style type="text/css"&gt;




.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;where “Response” is an InArgument for my activity and myStrName is the variable we just created above.&lt;/p&gt;

&lt;p&gt;We follow the similar model for the outArgument and you have programmatically completed binding the output of one activity to the input of another activity. One change though is that for the outArgument expression assignment you need to use a VisualBasicReference instead of a VisualBasicValue.&lt;/p&gt;

&lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;

&lt;p align="justify"&gt;Thanks,&lt;/p&gt;

&lt;p align="justify"&gt;Kushal.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9913120" width="1" height="1"&gt;</description></item><item><title>WF 4.0 Templates - Beta2</title><link>http://blogs.msdn.com/kushals/archive/2009/09/21/wf-4-0-templates-beta2.aspx</link><pubDate>Mon, 21 Sep 2009 21:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9909231</guid><dc:creator>kushals</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/kushals/comments/9909231.aspx</comments><wfw:commentRss>http://blogs.msdn.com/kushals/commentrss.aspx?PostID=9909231</wfw:commentRss><description>&lt;p align="justify"&gt;During Beta1, I had talked about the templates we are shipping in depth and our rationale around &lt;a href="http://blogs.msdn.com/kushals/archive/2009/06/01/workflow-4-0-templates.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p align="justify"&gt;However, we got a lot of feedback around them as this is one where which has the first visibility and more or less is taken as some form of guidance from us(product team) around how to start the development with Workflows/WCF.&lt;/p&gt;  &lt;p align="justify"&gt;Based on this feedback, couple of things have been updated with respect to templates for Beta2. Please let us know what you think as we get ready for RTM and need to make some final changes in time before shipping VS 2010.&lt;/p&gt;  &lt;p align="justify"&gt;The Project Templates under the Workflow Node:&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Templates_D2E1/image3.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Templates_D2E1/image3_thumb.png" width="527" height="366" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="justify"&gt;Yes, we have removed the Flowchart Console and the Sequential Console Project Templates. The biggest reasoning being we didn't want to portray(mis-guide) Sequence and Flowchart as being the only root activities possible. It is possible to have any composite or a leaf activity to have your root activity for the workflow. &lt;/p&gt;  &lt;p align="justify"&gt;Also, going down that route, we wouldn't know which ones to promote as first class root activities. We have Sequence and Flowchart. What happens when StateMachine comes? Or why not Parallel?&lt;/p&gt;  &lt;p align="justify"&gt;Hence the best approach going forward, was to have a single Activity Library and a single Workflow Console Application. They are both with the root being the ActivitySchema(Activity x:Class)&lt;/p&gt;  &lt;p align="justify"&gt;We also have the ActivityDesigner as a separate Project template, as we do expect users to consistently separate their activities and designers into separate assemblies so that onl the activities assemblies are deployed onto the production machines.&lt;/p&gt;  &lt;p align="justify"&gt;Finally, we also have the WCF Workflow Service Application. This is where we have the integration between the Workflow and WCF. This is the consolidation of the Declarative Sequential Service Library and the Declarative Flowchart Service Library. In Beta2, the Xamlx file only contains the Sequence template wrapping the ReceiveAndSendReply activities.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Templates_D2E1/image7.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Templates_D2E1/image7_thumb.png" width="536" height="403" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="justify"&gt;This specific Project Template is also part of the WCF node under Visual C# and VB as well as part of the root Visual C# and VB nodes. &lt;/p&gt;  &lt;p align="justify"&gt;Please note that it is a Web Application project type. So even though Xamlx is deployed standalone, the project can have other activities and designer items added to wrap them as a dll. Using the Web Application project type gave us a couple of advantages including the single click deploy and the the F5 on Cassini experience.&lt;/p&gt;  &lt;p align="justify"&gt;The Item Templates under the Workflow Node:&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Templates_D2E1/image11.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Templates_D2E1/image11_thumb.png" width="540" height="369" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="justify"&gt;Continuing on the same principle followed in the Project templates, we have removed the Sequence and the Flowchart templates. We now have just the Activity template which is same as the Workflow authoring in Workflow 4.&lt;/p&gt;  &lt;p align="justify"&gt;The declarative Sequence and Flowchart item templates have been replaced by a single WCF Workflow Service item template with the the same Service.Xamlx file as the Project templates. Again following on the project template principle, the item template appears now in the Workflow node instead of the Web node in Beta1.&lt;/p&gt;  &lt;p align="justify"&gt;The ActivityDesigner template remains the same.&lt;/p&gt;  &lt;p align="justify"&gt;Finally, the Code Activity item template also has been updated to make it clear(through the comments) on how to use a code activity to return a value.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Templates_D2E1/image19.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Templates_D2E1/image19_thumb.png" width="533" height="365" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9909231" width="1" height="1"&gt;</description></item><item><title>IActivityToolboxService</title><link>http://blogs.msdn.com/kushals/archive/2009/09/16/iactivitytoolboxservice.aspx</link><pubDate>Wed, 16 Sep 2009 16:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9926352</guid><dc:creator>kushals</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/kushals/comments/9926352.aspx</comments><wfw:commentRss>http://blogs.msdn.com/kushals/commentrss.aspx?PostID=9926352</wfw:commentRss><description>&lt;P align=justify&gt;During Workflow authoring, customers generally want their Toolbox to be context sensitive. For example, if a specific activity is added to the workflow, then they want to ensure that the Toolbox shows a few additional activities. Or if the activities are removed from the workflow, the toolbox should react appropriately based on the domain requirements.&lt;/P&gt;
&lt;P align=justify&gt;Of course, in the re-hosted workflow designer world, this is simple as you control the Toolbox control and can ensure that based on the Model changes in the workflow, the host triggers appropriate changes in the Toolbox control.&lt;/P&gt;
&lt;P align=justify&gt;However, in VS since Toolbox is a VS specific control, we needed something additional. That something additional is the IActivityToolboxService. The API provides the following 4 methods:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;interface&lt;/SPAN&gt; IActivityToolboxService 
    { 
        &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; AddCategory(&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; categoryName); 
        &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; RemoveCategory(&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; categoryName); 
        &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; AddItem(&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; qualifiedTypeName, &lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; categoryName); 
        &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; RemoveItem(&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; qualifiedTypeName, &lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; categoryName); 
        IList&amp;lt;&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt;&amp;gt; EnumCategories(); 
        IList&amp;lt;&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt;&amp;gt; EnumItems(&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; categoryName); 
    }&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;




.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P align=justify&gt;Hopefully, they are pretty self explanatory. &lt;/P&gt;
&lt;P align=justify&gt;I have also attached a very basic sample where if the specific activity designer has its OnModelItemChanged event triggered, we use the IActivityToolboxService to edit the Toolbox items in VS. And the OnModelItemChanged would be triggered when the CustomActivity is drag dropped on the workflow.&lt;/P&gt;
&lt;P align=justify&gt;Please also note that, to remove an item from a specific workflow tab, you should have added it through the IActivityToolboxService there in the first place. Meaning, you would not be able to remove any out of box activities for Workflow1.xaml. The way it works is you add custom activities in the first place and then delete them as needed, depending on the context you are in.&lt;/P&gt;
&lt;P align=justify&gt;Thanks,&lt;/P&gt;
&lt;P align=justify&gt;Kushal.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9926352" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/kushals/attachment/9926352.ashx" length="43885" type="application/x-zip-compressed" /></item><item><title>Re-hosting the Workflow Desinger in Read-Only Mode</title><link>http://blogs.msdn.com/kushals/archive/2009/09/14/re-hosting-the-workflow-desinger-in-read-only-mode.aspx</link><pubDate>Tue, 15 Sep 2009 02:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9895230</guid><dc:creator>kushals</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/kushals/comments/9895230.aspx</comments><wfw:commentRss>http://blogs.msdn.com/kushals/commentrss.aspx?PostID=9895230</wfw:commentRss><description>&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;One of the questions, we get fomr customers is how can we re-host the designer in a Read-Only mode. Well, here you go:&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;For Re-hosting a Flowchart, we have:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: blue; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: blue; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;this&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: teal; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;.&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;wd &lt;SPAN style="COLOR: teal"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; WorkflowDesigner();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: blue; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;this&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: teal; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;.&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;wd&lt;SPAN style="COLOR: teal"&gt;.&lt;/SPAN&gt;Load(&lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; Flowchart());&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;Going further, to make this Flowchart ReadOnly, add:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;ReadOnlyState state &lt;SPAN style="COLOR: teal"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;.&lt;/SPAN&gt;wd&lt;SPAN style="COLOR: teal"&gt;.&lt;/SPAN&gt;Context&lt;SPAN style="COLOR: teal"&gt;.&lt;/SPAN&gt;Items&lt;SPAN style="COLOR: teal"&gt;.&lt;/SPAN&gt;GetValue&lt;SPAN style="COLOR: teal"&gt;&amp;lt;&lt;/SPAN&gt;ReadOnlyState&lt;SPAN style="COLOR: teal"&gt;&amp;gt;&lt;/SPAN&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;state&lt;SPAN style="COLOR: teal"&gt;.&lt;/SPAN&gt;IsReadOnly &lt;SPAN style="COLOR: teal"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;This should get the designer in the read-only mode so that no other activities can be added or none of the activity properties changed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9895230" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/kushals/archive/tags/Read+Only/default.aspx">Read Only</category><category domain="http://blogs.msdn.com/kushals/archive/tags/Workflowrkflow/default.aspx">Workflowrkflow</category></item><item><title>Debugging in Workflow 4.0</title><link>http://blogs.msdn.com/kushals/archive/2009/06/01/debugging-in-workflow-4-0.aspx</link><pubDate>Tue, 02 Jun 2009 01:27:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9682426</guid><dc:creator>kushals</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/kushals/comments/9682426.aspx</comments><wfw:commentRss>http://blogs.msdn.com/kushals/commentrss.aspx?PostID=9682426</wfw:commentRss><description>&lt;p&gt;&lt;font size="2"&gt;Visual Studio 2010 Beta1 is out and includes the new Windows Workflow Foundation (WF 4).&amp;#160; This is something we have been working on for last 18 months and specifically I have been responsible for the Debugging experience of Workflows.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;As in Workflow 3.0, we continue to provide the debugging experience for workflows through the designer surface. In addition, we continue to make improvements over the existing 3.0 workflow debugging experience. Some of the enhancements include: &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;The underlying representation of the graphical form of the Workflows we see on the designer surface is Xaml. This Xaml representation can be viewed by right-clicking on the workflow file (.xaml) in the solution explorer and selecting ‘View Code’. Though users can author the workflows entirely through the designer, it is possible that developers would like to view the Xaml representation and directly edit the workflow through this view. For such purposes, we now allow the users to seamlessly debug workflows through the designer and the Xaml view. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Below is a workflow which has a breakpoint set through F9 or through the activity's context menu on the root activity. If we F5 this project, workflow execution will break on the root activity as follows:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/DebugginginWorkflow4.0_D96E/clip_image002%5B4%5D.jpg"&gt;&lt;font color="#000000" size="2"&gt;&lt;img title="clip_image002[4]" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="244" alt="clip_image002[4]" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/DebugginginWorkflow4.0_D96E/clip_image002%5B4%5D_thumb.jpg" width="215" border="0" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;At this point, the developer may decide to move to the Xaml view of the workflow through the ‘View Code’ option.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/DebugginginWorkflow4.0_D96E/clip_image004%5B4%5D.jpg"&gt;&lt;font color="#000000" size="2"&gt;&lt;img title="clip_image004[4]" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="194" alt="clip_image004[4]" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/DebugginginWorkflow4.0_D96E/clip_image004%5B4%5D_thumb.jpg" width="244" border="0" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;This will open the Xaml view and you can see that the root Sequence activity still has the debug adornment in the Xaml view.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/DebugginginWorkflow4.0_D96E/clip_image006%5B4%5D.jpg"&gt;&lt;font color="#000000" size="2"&gt;&lt;img title="clip_image006[4]" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="114" alt="clip_image006[4]" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/DebugginginWorkflow4.0_D96E/clip_image006%5B4%5D_thumb.jpg" width="244" border="0" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;You can remove/set the breakpoints on the Xaml view, and debug through the Xaml view. Or you can switch back to the designer view by double clicking on the workflow file in the solution explorer and debug on the designer surface. Pretty seamless!&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/DebugginginWorkflow4.0_D96E/clip_image008%5B4%5D.jpg"&gt;&lt;font color="#000000" size="2"&gt;&lt;img title="clip_image008[4]" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="129" alt="clip_image008[4]" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/DebugginginWorkflow4.0_D96E/clip_image008%5B4%5D_thumb.jpg" width="244" border="0" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/DebugginginWorkflow4.0_D96E/clip_image010%5B4%5D.jpg"&gt;&lt;font color="#000000" size="2"&gt;&lt;img title="clip_image010[4]" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="117" alt="clip_image010[4]" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/DebugginginWorkflow4.0_D96E/clip_image010%5B4%5D_thumb.jpg" width="244" border="0" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/DebugginginWorkflow4.0_D96E/clip_image012%5B4%5D.jpg"&gt;&lt;font color="#000000" size="2"&gt;&lt;img title="clip_image012[4]" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="193" alt="clip_image012[4]" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/DebugginginWorkflow4.0_D96E/clip_image012%5B4%5D_thumb.jpg" width="244" border="0" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;On switching to the designer surface, you will notice that we have the bread crumb view of the parent composite activity.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;In addition to the seamless debugging, the other features like Locals, Call Stack, Watch, Immediate and some breakpoint window support are provided as well. The traditional F5/F10/F11 mechanism work as expected providing step over and step into functionality. If the activities are implemented in code, the user can debug into the code by setting a breakpoint on the Execute method defined for the activity in C#/VB.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;We also support ‘Attach to Process’ workflow debugging which can be leverage when debugging workflow services hosted in IIS.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Last but not least, we have made DebugService public in WF 4 so that users can extend the behavior for creating custom applications like Monitoring, Simulation and provide debugging even in the case of the re-hosted workflow designer. I will cover this aspect in my next blog post. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Thanks,&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Kushal.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9682426" width="1" height="1"&gt;</description></item><item><title>Workflow 4.0 Templates - Beta1</title><link>http://blogs.msdn.com/kushals/archive/2009/06/01/workflow-4-0-templates.aspx</link><pubDate>Mon, 01 Jun 2009 22:32:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9682440</guid><dc:creator>kushals</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/kushals/comments/9682440.aspx</comments><wfw:commentRss>http://blogs.msdn.com/kushals/commentrss.aspx?PostID=9682440</wfw:commentRss><description>&lt;p&gt;&lt;font size="2"&gt;As Visual Studio 2010 Beta1 is released, let’s take a quick walkthrough of the Workflow templates we are providing for the new Windows Workflow Foundation (WF) model provided in the System.Actvities.* namespace (for brevity, I'll use WF 4 to refer to workflows to refer to WF workflows from this namespace). &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Opening Visual Studio and the New Project Dialog, click on the Workflow tab under Visual C# or Visual Basic. You would notice the following Project Templates for Workflow.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image002_2.jpg"&gt;&lt;font color="#000000" size="2"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image002_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image002_thumb.jpg" width="542" height="348" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Lets take a quick look at each of them, &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;The Activity Designer Library provides a way for the user to create a custom activity designer. It is essentially a WPF User Control with the base class being WorkflowElementDesigner which is the base class for the activity designers. As you would see below, the designer shows the root/default activity designer provided through the WorkflowElementDesigner. Users creating the custom activity designer can start with this base template designer to create designers as needed.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image004_2.jpg"&gt;&lt;font color="#000000" size="2"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image004_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image004_thumb.jpg" width="515" height="355" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Next, the Activity Library template provides a way for the users to create custom activities. It contains the root activity Xaml file where the users can drag drop existing activities on the canvas and compose them to create new custom activities – purely declaratively. Alternately the user can choose to create custom activities by providing its execution logic through imperative code. We provide a pre-built Item template ‘Workflow Element’ for creating a code based activity. The two Project and item Templates are as follows:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image006_2.jpg"&gt;&lt;font color="#000000" size="2"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image006_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image006_thumb.jpg" width="530" height="361" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image008_2.jpg"&gt;&lt;font color="#000000" size="2"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image008_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image008_thumb.jpg" width="534" height="315" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Moving on, the next two Project Templates are the Sequential Workflow Console Application and the Flowchart Workflow Console Application. As the name suggests they provide different workflow authoring styles wrapped within the root activity which can then run through the host provided in the Program.cs file.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;In essence, there is no difference between the activities we created through the Activity Library and the Workflows we author through the Console Application. The root for both of them is &amp;lt;Activity&amp;gt;. So it is possible that you can take the Activity Library created activities and run them directly through the host provided in any of the console applications. The only reason we have provided the Sequential and Flowchart templates is because we think of them as the common modeling/authoring styles that users would adopt while creating their workflow applications. They have been created as Console applications so that we can provide users with a quick F5 experience for unit testing purposes. As any other project, Library and Console Applications can be switched to the other one through their Project Properties pages. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Now, lets talk a bit about the Item Templates. The users can add pre-existing templates as items to their projects through the Add new Item option available in the context menu for the project. The Item Templates under the Workflow node for Visual C# or Visual basic are:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image010_2.jpg"&gt;&lt;font color="#000000" size="2"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image010_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image010_thumb.jpg" width="532" height="301" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Flowchart, Sequence and Activity and Activity Designer are self-explanatory. In addition, we also provide a few item templates for Workflow Services. They are the Declarative Flowchart Service and the Declarative Sequential Service. As the name suggests, they are the workflow services containing the messaging activities wrapped within the Sequence or a Flowchart.&amp;#160; You would also notice that the extensions with these workflow service files is Xamlx. This is because when the services are deployed onto IIS, the right workflow specific httpHandlers can be invoked (WPF already registers Xaml as the extension, so we needed a new extension to invoke our HttpHandlers)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;As you would notice below, the Xamlx file here contains the Receive and a SendReply activity configured for a simple message receive and reply back. Like the ASP.NET model, these files don’t need to be compiled and can be directly deployed onto the IIS/web server. For a seamless deploy/publish experience, we have also provided the equivalent Declarative Sequential Service Library and the Declarative Flowchart Service Library Project Templates. These templates are the Web templates with options to Package and Publish available for deploying the services. These options are exactly similar to the ASP.NET web services available.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image012_2.jpg"&gt;&lt;font color="#000000" size="2"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image012_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image012" border="0" alt="clip_image012" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image012_thumb.jpg" width="506" height="315" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;One question that must be coming to your mind is what happened to the WF 3 workflows (workflows created using the System.Workflow.* namespace)? Can we still create workflows using them? The answer is Yes! To start your workflow applications using WF 3, in the New Project Dialog, change the Target Framework to 3.0/3.5 to see the Workflow 3.0/3.5 templates. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image014_2.jpg"&gt;&lt;font color="#000000" size="2"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image014_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image014" border="0" alt="clip_image014" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image014_thumb.jpg" width="501" height="269" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Selecting these templates would get you started with &lt;s&gt;the&lt;/s&gt; WF 3 workflows. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image016_2.jpg"&gt;&lt;font color="#000000" size="2"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image016_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image016" border="0" alt="clip_image016" src="http://blogs.msdn.com/blogfiles/kushals/WindowsLiveWriter/Workflow4.0Templates_DA94/clip_image016_thumb.jpg" width="506" height="343" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;The Item Template in this case would now be for WF 3 as well. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;You can also create WF 3 projects with .NET Framework 4 using the Project Properties pages and changing the Target Framework Version.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;That was a quick walkthrough of the project and item templates we’ve provided to you in Visual Studio 2010 Beta1. We’re very interested in hearing your feedback. Specifically, would you like more/less templates? Did the names of the templates make intuitive sense and helped you pick the right now? Were they discoverable on the New Project dialog?&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9682440" width="1" height="1"&gt;</description></item><item><title>.NET Source Code Debugging</title><link>http://blogs.msdn.com/kushals/archive/2007/10/28/net-source-code-debugging.aspx</link><pubDate>Mon, 29 Oct 2007 05:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5752825</guid><dc:creator>kushals</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/kushals/comments/5752825.aspx</comments><wfw:commentRss>http://blogs.msdn.com/kushals/commentrss.aspx?PostID=5752825</wfw:commentRss><description>&lt;P&gt;Recently I came across &lt;A class="" title="Source Code Debugging" href="http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx" mce_href="http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx"&gt;this&lt;/A&gt; blog from ScottGu and was thrilled to see this initiative from the .NET team. Imagine now being able to debug seamlessely into the .NET framework code. Gone are the days where you have to downaload the Reflector to look at the .NET code to understand its workings. &lt;/P&gt;
&lt;P&gt;The steps are pretty straightforward as listed in the blog above. One thing I was disappointed was Workflow code is still not public but as it seems they plan to release it very soon. That would be great. I am so excited to use this feature and my first task is to leverage it in my attempt nowadays&amp;nbsp;to understand VSIP(though with so much of COM code in there, I am not sure how useful this tool would be),&lt;/P&gt;
&lt;P&gt;Anyways, a great step by the .NET team. So much for open source....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Thanks,&lt;/P&gt;
&lt;P&gt;Kushal.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5752825" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/kushals/archive/tags/Kushal+Shah/default.aspx">Kushal Shah</category><category domain="http://blogs.msdn.com/kushals/archive/tags/.NET+Source+Debugging/default.aspx">.NET Source Debugging</category></item><item><title>Recruiting Trip</title><link>http://blogs.msdn.com/kushals/archive/2007/10/28/recruiting-trip.aspx</link><pubDate>Mon, 29 Oct 2007 04:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5752697</guid><dc:creator>kushals</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/kushals/comments/5752697.aspx</comments><wfw:commentRss>http://blogs.msdn.com/kushals/commentrss.aspx?PostID=5752697</wfw:commentRss><description>&lt;P&gt;It was a very hectic week for me. I had been on one of the recruiting trips to a school on east coast. Other than the rough schedule, I learnt a lot of how things work and also made me remember where I came from and how I used to think just 3 years ago. &lt;/P&gt;
&lt;P&gt;To start with I would like to encourage students - both graduate and under-graduate to start following the technology industry and this is where I think I missed out. No one explained to me the importance of understanding the trends in here and how important it is to be opinionated since early age. A simple question like name your favourite S/W product made students think hard is not a good sign. If I had to advice the students, it is OK if you get&amp;nbsp;grades a&amp;nbsp;notch&amp;nbsp;below in your course work, but make sure you start understanding this industry and knowing where your niche lies.&lt;/P&gt;
&lt;P&gt;Other thing is, students apply for the PM position looking at its cool title 'Program Manager', but the title is far away from the truth. PM at Microsoft is a unique position where you are responsible for a feature, but in the end none of the feature Devs or Test is answerable to you. There is no coolness of the manager name in it. If anything it is one of the most hated and misconstrued&amp;nbsp;positions in Microsoft.&amp;nbsp;&lt;A class="" title="PM at Microsoft from Steven Sinofsky" href="http://blogs.msdn.com/techtalk/archive/2005/12/16/504872.aspx" target=_blank mce_href="http://blogs.msdn.com/techtalk/archive/2005/12/16/504872.aspx"&gt;This&lt;/A&gt;&amp;nbsp;blog from Steven Sinofsky I think is a great one which goes lengths to explain the position and its responsibilities. So if you think you have it in you, we are hiring!!!&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kushal.&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5752697" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/kushals/archive/tags/Kushal+Shah/default.aspx">Kushal Shah</category><category domain="http://blogs.msdn.com/kushals/archive/tags/Recruiting/default.aspx">Recruiting</category></item></channel></rss>