<?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>Mattias Lindberg : Workflow</title><link>http://blogs.msdn.com/mattlind/archive/tags/Workflow/default.aspx</link><description>Tags: Workflow</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>SharePoint Workflows - experiences from the field vid TechDays i Västerås 17-18 mars</title><link>http://blogs.msdn.com/mattlind/archive/2009/03/10/sharepoint-workflows-experiences-from-the-field-vid-techdays-i-v-ster-s-17-18-mars.aspx</link><pubDate>Tue, 10 Mar 2009 14:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9468960</guid><dc:creator>mattlind</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mattlind/comments/9468960.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattlind/commentrss.aspx?PostID=9468960</wfw:commentRss><description>&lt;P&gt;På TechDays kommer jag och &lt;A href="http://workflowfoundation.blogspot.com/" mce_href="http://workflowfoundation.blogspot.com/"&gt;Daniel Karlsson&lt;/A&gt; från Connecta att köra en session som heter &lt;EM&gt;SharePoint Workflows – experiences from the field&lt;/EM&gt;.&amp;nbsp; Som rubriken antyder så handlar det om att bygga arbetsflöden i SharePoint och vi pratar om hur vi tror att man ska utnyttja de funktioner som finns i SharePoint och Visual Studio.&lt;/P&gt;
&lt;P&gt;Vår session hålls onsdagen den 18 mars kl 10.45, välkommen!&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/mattlind/WindowsLiveWriter/SharePointWorkflowsexperiencesfromthefie_9FA1/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/mattlind/WindowsLiveWriter/SharePointWorkflowsexperiencesfromthefie_9FA1/image_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=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/mattlind/WindowsLiveWriter/SharePointWorkflowsexperiencesfromthefie_9FA1/image_thumb.png" width=454 height=296 mce_src="http://blogs.msdn.com/blogfiles/mattlind/WindowsLiveWriter/SharePointWorkflowsexperiencesfromthefie_9FA1/image_thumb.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Mattias&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9468960" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattlind/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/mattlind/archive/tags/Workflow/default.aspx">Workflow</category><category domain="http://blogs.msdn.com/mattlind/archive/tags/TechDays/default.aspx">TechDays</category></item><item><title>Long Running Business Processes in SharePoint (and other Environments)</title><link>http://blogs.msdn.com/mattlind/archive/2007/12/14/long-running-business-processes-in-sharepoint-and-other-environments.aspx</link><pubDate>Fri, 14 Dec 2007 10:18:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6768353</guid><dc:creator>mattlind</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mattlind/comments/6768353.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattlind/commentrss.aspx?PostID=6768353</wfw:commentRss><description>&lt;p&gt;I'd like to reiterate a topic which I have previously written about: Long Running Processes. It will be a general discussion which can be applied to any environment or system, but SharePoint will be used as an example. This post is a bit theoretical but I think the topic is worth discussing as you may come across this process in the systems you build out there.&lt;/p&gt;  &lt;p&gt;What pushed me to write this post is that Paul Andrew recently discussed &lt;a href="http://blogs.msdn.com/pandrew/archive/2007/11/13/patterns-for-long-running-activities-in-windows-workflow-foundation.aspx"&gt;Patterns for Long Running Activities in Windows Workflow Foundation&lt;/a&gt;, in this post he discusses processes running longer than 1/10 second which is a very valid topic. However, as a contrast to his point of view I'd like to talk a about long running processs with the assumption that they live for more than a single business day (not 1/10 of a second).&lt;/p&gt;  &lt;p&gt;Two problems with long running processes (using my definition) are:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Updates of components in the solution (or system) becomes more complex &lt;/li&gt;    &lt;li&gt;The solution becomes sensitive to problems &lt;/li&gt; &lt;/ul&gt;  &lt;h2&gt;Updating components&lt;/h2&gt;  &lt;p&gt;Normally when you update a component you always have to make a choice if you are to maintain compatibility with previous versions of not. Perhaps you wish to add a few new columns to the database supporting your component along with changing the order in which steps are executed. This may cause you to create migration scripts which are responsible for updating old data to conform to the new data. &lt;/p&gt;  &lt;p&gt;Now add the complexity that there are instances of the component already running which depend on the old structure. How do you compromise between the need for change and the need to maintain backward compatibility? &lt;/p&gt;  &lt;p&gt;Also, what if you even wish for running instances of the component to actually pick up the changes and start appliying the new behaviour?&lt;/p&gt;  &lt;p&gt;More than a year ago I wrote something I called &lt;a href="http://blogs.msdn.com/mattlind/archive/2006/08/21/709724.aspx"&gt;Business Process Versioning - Updating Running Business Processes&lt;/a&gt; which discuss how these problems can be addressed when building BizTalk orchestrations. Today I don't work that much with BizTalk but I still think about the same thing, but now in the context of SharePoint and workflows. &lt;/p&gt;  &lt;p&gt;When building workflows in SharePoint the problem is basically the same. It is of course possible to start a workflow instance when an invoice arrives and then allow the same instance to live through two approvals after which it sleeps for 90 days while you delay payment. But what happens if version 2.0 of the solution is deployed after 35 days? Or if a Service Pack for SharePoint is installed after 70 days. Are you absolutely sure nothing will affect your running instances? It is extremely hard to test these upgrade scenarios as there will be 1000s of instances in different stages of completion.&lt;/p&gt;  &lt;p&gt;An even more probable event is that you deploy a small update for your process to fix a bug you have found. How can you make that change apply to the running instances? If you simply replace the assembly, will the serialized state be compatible with the new serialization state?&lt;/p&gt;  &lt;p&gt;One approach to avoid this problem could be to do your best to avoid using long running processes. But of course, when there is a need for human interaction the process will by have a much higher risk of becoming long running.&lt;/p&gt;  &lt;h2&gt;Sensitive to problems&lt;/h2&gt;  &lt;p&gt;Let us establishing the well known fact that things that can go wrong will go wrong, or more to the point &amp;quot;sh*t &lt;em&gt;always&lt;/em&gt; happens&amp;quot;!&lt;/p&gt;  &lt;p&gt;This has great relevance when talking about long running processes because if an unexpected critical problem occur 7 days into the processing of an item how will you fix it? Perhaps the problem was catastrophic and caused the business process to simply terminate or (more likely) you handled the problem in a generic error handler and ended the processes in a controlled way. &lt;/p&gt;  &lt;p&gt;As you are a very knowledgeable developer you quickly identify the problem in the process (or dependent systems) and create a workaround. Now all you have to do is to deploy the fix and you're done, or are you? What about the processes that has been prematurely terminiated? They may have been approved and handled by multiple people and you don't want to waste their time and have them redo their work!&lt;/p&gt;  &lt;p&gt;You could add code to your updated process to somehow handle this, but it will be hard to maintain and when the second fix is done the code may be a mess!&lt;/p&gt;  &lt;h2&gt;Solution approach: Atomizing the process&lt;/h2&gt;  &lt;p&gt;Part of the solution to both of these problems is to identify sub-processes in the overall process which can be executed independently, i.e. we should identify the atoms of the process. The atom analogy can be further used to discuss the activities that make up a sub-process, they are like sub-atomic particles where the same particles appear everywhere but when they are combined differently they form different sub-processes.&lt;/p&gt;  &lt;p&gt;To be a bit more concrete there will need to be some sort of &amp;#252;ber-process which drives the process forward. In my previous post I talked about creating a very light-weight &amp;#252;ber-process which starts the sub-processen. Using sub-processes will enable you to restart a failed process at an appropriate point in the overall process. However, I'm not so sure anymore that the correct way to proceed is to create an actual process which runs all the time, it will in itself be sensitive to problems... &lt;/p&gt;  &lt;p&gt;One thing is clear to me, the complete business process cannot be seen as a single workflow. The complete business process must consist of a number of workflows exeuted in sequence, where the end of each workflow initiate another workflow. Currently I'm considering using a status field on the ListItem to determine how far the process has progressed. &lt;/p&gt;  &lt;p&gt;An upcoming post will provide some more details about this, I'll just need to finalize my thought and make a test implementation. :-)&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6768353" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattlind/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/mattlind/archive/tags/Workflow/default.aspx">Workflow</category></item><item><title>Tracking/Auditing Events in a SharePoint Workflows</title><link>http://blogs.msdn.com/mattlind/archive/2007/12/11/tracking-auditing-events-in-a-sharepoint-workflows.aspx</link><pubDate>Tue, 11 Dec 2007 03:02:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6728827</guid><dc:creator>mattlind</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mattlind/comments/6728827.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattlind/commentrss.aspx?PostID=6728827</wfw:commentRss><description>&lt;p&gt;When building a solution using SharePoint and Workflow Foundation your requirements are sometimes that it should be possible track what everyone did and when it was done, in other cases you can forget all about the process once it has completed. Another name for this is that the system should support auditing.&lt;/p&gt;  &lt;p&gt;This discussion has once more become current as there recently has been some talk in the blogosphere about SharePoint's removal of association between item and workflow, one such post is written by &lt;a href="http://www.thorprojects.com/blog/archive/2007/10/16/708.aspx"&gt;Robert Bogue&lt;/a&gt;. So those who have considered tasks and workflow tasks as suffucient tracking may have to reconsider. Before going any further let me say that I have not personally verified which items and associations that are removed.&lt;/p&gt;  &lt;p&gt;I can quickly think of five different places which you could store tracking data:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Tasks: The task holds information about who was assigned, when it was completed, etc. &lt;/li&gt;    &lt;li&gt;Workflow History: Custom data logged by a developer, only holds information which the developer chose to log. Can either be used for audting or for &amp;quot;debugging&amp;quot;. &lt;/li&gt;    &lt;li&gt;Event Log: Custom event log used to store audit information.&lt;/li&gt;    &lt;li&gt;SharePoint Audit Log: Log information to the audit log using the audit API. &lt;/li&gt;    &lt;li&gt;Custom Audit Log (e.g. SQL Server): Log information to a database or text file which you have control over. &lt;/li&gt; &lt;/ul&gt;  &lt;table cellspacing="0" cellpadding="2" width="837" border="2"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="176"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="301"&gt;&lt;strong&gt;&lt;em&gt;Pros&lt;/em&gt;&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="351"&gt;&lt;strong&gt;&lt;em&gt;Cons&lt;/em&gt;&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="178"&gt;&lt;strong&gt;&lt;em&gt;Task&lt;/em&gt;&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="301"&gt;         &lt;ul&gt;           &lt;li&gt;Built-in functionality in MOSS &lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;        &lt;td valign="top" width="351"&gt;         &lt;ul&gt;           &lt;li&gt;Deleted during clean-up (as per linked blog post) &lt;/li&gt;            &lt;li&gt;Not all events you wish to audit are a result of a task, hence this cannot be the only way you audit. &lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="179"&gt;&lt;strong&gt;&lt;em&gt;Workflow History&lt;/em&gt;&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="301"&gt;         &lt;ul&gt;           &lt;li&gt;Built-in functionality in MOSS &lt;/li&gt;            &lt;li&gt;Easily created from within a workflow &lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;        &lt;td valign="top" width="351"&gt;         &lt;ul&gt;           &lt;li&gt;Association to main item cleared after 60 days (can be changed) &lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="180"&gt;&lt;strong&gt;&lt;em&gt;Event Log&lt;/em&gt;&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="301"&gt;         &lt;ul&gt;           &lt;li&gt;Built-in in functionality in Windows &lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;        &lt;td valign="top" width="351"&gt;         &lt;ul&gt;           &lt;li&gt;Might be a stretch to log all types of events that are interesting for a complete solution &lt;/li&gt;            &lt;li&gt;What about search capabilities? Can this be achieved using WMI?&lt;/li&gt;            &lt;li&gt;Event Log is per machine and normally a SharePoint solution involved multiple WFEs.&lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="180"&gt;&lt;strong&gt;&lt;em&gt;SharePoint Audit Log&lt;/em&gt;&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="301"&gt;         &lt;ul&gt;           &lt;li&gt;Reuse of standard SharePoint functionality &lt;/li&gt;            &lt;li&gt;Cannot be easily manipulated &lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;        &lt;td valign="top" width="351"&gt;         &lt;ul&gt;           &lt;li&gt;Might be a stretch to log all types of events that are interesting for a complete solution &lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="181"&gt;&lt;strong&gt;&lt;em&gt;Custom Audit Log&lt;/em&gt;&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="301"&gt;         &lt;ul&gt;           &lt;li&gt;Easy access from other applications &lt;/li&gt;            &lt;li&gt;Any logging needs can be taken care of &lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;        &lt;td valign="top" width="351"&gt;         &lt;ul&gt;           &lt;li&gt;Need to created and maintain the database / text file &lt;/li&gt;            &lt;li&gt;Not a standard function &lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;One issue to consider when choosing a tracking mechanism is what kind of proof you will need to show in an audit. Is it sufficient that there is a log or are you required to prove that an entry hasn't been manipulated? Or have entries been removed?&lt;/p&gt;  &lt;h2&gt;Conslusions&lt;/h2&gt;  &lt;p&gt;Currently I'm leaning towards using a custom audit log in SQL Server. It can be reasonably protected from everyone except SQL Server sysadmins. But I will also have to further consider the merits of the SharePoint Audit Log.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6728827" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattlind/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/mattlind/archive/tags/Workflow/default.aspx">Workflow</category></item></channel></rss>