<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.imason.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>Jim @ imason : SharePoint, .NET</title><link>http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/SharePoint/.NET/default.aspx</link><description>Tags: SharePoint, .NET</description><dc:language>en</dc:language><generator>Telligent Evolution 5.0 (Build: 40623.6204)</generator><item><title>Rehydrating a State Machine Workflow</title><link>http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/2009/03/06/rehydrating-a-state-machine-workflow.aspx</link><pubDate>Fri, 06 Mar 2009 21:30:00 GMT</pubDate><guid isPermaLink="false">ba1d72eb-a51c-4157-8cec-718d26de3334:427</guid><dc:creator>James Schwartz</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.imason.com/imason_Blogs/b/jim_schwartz/rsscomments.aspx?WeblogPostID=427</wfw:commentRss><comments>http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/2009/03/06/rehydrating-a-state-machine-workflow.aspx#comments</comments><description>&lt;p&gt;At first glance, Windows Workflow does a good job of persisting workflows to the database for long-running State Machine Workflows.&lt;/p&gt;
&lt;p&gt;However, what happens when you update your workflow assembly? Windows Workflow will try to retrieve the workflow from the SQL Persistence store and de-serialize the object, but it will throw an exception (You&amp;rsquo;ll see a &lt;a href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.serializationexception.aspx"&gt;SerializationException&lt;/a&gt; or &lt;a href="http://msdn.microsoft.com/en-us/library/system.indexoutofrangeexception.aspx"&gt;IndexOutOfRangeException&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;There are different ways to handle this situation. The first (and most obvious way) is to set versions on your DLLs so that the workflow will de-serialize into a previous version of a workflow and continue running in the older version. But what if the change you made to the workflow fixes an important bug in the previous version? In this case, you may want&amp;nbsp; your previously persisted workflows to use the new version of the code.&lt;/p&gt;
&lt;p&gt;A few quick Google searches will lead you to a few different options in handling this situation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Using an assembly resolver or using the &amp;ldquo;AppliesTo&amp;rdquo; attribute [1] &lt;/li&gt;
&lt;li&gt;Dynamic Workflows [2] &lt;/li&gt;
&lt;li&gt;Breaking up into smaller workflows [3] &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of these options are particularly appealing to me, so I had to find a better way to handle updates to the workflow code but still allow my long-running workflows to operate.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size:medium;"&gt;My &amp;ldquo;outside the box&amp;rdquo; solution: &lt;span style="text-decoration:underline;"&gt;Workflow Rehydration&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;To achieve Workflow Rehydration, I&amp;rsquo;m keeping track of the current state in a SQL database and if the current workflow can&amp;rsquo;t be de-serialized (because the workflow has been updated), I instantiate a new workflow and I set the state to the state it was previously in.&lt;/p&gt;
&lt;p&gt;The obvious concern that comes up using this approach is &amp;ldquo;&lt;i&gt;how do I avoid executing the code inside my StateInitializationActivity?&lt;/i&gt;&amp;rdquo;&lt;/p&gt;
&lt;p&gt;To get around this issue, I&amp;rsquo;m passing in a boolean parameter into my State Machine workflow that indicates whether or not the workflow is being rehydrated. I then use an &lt;b&gt;IfElseActivity&lt;/b&gt; to execute my State Initialization code only if the workflow is not being rehydrated.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.imason.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jim_5F00_schwartz/image_5F00_469DA6F4.png"&gt;&lt;img title="image" style="border:0pt none;display:inline;" alt="image" src="http://www.imason.com/img/blogs/image_469DA6F4.png" height="398" width="285" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The end result is that the workflow goes back into its previous state, but it&amp;rsquo;s now running inside the new updated workflow code. You might call this a &amp;ldquo;Utopia State&amp;rdquo; (Apologies for the lame pun).&lt;/p&gt;
&lt;p&gt;The end user has no idea that the workflow has gone through this transformation from an old version of the workflow code to the new version; and it only took a little bit of code along with some IF conditions.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;References:&lt;/b&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[1] &lt;a href="http://msdn.microsoft.com/en-us/library/aa349375(VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa349375(VS.85).aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[2] &lt;a href="http://community.bartdesmet.net/blogs/bart/archive/2006/08/28/4322.aspx"&gt;http://community.bartdesmet.net/blogs/bart/archive/2006/08/28/4322.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[3] &lt;a href="http://www.sitechno.com/Blog/WorkflowVersioningOfLongRunningProcessesSucksHereIsMyTakeOnIt.aspx"&gt;http://www.sitechno.com/Blog/WorkflowVersioningOfLongRunningProcessesSucksHereIsMyTakeOnIt.aspx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.imason.com/aggbug.aspx?PostID=427" width="1" height="1"&gt;</description><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/Windows+Workflow+Foundation/default.aspx">Windows Workflow Foundation</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/State+Machine+Workflow/default.aspx">State Machine Workflow</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/.NET/default.aspx">.NET</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/technical/default.aspx">technical</category></item><item><title>NAnt, SharePoint and Production Deployments</title><link>http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/2009/02/03/nant-sharepoint-and-production-deployments.aspx</link><pubDate>Tue, 03 Feb 2009 21:58:38 GMT</pubDate><guid isPermaLink="false">ba1d72eb-a51c-4157-8cec-718d26de3334:315</guid><dc:creator>James Schwartz</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.imason.com/imason_Blogs/b/jim_schwartz/rsscomments.aspx?WeblogPostID=315</wfw:commentRss><comments>http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/2009/02/03/nant-sharepoint-and-production-deployments.aspx#comments</comments><description>&lt;p&gt;On my current SharePoint/InfoPath project, we’re using NAnt to deploy absolutely everything. NAnt creates SharePoint pages, imports web parts to pages, activates SharePoint features, deploys assemblies, creates SharePoint lists, creates/updates SQL databases (via &lt;a href="http://dbdeploy.com/"&gt;DBDeploy&lt;/a&gt;), &lt;a href="http://www.imason.com/blogs/jim_schwartz/archive/2008/08/19/automated-publishing-of-infopath-forms-part-2-of-2.aspx"&gt;packages and deploys InfoPath forms&lt;/a&gt;, copies XSLT/XML/ASPX files, and much much more.&lt;/p&gt;  &lt;p&gt;I always boast about how when a new developer comes on the project, he/she can have a fully operational SharePoint development environment within minutes. This is an important achievement, as most SharePoint Developers know it can be painful to automate deployments to SharePoint sites.&lt;/p&gt;  &lt;p&gt;This works great for a Development environment, but what happens when you need to deploy to Production? Some companies don’t allow NAnt to be executed directly in Production, so you’ll need to setup your NAnt build files to execute on a build server to prepare for a Production deployment.&lt;/p&gt;  &lt;p&gt;To achieve this, I went back into my NAnt build file and updated my NAnt targets to allow for the “preparation” of a deployment rather than actually performing the deployment. This provides us the ability to run NAnt on a build server in order to package everything for an easy automated deployment in Production (without NAnt).&lt;/p&gt;  &lt;p&gt;I’m leveraging &lt;a href="http://wix.sourceforge.net/"&gt;Windows Installer XML&lt;/a&gt; (WiX) in order to package the deployment files into MSI packages (In a future post I’ll get into more detail about using WiX MSI’s for SharePoint deployments). For SharePoint feature installation/activations and InfoPath form deployments I’m generating a batch file from NAnt that gets packaged into the MSI and executed when the MSI is installed on the server.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;First we prepare the batch files&lt;/strong&gt; – this will create 3 new empty batch files with a line “ECHO OFF” inside them:&lt;/p&gt;   &lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;"&gt;   &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;     &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; &amp;lt;target name=&lt;span style="color:#006080;"&gt;&amp;quot;PrepareBatchFiles&amp;quot;&lt;/span&gt;&amp;gt; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt;     &amp;lt;echo file =&lt;span style="color:#006080;"&gt;&amp;quot;${featuresDeployment.cmd}&amp;quot;&lt;/span&gt; append=&lt;span style="color:#006080;"&gt;&amp;quot;true&amp;quot;&lt;/span&gt; message=&lt;span style="color:#006080;"&gt;&amp;quot;ECHO OFF&amp;quot;&lt;/span&gt; /&amp;gt; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt;     &amp;lt;echo file =&lt;span style="color:#006080;"&gt;&amp;quot;${formsDeployment.cmd}&amp;quot;&lt;/span&gt; append=&lt;span style="color:#006080;"&gt;&amp;quot;true&amp;quot;&lt;/span&gt; message=&lt;span style="color:#006080;"&gt;&amp;quot;ECHO OFF&amp;quot;&lt;/span&gt; /&amp;gt; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;     &amp;lt;echo file =&lt;span style="color:#006080;"&gt;&amp;quot;${dataConnectionsDeployment.cmd}&amp;quot;&lt;/span&gt; append=&lt;span style="color:#006080;"&gt;&amp;quot;true&amp;quot;&lt;/span&gt; message=&lt;span style="color:#006080;"&gt;&amp;quot;ECHO OFF&amp;quot;&lt;/span&gt; /&amp;gt; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt; &amp;lt;/target&amp;gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:#a31515;line-height:115%;font-family:&amp;#39;Courier New&amp;#39;;mso-no-proof:yes;"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next, we append STSADM calls to the batch files – &lt;/strong&gt;anytime we call STSADM from NAnt, we will add a row into the batch file. Here’s an example when we’re calling the “UploadForm” NAnt target:&lt;/p&gt;

&lt;p class="MsoNormal" style="margin-bottom:0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Courier New&amp;#39;;mso-no-proof:yes;"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;"&gt;
  &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;
    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; &amp;lt;target name=&lt;span style="color:#006080;"&gt;&amp;quot;UploadFormTemplate&amp;quot;&lt;/span&gt; description=&lt;span style="color:#006080;"&gt;&amp;quot;Uploads an InfoPath Form&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt;     &amp;lt;choose&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt;         &amp;lt;when test=&lt;span style="color:#006080;"&gt;&amp;quot;${prepareDeployment==&amp;#39;true&amp;#39;}&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;             &amp;lt;echo file=&lt;span style="color:#006080;"&gt;&amp;quot;${formDeploymentBatchFile}&amp;quot;&lt;/span&gt; append=&lt;span style="color:#006080;"&gt;&amp;quot;true&amp;quot;&lt;/span&gt; message=&lt;span style="color:#006080;"&gt;&amp;quot;echo Attempting to upload form template &amp;#39;${formName}.xsn&amp;#39;&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt;             &amp;lt;echo file=&lt;span style="color:#006080;"&gt;&amp;quot;${formDeploymentBatchFile}&amp;quot;&lt;/span&gt; append=&lt;span style="color:#006080;"&gt;&amp;quot;true&amp;quot;&lt;/span&gt; message=&lt;span style="color:#006080;"&gt;&amp;quot;${stsadm.exe} -o uploadformtemplate -filename &amp;amp;quot;${deploymentFolder}\Forms\${formName}.xsn&amp;amp;quot;&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   6:&lt;/span&gt;         &amp;lt;/when&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   7:&lt;/span&gt;         &amp;lt;otherwise&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   8:&lt;/span&gt;             &amp;lt;exec program=&lt;span style="color:#006080;"&gt;&amp;quot;${stsadm.exe}&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   9:&lt;/span&gt;                 &amp;lt;arg line=&lt;span style="color:#006080;"&gt;&amp;quot;-o uploadformtemplate&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  10:&lt;/span&gt;                 &amp;lt;arg line=&lt;span style="color:#006080;"&gt;&amp;quot;-filename &amp;amp;quot;${publishedFormsFolder}${formName}.xsn&amp;amp;quot;&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  11:&lt;/span&gt;             &amp;lt;/exec&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  12:&lt;/span&gt;         &amp;lt;/otherwise&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  13:&lt;/span&gt;     &amp;lt;/choose&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  14:&lt;/span&gt; &amp;lt;/target&amp;gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;You can see from the NAnt target above that&amp;#160; it checks whether we’re “Preparing” a deployment or if we’re actually deploying. If we’re preparing the deployment, it will generate batch files and copy files to a deployment folder. I’ve added the &lt;strong&gt;“choose –&amp;gt; while”&lt;/strong&gt; condition into each NAnt target so that I can prepare my deployment files for the MSI.&lt;/p&gt;

&lt;p&gt;The generated batch file will look something like this:&lt;/p&gt;

&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;"&gt;
  &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;
    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; SET STSADM=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.exe&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt; ECHO OFF&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt; &amp;quot;%STSADM%&amp;quot; -o deactivateformtemplate -url http://sharepoint-serv -filename &amp;quot;C:\MyForms\MyInfoPathForm.xsn&amp;quot;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt; &amp;quot;%STSADM%&amp;quot; -o removeformtemplate -filename &amp;quot;C:\MyForms\MyInfoPathForm.xsn&amp;quot;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt; &amp;quot;%STSADM%&amp;quot; -o execadmsvcjobs&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   6:&lt;/span&gt; ECHO Attempting to upload form template &amp;#39;MyInfoPathForm.xsn&amp;#39;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   7:&lt;/span&gt; &amp;quot;%STSADM%&amp;quot; -o uploadformtemplate -filename &amp;quot;C:\MyForms\MyInfoPathForm.xsn&amp;quot;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   8:&lt;/span&gt; &amp;quot;%STSADM%&amp;quot; -o execadmsvcjobs&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   9:&lt;/span&gt; &amp;quot;%STSADM%&amp;quot; -o activateformtemplate -url http://sharepoint-serv -filename &amp;quot;C:\MyForms\MyInfoPathForm.xsn&amp;quot;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Now when I add a new form to be deployed, it will be automatically added to the batch file for the Production deployment. The end result is that I can run my NAnt scripts on a development environment to actually deploy my SharePoint components, or I can run the same batch scripts on a Production server via an MSI package. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.imason.com/aggbug.aspx?PostID=315" width="1" height="1"&gt;</description><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/NAnt/default.aspx">NAnt</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/InfoPath+2007/default.aspx">InfoPath 2007</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/technical/default.aspx">technical</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/Automation/default.aspx">Automation</category></item><item><title>Advanced InfoPath Development with SharePoint</title><link>http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/2009/01/25/advanced-infopath-development-with-sharepoint.aspx</link><pubDate>Sun, 25 Jan 2009 15:13:00 GMT</pubDate><guid isPermaLink="false">ba1d72eb-a51c-4157-8cec-718d26de3334:238</guid><dc:creator>James Schwartz</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.imason.com/imason_Blogs/b/jim_schwartz/rsscomments.aspx?WeblogPostID=238</wfw:commentRss><comments>http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/2009/01/25/advanced-infopath-development-with-sharepoint.aspx#comments</comments><description>&lt;p&gt;Thanks to everyone who made it out to our Advanced InfoPath Development session yesterday at the &lt;a href="http://www.torontosharepointcamp.com/Pages/Default.aspx"&gt;Toronto SharePoint Camp&lt;/a&gt;. We had quite a good turnout; so I&amp;rsquo;m glad to see there are lots of other people out there using browser-based InfoPath forms using Forms Services on SharePoint.&lt;/p&gt;
&lt;p&gt;InfoPath makes it easy to quickly develop forms, but it doesn&amp;rsquo;t come without its limitations. It&amp;rsquo;s very heavy on JavaScript, thus performance isn&amp;rsquo;t great when you have a lot of fields and rules. It doesn&amp;rsquo;t support multilingual, and it&amp;rsquo;s not very good at field validation. In this session we showed the audience how to get around these limitations by writing some simple C# code.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve posted the PowerPoint slides as well as the source code for the InfoPath form, the Web Service, the Web Part, and the NAnt XML build definition.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re interested in learning more about NAnt, send me an e-mail because I&amp;rsquo;m thinking about organizing a NAnt lunch and learn session at the imason office open to all Developers. We&amp;rsquo;re located in downtown Toronto on Adelaide Street near Peter St. &lt;/p&gt;
&lt;p&gt;Download the source code (&lt;a href="http://www.imason.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jim_5F00_schwartz.SharePointCamp/SharePointCamp.zip"&gt;SharePointCamp.zip&lt;/a&gt;), and PowerPoint slides (&lt;a href="http://www.imason.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jim_5F00_schwartz.SharePointCamp/SharePointCamp_2D00_2009.pptx"&gt;SharePointCamp-2009.pptx&lt;/a&gt;) here.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.imason.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jim_5F00_schwartz.SharePointCamp/SharePointCamp_2D00_2009.pptx"&gt;&lt;img title="image" style="border:0pt none;display:inline;" alt="image" src="http://www.imason.com/img/blogs/image3_5F00_54C0F77D.png" height="250" width="332" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.imason.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jim_5F00_schwartz.SharePointCamp/SharePointCamp.zip"&gt;&lt;img title="image" style="border:0pt none;display:inline;" alt="image" src="http://www.imason.com/img/blogs/image_5F00_09AA68D7.png" height="283" width="218" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.imason.com/aggbug.aspx?PostID=238" width="1" height="1"&gt;</description><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/InfoPath+2007/default.aspx">InfoPath 2007</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/.NET/default.aspx">.NET</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/Toronto+SharePoint+Camp/default.aspx">Toronto SharePoint Camp</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/technical/default.aspx">technical</category></item><item><title>Toronto SharePoint Camp 2009</title><link>http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/2009/01/22/toronto-sharepoint-camp-2009.aspx</link><pubDate>Thu, 22 Jan 2009 02:18:00 GMT</pubDate><guid isPermaLink="false">ba1d72eb-a51c-4157-8cec-718d26de3334:222</guid><dc:creator>James Schwartz</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.imason.com/imason_Blogs/b/jim_schwartz/rsscomments.aspx?WeblogPostID=222</wfw:commentRss><comments>http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/2009/01/22/toronto-sharepoint-camp-2009.aspx#comments</comments><description>&lt;p&gt;On Saturday, January 24th, four of us from imason will be presenting at the 2009 Toronto SharePoint Camp at the Manulife Corporate Headquarters @ 200 Bloor St. East. If you&amp;rsquo;d like to come out to see our sessions, &lt;a href="http://www.torontosharepointcamp.com/Pages/Default.aspx"&gt;register here&lt;/a&gt;. There will be lots of free giveaways and prizes. Here are some details about our sessions:&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span style="font-size:small;"&gt;Upgrading your SharePoint platform from WSS 2.0 to WSS 3.0/MOSS 2007&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;b&gt;&lt;a href="http://www.torontosharepointcamp.com/Lists/Speakers/Speaker.aspx?ID=28"&gt;Bob Brown&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;img title="bobbrown" style="border:0pt none;display:inline;" alt="bobbrown" src="http://www.imason.com/img/blogs/bobbrown_5F00_thumb_5F00_47068A20.jpg" height="154" width="111" /&gt; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;Time:&amp;nbsp;&amp;nbsp; &lt;/b&gt;9:00 AM to 10:15 AM&lt;b&gt;&amp;nbsp; Room: &lt;/b&gt; Holmes B&lt;/p&gt;
&lt;p&gt;With SharePoint 2007 taking on widespread adoption, many enterprises are starting to take advantage of the new and improved features of the new platform; but what about administrators and developers that are still supporting a growing business critical SharePoint 2003 environment and have been assigned the daunting task of upgrading? There seems to be an endless list of things to take into account before taking the plunge and upgrading.&lt;/p&gt;
&lt;p&gt;In this session, I will walk through how to assess your system to make an educated migration path decision, draw up the high level upgrade steps, and then dig in on some specific snags you&amp;#39;ll likely encounter (including custom web parts, FrontPage and unghosted pages, broken permissions, site themes, and legacy templates)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;b&gt;&lt;span style="text-decoration:underline;"&gt;Advanced InfoPath development with SharePoint&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a href="http://www.imason.com/members/jschwartz/default.aspx"&gt;Jim Schwartz&lt;/a&gt; &amp;amp; &lt;a href="http://www.imason.com/members/btsolov/default.aspx"&gt;Boyan Tsolov&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;img title="jimschwartz" style="border:0pt none;display:inline;" alt="jimschwartz" src="http://www.imason.com/img/blogs/jimschwartz_5F00_thumb_5F00_5876EAF8.jpg" height="120" width="94" /&gt;&amp;nbsp;&lt;img title="boyantsolov" style="border:0pt none;display:inline;" alt="boyantsolov" src="http://www.imason.com/img/blogs/boyantsolov_5F00_462E2436.jpg" height="151" width="105" /&gt; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;Time:&amp;nbsp;&amp;nbsp; &lt;/b&gt;2:30 PM to 3:45 PM&lt;b&gt;&amp;nbsp; Room: &lt;/b&gt; International B&amp;amp;C&lt;/p&gt;
&lt;p&gt;InfoPath 2007 has many limitations and doesn&amp;rsquo;t scale very well with complex forms. Using a custom solution built on SharePoint, we&amp;rsquo;ve extended InfoPath to support very complicated form functionality. In this session, we will describe to you how we overcame several InfoPath limitations, including multilingual support, pre-populating form data, field validation, and support a flow between several forms.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span style="font-size:small;"&gt;Effective Deployment of SharePoint Publishing Sites&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;b&gt;&lt;a href="http://www.torontosharepointcamp.com/Lists/Speakers/Speaker.aspx?ID=29"&gt;Ivan Neganov&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;img title="ivanneganov" style="border:0pt none;display:inline;" alt="ivanneganov" src="http://www.imason.com/img/blogs/ivanneganov_5F00_thumb_5F00_774D5ED6.jpg" height="153" width="128" /&gt; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;Time:&amp;nbsp;&amp;nbsp; &lt;/b&gt;4:00 PM to 5:15 PM&lt;b&gt;&amp;nbsp; Room: &lt;/b&gt; Holmes B&lt;/p&gt;
&lt;p&gt;SharePoint implementation presents many challenges to development teams with deployment often viewed as an area of the primary complexity and importance.&lt;/p&gt;
&lt;p&gt;Over time we have accumulated a rich set of utilities which allow deploying SharePoint sites in a fully unattended fashion or close to it, by using custom logic interacting with SharePoint API.&lt;/p&gt;
&lt;p&gt;Efficiency of deployment has a dramatic impact on practical aspects of agile and team development using SharePoint, which makes us invest in building comprehensive tools for SharePoint deployment.&lt;/p&gt;
&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.imason.com/aggbug.aspx?PostID=222" width="1" height="1"&gt;</description><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/InfoPath+2007/default.aspx">InfoPath 2007</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/Toronto+SharePoint+Camp/default.aspx">Toronto SharePoint Camp</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/atimason/default.aspx">atimason</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/conference/default.aspx">conference</category></item><item><title>Repeating a State Machine Activity Indefinitely</title><link>http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/2008/12/15/repeating-a-state-machine-activity-indefinitely.aspx</link><pubDate>Mon, 15 Dec 2008 19:30:00 GMT</pubDate><guid isPermaLink="false">ba1d72eb-a51c-4157-8cec-718d26de3334:196</guid><dc:creator>James Schwartz</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.imason.com/imason_Blogs/b/jim_schwartz/rsscomments.aspx?WeblogPostID=196</wfw:commentRss><comments>http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/2008/12/15/repeating-a-state-machine-activity-indefinitely.aspx#comments</comments><description>&lt;p&gt;While working on my .NET State Machine workflow today, I ran into an issue: I wanted to send an e-mail to a user every XX days to remind them to finish filling out a form, and I wanted those e-mails to continue being sent until the form had been filled out.&lt;/p&gt;
&lt;p&gt;At first I thought this would be a simple &lt;b&gt;While Activity&lt;/b&gt; with a &lt;b&gt;Delay Activity&lt;/b&gt; timer inside it, but a &lt;b&gt;Delay Activity&lt;/b&gt; has some limitations: I originally added it to my &lt;b&gt;StateInitialization Activity&lt;/b&gt;, but it can&amp;rsquo;t be used inside a &lt;b&gt;StateInitialization Activity&lt;/b&gt; because it inherits the &lt;b&gt;IEventActivity&lt;/b&gt; interface. This also means that you can only use a &lt;b&gt;Delay Activity&lt;/b&gt; as the &lt;b&gt;&lt;span style="text-decoration:underline;"&gt;first&lt;/span&gt;&lt;/b&gt; Activity in an &lt;b&gt;EventDriven Activity&lt;/b&gt;, which prevents you from putting a &lt;b&gt;Delay Activity&lt;/b&gt; inside a While loop.&lt;/p&gt;
&lt;p&gt;So I took a quick look at other people running into the same issue and found this &lt;a href="http://social.msdn.microsoft.com/forums/en-US/windowsworkflowfoundation/thread/0f46d0fa-e79e-4eb0-8cf7-afb19ef77585/"&gt;user group discussion&lt;/a&gt;, but I didn&amp;rsquo;t see any viable solution for repeating the &lt;b&gt;Delay Activity&lt;/b&gt; indefinitely. &lt;/p&gt;
&lt;p&gt;So to solve this, I added a new &lt;b&gt;EventDriven Activity&lt;/b&gt; to my State Activity and set the &lt;b&gt;Delay Activity&lt;/b&gt; as the first Activity in the EventDriven Activity. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.imason.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jim_5F00_schwartz/clip_5F00_image002_5F00_1F0F0B7D.jpg"&gt;&lt;img src="http://www.imason.com/img/blogs/clip_5F00_image002_5F00_thumb_5F00_497B3C9A.jpg" alt="clip_image002" style="border:0pt none;display:inline;" title="clip_image002" height="78" width="244" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then I added an &lt;b&gt;IfElse Activity&lt;/b&gt; to check if the form had been filled out or not. If the form is filled out, I change the state to &amp;ldquo;CompleteState&amp;rdquo;. But if the form hasn&amp;rsquo;t been filled out, I set it back to the current state which will re-trigger the &lt;b&gt;EventDriven Activity&lt;/b&gt;, thus re-starting the Delay timer. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.imason.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jim_5F00_schwartz/clip_5F00_image004_5F00_62770CDF.jpg"&gt;&lt;img src="http://www.imason.com/img/blogs/clip_5F00_image004_5F00_thumb_5F00_3E51B250.jpg" alt="clip_image004" style="border:0pt none;display:inline;" title="clip_image004" height="244" width="183" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It will continue this loop until the form is filled out, sending an e-mail every time it executes. This is exactly the functionality I was looking for, but the approach to accomplish this was slightly different than I had expected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.imason.com/aggbug.aspx?PostID=196" width="1" height="1"&gt;</description><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/Windows+Workflow+Foundation/default.aspx">Windows Workflow Foundation</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/State+Machine+Workflow/default.aspx">State Machine Workflow</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/.NET/default.aspx">.NET</category><category domain="http://www.imason.com/imason_Blogs/b/jim_schwartz/archive/tags/technical/default.aspx">technical</category></item></channel></rss>