<?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>Code Eater (Wael A. Kabli) : workflow</title><link>http://blogs.msdn.com/wael/archive/tags/workflow/default.aspx</link><description>Tags: workflow</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Business Process Automation, a story to tell</title><link>http://blogs.msdn.com/wael/archive/2008/10/28/business-process-automation-a-story-to-tell.aspx</link><pubDate>Tue, 28 Oct 2008 09:00:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9019741</guid><dc:creator>Wael A. Kabli</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/wael/comments/9019741.aspx</comments><wfw:commentRss>http://blogs.msdn.com/wael/commentrss.aspx?PostID=9019741</wfw:commentRss><wfw:comment>http://blogs.msdn.com/wael/rsscomments.aspx?PostID=9019741</wfw:comment><description>&lt;h2&gt;&lt;a name="_Toc208656359"&gt;eFroms solution Components&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;The eForms solution is a result of collaborating the following components all together:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/wael/WindowsLiveWriter/BusinessProcessAutomationastorytotell_7E81/clip_image002_2.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" border="0" hspace="12" alt="clip_image002" src="http://blogs.msdn.com/blogfiles/wael/WindowsLiveWriter/BusinessProcessAutomationastorytotell_7E81/clip_image002_thumb.jpg" width="235" height="244"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;· Microsoft Office SharePoint Server 2007 Infrastructure. &lt;p&gt;· &lt;b&gt;Form Site (Portal)&lt;/b&gt;: a SharePoint Site that hosts the whole solution and enabling this kind of integration. &lt;p&gt;· &lt;b&gt;Email&lt;/b&gt;: a mail services that will send notifications within the workflows. &lt;p&gt;· &lt;b&gt;Forms Template&lt;/b&gt;: This is the from that contains the target process. This is were you usually take a paper form or a manual process analyze, break-down and make an e-form out of it. In this solution we use Microsoft Office InfoPath 2007 in implement eForms or you can use APS.NET forms. &lt;p&gt;· &lt;b&gt;Workflow&lt;/b&gt;: a component that is installed in the SharePoint that will contain the actual business process. &lt;p&gt;· &lt;b&gt;Workflow Tasks&lt;/b&gt;: This is a SharePoint list that contains the tasks created by the workflow. A Task simply replaces a stage of a human task in the process (like an approval, signatures or a configuration). &lt;p&gt;· &lt;b&gt;Security: &lt;/b&gt;to provide non-repudiation, data integrity and origin.  &lt;p&gt;· &lt;b&gt;Workflow History:&lt;/b&gt; This is a SharePoint list that stores the workflow logs. This includes cancellations, rejections, approvals and other workflow state transitions. &lt;p&gt;· &lt;b&gt;Web Services:&lt;/b&gt; are set of services that will aid the solution in performing certain tasks such as getting user profiles from Active Directory and get the workflow logs to show a workflow history and maybe getting integrated with other services like Primavera for example. &lt;p&gt;· &lt;b&gt;Other Lists:&lt;/b&gt; some forms depend on few SharePoint List to do some lookups on them. &lt;p&gt;· &lt;b&gt;Archive:&lt;/b&gt; This is where the submitted form get stored which is basically a document or form library. &lt;h2&gt;The flow of a workflow!&lt;/h2&gt; &lt;p&gt;The story begins when a user find a link on the &lt;strong&gt;&lt;u&gt;portal &lt;/u&gt;&lt;/strong&gt;saying ( click here to fill XYZ form ). The link is actually pointing to the &lt;strong&gt;&lt;u&gt;form template &lt;/u&gt;&lt;/strong&gt;(which has the extension xsn) if you are using InfoPath. When he clicks on it, he will be redirected to the InfoPath Forms Server 2007 that is in Microsoft Office SharePoint Server2007 and it will render the form template (xsn) to be displayed on the web browser.&lt;/p&gt; &lt;p&gt;As soon as the form opens, the form had few rules inside it that will communicate with a &lt;strong&gt;&lt;u&gt;web service &lt;/u&gt;&lt;/strong&gt;to get the current user credentials from AD.&lt;/p&gt; &lt;p&gt;The user now will fill the form and submit which will actually will save this form in (XML) format in a document library or a form library for &lt;strong&gt;&lt;u&gt;archiving&lt;/u&gt;&lt;/strong&gt;. &lt;/p&gt; &lt;p&gt;As soon as this form is submitted, a &lt;strong&gt;&lt;u&gt;workflow &lt;/u&gt;&lt;/strong&gt;will run to follow the business process creating &lt;strong&gt;&lt;u&gt;tasks &lt;/u&gt;&lt;/strong&gt;to the people who are suppose to process that form (like a manager task to approve that form) and sending &lt;strong&gt;&lt;u&gt;emails&lt;/u&gt;&lt;/strong&gt; to the corresponding people to perform their tasks. the workflow will leave its foot prints on the &lt;strong&gt;&lt;u&gt;history&lt;/u&gt;&lt;/strong&gt;, so any time the user (or any body) can open the history and look what happened to the process, which task has been completed and what tasks are still pending. &lt;/p&gt; &lt;p&gt;The &lt;strong&gt;&lt;u&gt;security &lt;/u&gt;&lt;/strong&gt;model in SharePoint is taking care of who should see what and who can do something. Once the workflow is finished, it will indicate its state such as (Approved or Rejected by Manager or just completed).&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9019741" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/wael/archive/tags/Wss/default.aspx">Wss</category><category domain="http://blogs.msdn.com/wael/archive/tags/ACtive+Directory/default.aspx">ACtive Directory</category><category domain="http://blogs.msdn.com/wael/archive/tags/IP/default.aspx">IP</category><category domain="http://blogs.msdn.com/wael/archive/tags/InfoPath/default.aspx">InfoPath</category><category domain="http://blogs.msdn.com/wael/archive/tags/AD/default.aspx">AD</category><category domain="http://blogs.msdn.com/wael/archive/tags/workflow/default.aspx">workflow</category><category domain="http://blogs.msdn.com/wael/archive/tags/webServices/default.aspx">webServices</category><category domain="http://blogs.msdn.com/wael/archive/tags/_34064A063106280648064A0646062A06_/default.aspx">شيربوينت</category><category domain="http://blogs.msdn.com/wael/archive/tags/sharepoint/default.aspx">sharepoint</category><category domain="http://blogs.msdn.com/wael/archive/tags/Task+form/default.aspx">Task form</category></item><item><title>Workflow "Failed on Start (retrying)"</title><link>http://blogs.msdn.com/wael/archive/2008/01/11/workflow-failed-on-start-retrying.aspx</link><pubDate>Fri, 11 Jan 2008 05:12:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7065768</guid><dc:creator>Wael A. Kabli</dc:creator><slash:comments>20</slash:comments><comments>http://blogs.msdn.com/wael/comments/7065768.aspx</comments><wfw:commentRss>http://blogs.msdn.com/wael/commentrss.aspx?PostID=7065768</wfw:commentRss><wfw:comment>http://blogs.msdn.com/wael/rsscomments.aspx?PostID=7065768</wfw:comment><description>&lt;p&gt;Oh!! its SharePoint again :). One of these small things in this beast which makes you bang your head and pull your hear again and again if you don't get it right. Now lucky you you can search this issue and find the solution.&lt;/p&gt; &lt;p&gt;Debugging in SharePoint is very tricky sometimes because you get all of these levels to run around (GAC + IIS + Deployment Folder under the feature + Feature.xml + Workflow.xml + SharePoint itself + InfoPath the main form template + InfoPath the workflow forms&amp;nbsp;and &amp;nbsp;Web Services) so after this, it is not strange that you would start pulling your hear after a while.&lt;/p&gt; &lt;h1&gt;Problem Description:&lt;/h1&gt; &lt;p&gt;if you try any workflow (including OOB WF and Custom WF) and when you try to start it, it will show the message Workflow "Failed on Start (retrying)". You may also see that some tasks in the WF are created and even so it fails.&lt;/p&gt; &lt;p&gt;Tip: whenever you are stuck with your custom workflow, try having the OOB, if it doesn't run, its not your problem. (i spent one complete day almost 20H just to discover its not my fault).&lt;/p&gt; &lt;p&gt;One Proof that this thing its not your custom code problem, if you attach the WF process to Visual Studio, it will not catch any exception.&lt;/p&gt; &lt;h1&gt;Reasoning:&lt;/h1&gt; &lt;p&gt;In WSS/MOSS the workflow engine will report back 'a workflow failed to start' even if the workflow did start. &lt;p&gt;The reason why is that - the workflow will be sent the 'OnWorkflowActivated' event (start command) and essentially as far as MOSS is concerned - it's starting. &lt;p&gt;When the workflow for e.g. writes a task item and then waits (handleExternal Event) for the OnTaskChanged event. At this point if it failed - a different error other than 'failed to start' would be reported. &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt; &lt;h1&gt;Resolution:&lt;/h1&gt; &lt;ul&gt; &lt;li&gt;First and importantly check all your correlation tokens. make sure that each task (Creation, Updating and Completing) has its own Token not the workflow token.&lt;/li&gt; &lt;li&gt;Then compare the dll you have with theone in the workflow.xml and the one in the GAC. simply they all should be the same.&lt;/li&gt; &lt;li&gt;Try this on the command prompt: Lodctr "c:\Windows\Microsoft.Net\Framework\v3.0\Windows Workflow Foundation\perfcounters.ini"&lt;/li&gt; &lt;li&gt;And if it doesn't work for you try: Lodctr /R "c:\Windows\Microsoft.Net\Framework\v3.0\Windows Workflow Foundation\perfcounters.ini"&lt;/li&gt;&lt;/ul&gt; &lt;h1&gt;Some Links might Help:&lt;/h1&gt; &lt;p&gt;&lt;a title="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2268844&amp;amp;SiteID=1" href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2268844&amp;amp;SiteID=1"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2268844&amp;amp;SiteID=1&lt;/a&gt;&lt;/p&gt; &lt;h1&gt;Some errors you might see in logs:&lt;/h1&gt; &lt;ul&gt; &lt;li&gt;The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly.&lt;/li&gt; &lt;li&gt;Failed on Start (retrying).&lt;/li&gt; &lt;li&gt;&lt;em&gt;Unexpected&amp;nbsp;&amp;nbsp;&amp;nbsp; Load Workflow Class: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---&amp;gt; System.InvalidOperationException: The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Diagnostics.PerformanceCounter.Initialize()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName, String instanceName, Boolean readOnly)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Workflow.Runtime.PerformanceCounterManager.CreateCounters(String name)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Workflow.Runtime.Hosting.DefaultWorkflowSchedulerService.OnStarted()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Workflow.Runtime.Hosting.WorkflowRuntimeService.HandleStarted(Object source, WorkflowRuntimeEventArgs e)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.EventHandler`1.Invoke(Object sender, TEventArgs e)...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;01/11/2008 03:33:24.79*&amp;nbsp;&amp;nbsp;&amp;nbsp; w3wp.exe (0x12B4)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0E9C&amp;nbsp;&amp;nbsp;&amp;nbsp; Windows SharePoint Services&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Workflow Infrastructure&lt;/em&gt;&lt;/li&gt; &lt;li&gt;Unexpected&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Workflow.Runtime.WorkflowRuntime.StartRuntime()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.SharePoint.Workflow.SPWinOeHostServices..ctor(SPSite site, SPWeb web, SPWorkflowManager manager, SPWorkflowEngine engine)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --- End of inner exception stack trace ---&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct&amp;amp; signature, IntPtr declaringType)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Ac...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;01/11/2008 03:33:24.79*&amp;nbsp;&amp;nbsp;&amp;nbsp; w3wp.exe (0x12B4)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0E9C&amp;nbsp;&amp;nbsp;&amp;nbsp; Windows SharePoint Services&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Workflow Infrastructure&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 72fu&amp;nbsp;&amp;nbsp;&amp;nbsp; Unexpected&amp;nbsp;&amp;nbsp;&amp;nbsp; ...tivator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.SharePoint.Workflow.SPWorkflowManager.LoadPluggableClass(String classname, String assembly, Object[] parameters)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;01/11/2008 03:33:24.80&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; w3wp.exe (0x12B4)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0E9C&amp;nbsp;&amp;nbsp;&amp;nbsp; Windows SharePoint Services&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Workflow Infrastructure&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7065768" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/wael/archive/tags/Wss/default.aspx">Wss</category><category domain="http://blogs.msdn.com/wael/archive/tags/MOSS/default.aspx">MOSS</category><category domain="http://blogs.msdn.com/wael/archive/tags/workflow/default.aspx">workflow</category><category domain="http://blogs.msdn.com/wael/archive/tags/workarounds/default.aspx">workarounds</category><category domain="http://blogs.msdn.com/wael/archive/tags/sharepoint/default.aspx">sharepoint</category></item><item><title>Attachments in InfoPath Form that is a Task Workflow</title><link>http://blogs.msdn.com/wael/archive/2007/12/26/attachments-in-infopath-form-that-is-a-task-workflow.aspx</link><pubDate>Wed, 26 Dec 2007 11:49:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6867949</guid><dc:creator>Wael A. Kabli</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/wael/comments/6867949.aspx</comments><wfw:commentRss>http://blogs.msdn.com/wael/commentrss.aspx?PostID=6867949</wfw:commentRss><wfw:comment>http://blogs.msdn.com/wael/rsscomments.aspx?PostID=6867949</wfw:comment><description>&lt;p&gt;Woho, here is a nice one :), one of the small things that gets you sometimes bang your head for long long time till you find out what's the problem...&lt;/p&gt; &lt;h2&gt;Symptoms:&lt;/h2&gt; &lt;p&gt;So if you are having a workflow that uses InfoPath forms for tasks and you have attachment controls in it, then you probably faced this error: "The Selected file was not found"!!&lt;/p&gt; &lt;h2&gt;Solution or Workaround:&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;Locate the ASPX page that your workflow form opens up in the _layouts directory on your server.&lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p&gt;e.g., %Program Files%Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\ &lt;p&gt;most probably you want WrkTaskIP.aspx --&amp;gt; this page is the one that loads your InfoPath form to be as a task form.&lt;/p&gt;&lt;/blockquote&gt; &lt;ul&gt; &lt;li&gt;in this aspx page, locate the reference to MasterPageFile. This will look something like &lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p&gt;MasterPageFile="~/_layouts/application.master"&lt;/p&gt;&lt;/blockquote&gt; &lt;ul&gt; &lt;li&gt;Go to the masterPage file you found&lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p&gt;In this case go to the application.master in the folder "%Program Files%Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\"&lt;/p&gt;&lt;/blockquote&gt; &lt;ul&gt; &lt;li&gt;Look for the Form Tag &lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p&gt;&amp;lt;form runat="server" onsubmit="return _spFormOnSubmitWrapper();"&amp;gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;ul&gt; &lt;li&gt;Add the attribute enctype="multipart/form-data" &amp;nbsp;to this tag and save.&lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p&gt;&amp;lt;form runat="server" onsubmit="return _spFormOnSubmitWrapper();" enctype="multipart/form-data"&amp;gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;ul&gt; &lt;li&gt;iisreset and try your workflow with file attachment again.&lt;/li&gt;&lt;/ul&gt; &lt;h2&gt;Few things to Note:&lt;/h2&gt; &lt;p&gt;as you can see, this is a product issue and hopefully it might be fixed in the SP1. But don't get frustrated, that's why we are blogging so you can find such information.&lt;/p&gt; &lt;p&gt;Have fun,,, :)&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6867949" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/wael/archive/tags/MOSS/default.aspx">MOSS</category><category domain="http://blogs.msdn.com/wael/archive/tags/InfoPath/default.aspx">InfoPath</category><category domain="http://blogs.msdn.com/wael/archive/tags/workflow/default.aspx">workflow</category><category domain="http://blogs.msdn.com/wael/archive/tags/workarounds/default.aspx">workarounds</category><category domain="http://blogs.msdn.com/wael/archive/tags/sharepoint/default.aspx">sharepoint</category><category domain="http://blogs.msdn.com/wael/archive/tags/product+issue/default.aspx">product issue</category><category domain="http://blogs.msdn.com/wael/archive/tags/Task+form/default.aspx">Task form</category><category domain="http://blogs.msdn.com/wael/archive/tags/The+Selected+file+was+not+found/default.aspx">The Selected file was not found</category></item><item><title>To Create Workflow Association and Initiation Forms (Windows SharePoint Services) :</title><link>http://blogs.msdn.com/wael/archive/2007/08/28/to-create-workflow-association-and-initiation-forms-windows-sharepoint-services.aspx</link><pubDate>Tue, 28 Aug 2007 15:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4610850</guid><dc:creator>Wael A. Kabli</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/wael/comments/4610850.aspx</comments><wfw:commentRss>http://blogs.msdn.com/wael/commentrss.aspx?PostID=4610850</wfw:commentRss><wfw:comment>http://blogs.msdn.com/wael/rsscomments.aspx?PostID=4610850</wfw:comment><description>&lt;P class=seeAlsoNoToggleSection mce_keep="true"&gt;&lt;STRONG&gt;&lt;SPAN id=nsrTitle&gt;To Create Workflow Association and Initiation Forms (Windows SharePoint Services)&lt;/SPAN&gt; :&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE class=seeAlsoNoToggleSection&gt;
&lt;H1 class=heading&gt;1. Specifying Association Forms&lt;/H1&gt;
&lt;P&gt;You specify a workflow's association form in the workflow template definition XML. To do this, set the value of the &lt;B&gt;AssociationURL&lt;/B&gt; attribute of the Workflow Element (Elements) element to the custom form page you want to use for workflow association. For example:&lt;/P&gt;&lt;PRE&gt;AssociationURL="MyWkflAssociationPage.aspx" &lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;H1 class=heading&gt;2. Association Form Processing&lt;/H1&gt;&lt;PRE&gt;When an administrator selects a workflow to associate with a given list, library, or content type, Windows SharePoint Services&amp;nbsp;displays the Add a New Workflow page. The administrator can use this page to specify settings common to all workflows, such as the workflow definition, initiation conditions, and whether the workflow runs on items, folders, or both.&lt;/PRE&gt;&lt;PRE&gt;Because the workflow association is not created until the custom association form is submitted, Windows SharePoint Services&amp;nbsp;also passes the following query parameters to the custom association form:&lt;/PRE&gt;&lt;PRE&gt;&amp;lt;input type="hidden" name="WorkflowDefinition" value=&amp;lt;% _STSWriteHTML(Request.Form["WorkflowDefinition"]); %&amp;gt;&amp;gt;
&amp;lt;input type="hidden" name="WorkflowName" value=&amp;lt;% _STSWriteHTML(Request.Form["WorkflowName"]); %&amp;gt;&amp;gt;
&amp;lt;input type="hidden" name="AddToStatusMenu" value=&amp;lt;% _STSWriteHTML(Request.Form["AddToStatusMenu"]); %&amp;gt;&amp;gt;
&amp;lt;input type="hidden" name="AllowManual" value=&amp;lt;% _STSWriteHTML(Request.Form["AllowManual"]); %&amp;gt;&amp;gt;
&amp;lt;input type="hidden" name="RoleSelect" value=&amp;lt;% _STSWriteHTML(Request.Form["RoleSelect"]); %&amp;gt;&amp;gt;
&amp;lt;input type="hidden" name="AutoStartCreate" value=&amp;lt;% _STSWriteHTML(Request.Form["AutoStartCreate"]); %&amp;gt;&amp;gt;
&amp;lt;input type="hidden" name="AutoStartChange" value=&amp;lt;% _STSWriteHTML(Request.Form["AutoStartChange"]); %&amp;gt;&amp;gt;
&amp;lt;input type="hidden" name="GuidAssoc" value=&amp;lt;% _STSWriteHTML(Request.Form["GuidAssoc"]); %&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;The workflow developer is responsible for programming what happens when the administrator submits changes to the form. In general, the custom workflow association form must perform the following actions:&lt;/PRE&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;Examine the value of the &lt;SPAN class=parameter&gt;GuidAssoc&lt;/SPAN&gt; parameter to determine whether the user is adding a new workflow association or editing an existing workflow association.&lt;/P&gt;
&lt;LI&gt;
&lt;P&gt;If the user is adding a new workflow association, call the AddWorkflowAssociation method to create a new workflow association.&lt;/P&gt;
&lt;LI&gt;
&lt;P&gt;If the user is editing an existing workflow association, call the &lt;B&gt;Update&lt;/B&gt; method to update that workflow association.&lt;/P&gt;
&lt;LI&gt;
&lt;P&gt;Create the task list for the workflow, if it does not already exist.&lt;/P&gt;
&lt;LI&gt;
&lt;P&gt;Use the data collected from the user to set properties of the SPWorkflowAssociation object, as appropriate.&lt;/P&gt;
&lt;LI&gt;
&lt;P&gt;Create the workflow history list, if necessary.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;BLOCKQUOTE&gt;&lt;H1 class=heading&gt;3. Specifying Initiation Forms&lt;/H1&gt;&lt;P&gt;If you want your workflow to have an initiation form, you must set the &lt;B&gt;InstantiationURL&lt;/B&gt; of the Workflow Element (Elements) element in the workflow template definition. Set this element to the form you want to use to collect the workflow initiation data, as shown in the following example.&lt;/P&gt;&lt;PRE&gt;&amp;lt;Instantiation_URL&amp;gt;MyWorkflowInitiationPage.aspx&amp;lt;/Instantiation_URL&amp;gt;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;H1 class=heading&gt;4. Initialization Form Processing&lt;/H1&gt;&lt;PRE class=heading&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;When a user starts a workflow on a specific item, Windows SharePoint Services&amp;nbsp;examines the &lt;B&gt;InstantiationURL&lt;/B&gt; of the &lt;A href="mk:@MSITStore:C:\Workarea\MOSS\MOSS%20Conf\Developer%20Resources\SDKs%20and%20Samples\WSS3sdk.chm::/html/57efcd92-6cd3-465e-af3b-12a17d6b2c35.htm"&gt;Workflow Element (Elements)&lt;/A&gt; element, in the workflow template definition, to determine the proper form to load.&lt;/PRE&gt;&lt;PRE&gt;Windows SharePoint Services&amp;nbsp;loads the specified form, passing the form the following query parameters in the URL:&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;B&gt;List&lt;/B&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;The GUID of the list to which the item belongs.&lt;/P&gt;&lt;LI&gt;&lt;P&gt;&lt;B&gt;ID&lt;/B&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;An incremental ID that represents the order in which items are added to the list.&lt;/P&gt;&lt;LI&gt;&lt;P&gt;&lt;B&gt;Source&lt;/B&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;The page from which the user started the workflow.&lt;/P&gt;&lt;LI&gt;&lt;P&gt;&lt;B&gt;TemplateID&lt;/B&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;The GUID of the workflow template.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;In addition, if you have stored custom data in the AssociationData Element (Workflow) element of the workflow definition, you can program your form to load this information as well. For example, you could use this element to store default values you want to pass to the association form when it is displayed. The &lt;A href="mk:@MSITStore:C:\Workarea\MOSS\MOSS%20Conf\Developer%20Resources\SDKs%20and%20Samples\WSS3sdk.chm::/html/878ef52b-94e2-4218-a499-56c1416340ba.htm"&gt;AssociationData Element (Workflow)&lt;/A&gt; element can contain any valid XML.&lt;/PRE&gt;&lt;PRE&gt;The workflow developer is responsible for programming what happens when the user submits changes to the page. In general, the form must perform the following actions:&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Locate the SPWorkflowManager object for the current site.&lt;/P&gt;&lt;LI&gt;&lt;P&gt;Create a new &lt;B&gt;SPWorkflowEvent&lt;/B&gt; instance.&lt;/P&gt;&lt;LI&gt;&lt;P&gt;Set the &lt;B&gt;EventData&lt;/B&gt; property of that &lt;B&gt;SPWorkflowEvent&lt;/B&gt; object to the data collected from the user.&lt;/P&gt;&lt;LI&gt;&lt;P&gt;Start the workflow by calling the StartWorkflow method, passing the appropriate &lt;B&gt;ListItem&lt;/B&gt; object, &lt;B&gt;SPWorkflowTemplate&lt;/B&gt; object, and the new &lt;B&gt;SPWorkflowEvent&lt;/B&gt; as arguments.&lt;/P&gt;&lt;LI&gt;&lt;P&gt;Return the user to the source page from which they started the workflow&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the &lt;B&gt;M:Microsoft.SharePoint.Workflow.SPWorkflowManager.StartWorkflow(Microsoft.SharePoint.SPListItem,Microsoft.SharePoint.Workflow.SPWorkflowAssociation,System.String)&lt;/B&gt; method is called, the workflow manager creates an instance of the workflow on the SharePoint item. The workflow manager then passes the data gathered using the initiation form to the &lt;B&gt;OnWorkflowActivation&lt;/B&gt; event of the workflow itself.&lt;/P&gt;&lt;P&gt;Any Windows SharePoint Services&amp;nbsp;workflow must start with an &lt;B&gt;OnWorkflowActivation&lt;/B&gt; event. The &lt;B&gt;OnWorkflowActivated activity&lt;/B&gt; contains a property, &lt;B&gt;WorkflowProperties&lt;/B&gt;, that returns an&amp;nbsp;&lt;A href="mk:@MSITStore:C:\Workarea\MOSS\MOSS%20Conf\Developer%20Resources\SDKs%20and%20Samples\WSS3sdk.chm::/html/b75f1ce8-3c86-7c68-1573-8eb963a431cb.htm"&gt;SPWorkflowActivationProperties&lt;/A&gt; object that represents the initial properties of the workflow as it starts, such as the user who added the workflow and the list and item to which the workflow was added. In addition, the &lt;B&gt;SPWorkflowActivationProperties.CreationData&lt;/B&gt;&amp;nbsp;property returns a &lt;B&gt;System.Collections.Hashtable&lt;/B&gt; object that represents the custom data provided by the workflow initiation form.&lt;/P&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4610850" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/wael/archive/tags/Wss/default.aspx">Wss</category><category domain="http://blogs.msdn.com/wael/archive/tags/workflow/default.aspx">workflow</category><category domain="http://blogs.msdn.com/wael/archive/tags/ASPX+Forms/default.aspx">ASPX Forms</category></item><item><title>Procedure to create ASPX Workflow Forms</title><link>http://blogs.msdn.com/wael/archive/2007/08/28/procedure-to-create-aspx-workflow-forms.aspx</link><pubDate>Tue, 28 Aug 2007 14:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4610791</guid><dc:creator>Wael A. Kabli</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/wael/comments/4610791.aspx</comments><wfw:commentRss>http://blogs.msdn.com/wael/commentrss.aspx?PostID=4610791</wfw:commentRss><wfw:comment>http://blogs.msdn.com/wael/rsscomments.aspx?PostID=4610791</wfw:comment><description>&lt;H1 class=heading&gt;Types of Workflow Forms&lt;/H1&gt;
&lt;P class=seeAlsoNoToggleSection&gt;&amp;nbsp;Three types of forms are used in Microsoft Windows SharePoint Services 3.0 workflows:&lt;/P&gt;
&lt;BLOCKQUOTE class=seeAlsoNoToggleSection&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;note: you can use InfoPath Forms instead if you have Forms Server or MOSS!!&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE class=seeAlsoNoToggleSection&gt;
&lt;P&gt;&lt;B&gt;Association and Initialization Forms&lt;/B&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Association and initialization forms are displayed for users to fill out before any workflow is actually started. You can use these forms to enable users to set parameters and other information for the workflow before it starts.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Modification Forms&lt;/B&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Modifications are options you present to users to change the workflow as it's running on an item. You can then create modification forms that enable users to specify the parameters of the modification.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Task Forms&lt;/B&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;You can also specify custom forms for the tasks in your workflow. Because tasks are SharePoint items that are assigned a content type, however, the content type actually determines the custom forms used with the task type.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4610791" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/wael/archive/tags/Wss/default.aspx">Wss</category><category domain="http://blogs.msdn.com/wael/archive/tags/workflow/default.aspx">workflow</category><category domain="http://blogs.msdn.com/wael/archive/tags/ASPX+Forms/default.aspx">ASPX Forms</category></item><item><title>Start Learning Workflows!!</title><link>http://blogs.msdn.com/wael/archive/2007/04/12/start-learning-workflows.aspx</link><pubDate>Thu, 12 Apr 2007 16:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2099465</guid><dc:creator>Wael A. Kabli</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/wael/comments/2099465.aspx</comments><wfw:commentRss>http://blogs.msdn.com/wael/commentrss.aspx?PostID=2099465</wfw:commentRss><wfw:comment>http://blogs.msdn.com/wael/rsscomments.aspx?PostID=2099465</wfw:comment><description>&lt;P&gt;Wow such an exciting topic to learn!! its nice and fun yet its a bit difficult to grasp easily,,,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Workflow Concepts:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV class=title&gt;Developer Introduction to Workflows for Windows SharePoint Services 3.0 and SharePoint Server 2007&lt;/DIV&gt;
&lt;DIV class=title&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/ms406057.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms406057.aspx&lt;/A&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Hands On Practise:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;This is a very good course that our colleage of us &lt;STRONG&gt;Eilene Hao&lt;/STRONG&gt;,&amp;nbsp; he works as a Program Manager for&amp;nbsp;&lt;STRONG&gt;SharePoint Workflows&lt;/STRONG&gt;....&lt;/P&gt;
&lt;P&gt;hear is an outline:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;A id=ctl00___ctl00___BlogSearcher___SearchPostList___EntryItems_ctl07_PostTitle href="http://blogs.msdn.com/sharepoint/archive/2006/11/18/so-you-want-to-develop-custom-workflows-in-visual-studio-series-introduction.aspx" mce_href="http://blogs.msdn.com/sharepoint/archive/2006/11/18/so-you-want-to-develop-custom-workflows-in-visual-studio-series-introduction.aspx"&gt;&lt;FONT color=#006bad&gt;"So You Want to Develop Custom Workflows in Visual Studio..." - The Blog Series&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A id=ctl00___ctl00___BlogSearcher___SearchPostList___EntryItems_ctl01_PostTitle href="http://blogs.msdn.com/sharepoint/archive/2006/11/18/developing-workflows-in-vs-part-1-workflow-objects-and-a-crash-course-on-mechanics.aspx" mce_href="http://blogs.msdn.com/sharepoint/archive/2006/11/18/developing-workflows-in-vs-part-1-workflow-objects-and-a-crash-course-on-mechanics.aspx"&gt;&lt;FONT color=#006bad&gt;Developing Workflows in VS: Part 1 - Workflow Objects and A Crash Course on Mechanics&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A id=ctl00___ctl00___BlogSearcher___SearchPostList___EntryItems_ctl06_PostTitle href="http://blogs.msdn.com/sharepoint/archive/2006/11/21/developing-workflows-in-vs-part-2-planning-your-workflow-two-things-to-keep-in-mind.aspx" mce_href="http://blogs.msdn.com/sharepoint/archive/2006/11/21/developing-workflows-in-vs-part-2-planning-your-workflow-two-things-to-keep-in-mind.aspx"&gt;&lt;FONT color=#006bad&gt;Developing Workflows in VS: Part 2 - Planning Your Workflow: Two Things to Keep in Mind&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A id=ctl00___ctl00___BlogSearcher___SearchPostList___EntryItems_ctl04_PostTitle href="http://blogs.msdn.com/sharepoint/archive/2006/11/26/developing-workflows-in-vs-part-4-design-and-bind-your-forms.aspx" mce_href="http://blogs.msdn.com/sharepoint/archive/2006/11/26/developing-workflows-in-vs-part-4-design-and-bind-your-forms.aspx"&gt;&lt;FONT color=#006bad&gt;Developing Workflows in VS: Part 4 - Design and Bind Your Forms&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A id=ctl00___ctl00___BlogSearcher___SearchPostList___EntryItems_ctl05_PostTitle href="http://blogs.msdn.com/sharepoint/archive/2006/11/28/developing-workflows-in-vs-part-5-code-your-workflow.aspx" mce_href="http://blogs.msdn.com/sharepoint/archive/2006/11/28/developing-workflows-in-vs-part-5-code-your-workflow.aspx"&gt;&lt;FONT color=#006bad&gt;Developing Workflows in VS: Part 5 - Code Your Workflow&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A id=ctl00___ctl00___BlogSearcher___SearchPostList___EntryItems_ctl03_PostTitle href="http://blogs.msdn.com/sharepoint/archive/2006/11/30/developing-workflows-in-vs-part-6-deploy-and-debug-your-workflow.aspx" mce_href="http://blogs.msdn.com/sharepoint/archive/2006/11/30/developing-workflows-in-vs-part-6-deploy-and-debug-your-workflow.aspx"&gt;&lt;FONT color=#006bad&gt;Developing Workflows in VS: Part 6 - Deploy and Debug your workflow&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A id=ctl00___ctl00___BlogSearcher___SearchPostList___EntryItems_ctl02_PostTitle href="http://blogs.msdn.com/sharepoint/archive/2006/12/01/developing-workflows-in-vs-part-7-summary-and-final-thoughts.aspx" mce_href="http://blogs.msdn.com/sharepoint/archive/2006/12/01/developing-workflows-in-vs-part-7-summary-and-final-thoughts.aspx"&gt;&lt;FONT color=#006bad&gt;Developing Workflows in VS: Part 7 - Summary and Final Thoughts&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BLOCKQUOTE&gt;
&lt;DIV class=title&gt;&lt;!----&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2099465" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/wael/archive/tags/Wss/default.aspx">Wss</category><category domain="http://blogs.msdn.com/wael/archive/tags/MOSS/default.aspx">MOSS</category><category domain="http://blogs.msdn.com/wael/archive/tags/InfoPath/default.aspx">InfoPath</category><category domain="http://blogs.msdn.com/wael/archive/tags/workflow/default.aspx">workflow</category></item></channel></rss>