<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://k2underground.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">From The Bench</title><subtitle type="html" /><id>http://k2underground.com/blogs/fromthebench/atom.aspx</id><link rel="alternate" type="text/html" href="http://k2underground.com/blogs/fromthebench/default.aspx" /><link rel="self" type="application/atom+xml" href="http://k2underground.com/blogs/fromthebench/atom.aspx" /><generator uri="http://communityserver.org" version="4.1.40407.4157">Community Server</generator><updated>2008-11-13T11:13:00Z</updated><entry><title>Stopping people from deploying to Production from K2/VS Studio and hiding the Production Environment from the Context Browser</title><link rel="alternate" type="text/html" href="/blogs/fromthebench/archive/2011/05/20/stopping-people-from-deploying-to-production-from-k2-vs-studio-and-hiding-the-production-environment-from-the-context-browser.aspx" /><id>/blogs/fromthebench/archive/2011/05/20/stopping-people-from-deploying-to-production-from-k2-vs-studio-and-hiding-the-production-environment-from-the-context-browser.aspx</id><published>2011-05-20T20:14:53Z</published><updated>2011-05-20T20:14:53Z</updated><content type="html">&lt;p&gt;Recently I came across a scenario where someone wanted to enable the following:&lt;/p&gt;  &lt;p&gt;- Allow people to work in K2D4SP in PROD&lt;/p&gt;  &lt;p&gt;- Some of these people will also need to use K2 Studio in Dev, but not &lt;em&gt;see &lt;/em&gt;PROD environment settings in the K2 Context Browser and/or Deployment dialog&lt;/p&gt;  &lt;p&gt;The ability to restrict actual deployment to a PROD can be easily controlled via Workflow Server permissions in the Production K2 server (details below).&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/fromthebench.metablogapi/6153.clip_5F00_image001_5F00_35C8CED4.jpg"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="clip_image001" border="0" alt="clip_image001" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/fromthebench.metablogapi/1780.clip_5F00_image001_5F00_thumb_5F00_74BA4F6F.jpg" width="781" height="189" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As the K2D4SP does not require each individual person to have export writes in order to deploy the process; the deployment is actually handled under the app pool identity running K2D4SP.&amp;#160; However the “Production” environment will still appear in K2 Studio as these are two different things.&lt;/p&gt;  &lt;p&gt;In order to to prevent the “Production” environment library from appearing for some people’s K2 Studio experience this can be done via Environment Library permissions:&lt;/p&gt;  &lt;p&gt;1. Open up Workspace in&amp;#160; your K2 Dev environment and go to the Workspace Management area&lt;/p&gt;  &lt;p&gt;2. Browse to location below and add in users that ARE ALLOWED to see the prod environment settings&lt;/p&gt;  &lt;p&gt;NOTE:&amp;#160; by default this is empty, which means everyone can see the settings.&amp;#160; However as soon as you add one identity here it restricts access to anyone not on the list.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/fromthebench.metablogapi/8130.clip_5F00_image002_5F00_53C6DCC8.jpg"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="clip_image002" border="0" alt="clip_image002" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/fromthebench.metablogapi/6457.clip_5F00_image002_5F00_thumb_5F00_64CB0AAB.jpg" width="482" height="233" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;3. Now if I open up K2 Studio with an identity other than Administrator I don’t have the option to select “Production” environment&lt;/p&gt;  &lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/fromthebench.metablogapi/1261.clip_5F00_image004_5F00_11DFF77A.jpg"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="clip_image004" border="0" alt="clip_image004" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/fromthebench.metablogapi/5852.clip_5F00_image004_5F00_thumb_5F00_1826CE08.jpg" width="536" height="88" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;…. And it does not appear at deployment time either …&lt;/p&gt;  &lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/fromthebench.metablogapi/8270.clip_5F00_image006_5F00_097C2223.jpg"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="clip_image006" border="0" alt="clip_image006" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/fromthebench.metablogapi/5037.clip_5F00_image006_5F00_thumb_5F00_08A3BC39.jpg" width="354" height="163" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=39826" width="1" height="1"&gt;</content><author><name>Bob</name><uri>http://k2underground.com/members/Bob/default.aspx</uri></author></entry><entry><title>Working with Arrays in K2</title><link rel="alternate" type="text/html" href="/blogs/fromthebench/archive/2011/01/08/working-with-arrays-in-k2.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="662613" href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.00.03.86.46/Test-K2-Project.zip" /><id>/blogs/fromthebench/archive/2011/01/08/working-with-arrays-in-k2.aspx</id><published>2011-01-08T13:36:00Z</published><updated>2011-01-08T13:36:00Z</updated><content type="html">&lt;p style="padding-left:60px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I was asked recently how one can work with arrays in K2.&amp;nbsp; The specific scenario presented to me was where one had a SharePoint delimited values such as &amp;ldquo;7#;Acme Bank&amp;rdquo; into the individual elements.&lt;/p&gt;
&lt;p&gt;This can be very easily handled with K2 Inline Functions.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;FYI, you can use Inline Functions in nearly any wizard; they are accessed via the context browser here:&lt;/p&gt;
&lt;p style="padding-left:60px;"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/fromthebench.metablogapi/8203.clip_5F00_image001_5F00_2636D61B.jpg"&gt;&lt;img height="242" width="244" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/fromthebench.metablogapi/2335.clip_5F00_image001_5F00_thumb_5F00_534BC2E9.jpg" alt="clip_image001" border="0" title="clip_image001" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Ok, so how would we use Inline Functions to emulate the scenario below?&amp;nbsp; Attached is a simple self-contained example for your reference, but the highlights of it are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I created 3 process datafields
&lt;ul&gt;
&lt;li&gt;FullString &amp;ndash; this simulates your SharePoint xml node, it contains a default value of: 7#;Acme Bank&lt;/li&gt;
&lt;li&gt;ID&lt;/li&gt;
&lt;li&gt;Value&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Drag out a Data Event onto the Design Canvas&lt;/li&gt;
&lt;li&gt;Select &amp;lsquo;Next&amp;rsquo; on the welcome screen&lt;/li&gt;
&lt;li&gt;Select &amp;lsquo;Transfer Data&amp;rsquo; on the 2&lt;sup&gt;nd&lt;/sup&gt; dialog&lt;/li&gt;
&lt;li&gt;Click &amp;lsquo;Assign&amp;rsquo; button&lt;/li&gt;
&lt;li&gt;In the &amp;lsquo;Destination&amp;rsquo; field I drag &amp;ldquo;ID&amp;rdquo; from the Context Browser process datafields into it&lt;/li&gt;
&lt;li&gt;I select the Inline Functions tab in the Context Browser and then expand &amp;ldquo;Lists&amp;rdquo;&lt;/li&gt;
&lt;li&gt;I then select the &amp;ldquo;Index Item&amp;rdquo; method and drag and drop into the &amp;ldquo;Source&amp;rdquo; field
&lt;ul&gt;
&lt;li&gt;This will then open up a new dialog to configure the extraction of an array&lt;/li&gt;
&lt;li&gt;I then set the following values:
&lt;ul&gt;
&lt;li&gt;Index:&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;&lt;em&gt;(note:&amp;nbsp; in K2 arrays are 1 based not 0 based)&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Expected when empty:&amp;nbsp;&amp;nbsp; 0&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;In the &amp;lsquo;Values&amp;rsquo; field I drag and drop the Inline Function Text &amp;gt; Split from the context browser
&lt;ul&gt;
&lt;li&gt;This will open up a new dialog to configure a string to be split into an array&lt;/li&gt;
&lt;li&gt;I set the values of this Split dialog as follows:
&lt;ul&gt;
&lt;li&gt;Text:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Process Data Field].FullString&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (NOTE: you would use your xml field here)&lt;/li&gt;
&lt;li&gt;Separator:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click Ok&lt;/li&gt;
&lt;li&gt;Now repeat steps 5 &amp;ndash; 10 but substitute:
&lt;ul&gt;
&lt;li&gt;In step 6:
&lt;ul&gt;
&lt;li&gt;Use &amp;lsquo;Value&amp;rdquo; process data field&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;In Step 8:
&lt;ul&gt;
&lt;li&gt;User Index of 2&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The final Data Event should look something like:&lt;/li&gt;
&lt;/ol&gt;
&lt;p style="padding-left:90px;"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/fromthebench.metablogapi/8105.clip_5F00_image003_5F00_5FD97005.jpg"&gt;&lt;img height="344" width="550" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/fromthebench.metablogapi/1665.clip_5F00_image003_5F00_thumb_5F00_3EE5FD5E.jpg" alt="clip_image003" border="0" title="clip_image003" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;13. Save, deploy and run.&amp;nbsp; We should see the string split into individual values:&lt;/p&gt;
&lt;p style="padding-left:90px;"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/fromthebench.metablogapi/8611.clip_5F00_image005_5F00_1DF28AB7.jpg"&gt;&lt;img height="192" width="406" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/fromthebench.metablogapi/7534.clip_5F00_image005_5F00_thumb_5F00_563101CF.jpg" alt="clip_image005" border="0" title="clip_image005" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In addition to this scenario there are other usages potential usages for arrays in K2.&amp;nbsp; Such as:&lt;/p&gt;
&lt;p&gt;- if a string held a delimited list of Domain\UserNames, one could use the Split Inline Function on that field within a Destination Rule in order to leverage generate a list of Destination Users.&lt;/p&gt;
&lt;p&gt;- If a string held a delimited list of data for which sub workflows needed to be individually invoked in by an IPC event.&amp;nbsp; The Split Inline Function could be used within the Plan Per Slot &amp;ndash; No Destination option of the Advanced Destination Rules.&amp;nbsp; For more information on Plan Per Slot &amp;ndash; No Destination, which is essentially a For-Each loop within K2, please refer to this previous post:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/blogs/fromthebench/archive/2008/10/22/using-a-repeating-xml-node-to-start-child-ipcs.aspx" title="http://k2underground.com/blogs/fromthebench/archive/2008/10/22/using-a-repeating-xml-node-to-start-child-ipcs.aspx"&gt;http://k2underground.com/blogs/fromthebench/archive/2008/10/22/using-a-repeating-xml-node-to-start-child-ipcs.aspx&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=38646" width="1" height="1"&gt;</content><author><name>Bob</name><uri>http://k2underground.com/members/Bob/default.aspx</uri></author></entry><entry><title>Introduction to K2 SmartObject Services</title><link rel="alternate" type="text/html" href="/blogs/fromthebench/archive/2010/12/29/introduction-to-k2-smartobject-services.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="1025150" href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.00.03.85.69/Introduction-to-K2-SmartObject-Services-_2D00_-Endpoints.zip" /><id>/blogs/fromthebench/archive/2010/12/29/introduction-to-k2-smartobject-services.aspx</id><published>2010-12-29T18:21:00Z</published><updated>2010-12-29T18:21:00Z</updated><content type="html">&lt;p&gt;K2 blackpearl 4.5 update 1230 introduces a potentially very useful feature called &amp;lsquo;K2 SmartObject Services&amp;rsquo;. This permits &lt;b&gt;&lt;i&gt;&lt;span style="text-decoration:underline;"&gt;any&lt;/span&gt;&lt;/i&gt;&lt;/b&gt; K2 SmartObject to be exposed via WCF, ATOM, XML and/or JSON endpoints. This functionality is built into K2 and requires just a little server-side configuration. This opens up a world of possibilities for leveraging SmartObjects in distributed applications that previously required a significant development effort to create custom service(s).&lt;/p&gt;
&lt;p&gt;The attached article focuses on a high level walk through of how to setup and use this service within a WCF scenario. It is assumed that a basic understanding of WCF is already present, as this article will not go into details around what is WCF. Additionally, this article does not replace the K2 product documentation. Full details around K2 SmartObject Services can be located in the K2 product documentation that ships with K2.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=38569" width="1" height="1"&gt;</content><author><name>Bob</name><uri>http://k2underground.com/members/Bob/default.aspx</uri></author></entry><entry><title>Where are comments stored within a SharePoint Integrated K2 Workflow?</title><link rel="alternate" type="text/html" href="/blogs/fromthebench/archive/2010/09/02/where-are-comments-stored-within-a-sharepoint-integrated-k2-workflow.aspx" /><id>/blogs/fromthebench/archive/2010/09/02/where-are-comments-stored-within-a-sharepoint-integrated-k2-workflow.aspx</id><published>2010-09-02T16:04:50Z</published><updated>2010-09-02T16:04:50Z</updated><content type="html">&lt;p&gt;For those that have leveraged K2’s SharePoint Workflow Integration (SPWI) process type within K2 Studio or Visual Studio, there is the ability to leverage K2 generated task pages.&amp;#160; Within these pages, there is the ability for the user to add comments at each task and view previous people’s task comments.&lt;/p&gt;  &lt;p&gt;Sometimes there is a need to do something with these comments within the K2 process, perhaps include them in a workflow generated email.&amp;#160; With K2 4.5, at first glance it looks like there is no way to do so.&amp;#160; However there is a way.&lt;/p&gt;  &lt;p&gt;The field in question is a Process level XML field called ‘SPComments’.&amp;#160; You can actually see it in K2 reporting if you look.&lt;/p&gt;  &lt;p&gt;So how do you see it at design time?&lt;/p&gt;  &lt;p&gt;In the K2 context browser click the down arrow on the Proc/Act Data tab and select ‘Show hidden fields’ and becomes visible:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/fromthebench.metablogapi/0654.clip_5F00_image0026_5F00_39447B9E.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image002[6]" border="0" alt="clip_image002[6]" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/fromthebench.metablogapi/1212.clip_5F00_image0026_5F00_thumb_5F00_0B76B2D9.jpg" width="234" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;From there you treat it like any xml (parsing, transforms…).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=37407" width="1" height="1"&gt;</content><author><name>Bob</name><uri>http://k2underground.com/members/Bob/default.aspx</uri></author></entry><entry><title>How the K2 web designer deploys in a SharePoint farm</title><link rel="alternate" type="text/html" href="/blogs/fromthebench/archive/2009/11/19/how-the-k2-web-designer-works-in-a-sharepoint-farm.aspx" /><id>/blogs/fromthebench/archive/2009/11/19/how-the-k2-web-designer-works-in-a-sharepoint-farm.aspx</id><published>2009-11-19T13:48:00Z</published><updated>2009-11-19T13:48:00Z</updated><content type="html">&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If SharePoint is not setup in a particular way, processes deployed from the K2 Web Designer in SharePoint do not deploy as expected.&amp;nbsp; Specifically, in a SharePoint farm, the Web Designer deployment will appear to be successful, but in reality it will only have been deployed to a single server in the SharePoint form.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Before explaining how to resolve this, it is useful to understand how the Web designer deployment works in a SharePoint farm: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Deployment first executes on the machine to which the session has been established &lt;/li&gt;
&lt;li&gt;It then queries SharePoint for a list of Servers in the farm (e.g. &lt;a href="http://IPport"&gt;http://IP:port/_vti_bin/K2SPsites.asmx)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;It then takes the first WFE server and gets a list of sites on that server (e.g. &lt;a href="http://IPport"&gt;http://IP:port/_vti_bin/K2SPsites.asmx)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;After that it resolves the Server name to an IP address &lt;/li&gt;
&lt;li&gt;It then hits each site on &lt;a href="http://IPport"&gt;http://IP:port&lt;/a&gt; and not on &lt;a href="http://machinenameport"&gt;http://machinename:port&lt;/a&gt; and try to deploy to the K2 Features web service (e.g. &lt;a href="http://IPport"&gt;http://IP:port/_vti_bin/K2SPfeatures.asmx)&lt;/a&gt;. Basically looping through all sites on each server and tries to deploy the solution &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So how to resolve the scenario where the process only gets deployed to a single node in the SharePoint farm?&amp;nbsp; This will mean that you need to have a site (web application) on each WFE server that can be accessed locally via &lt;a href="http://IPport"&gt;http://IP:port&lt;/a&gt;.&amp;nbsp; After doing this and redeploying the process is should make it to all nodes.&lt;/p&gt;
&lt;p&gt;Special thanks goes to Barry from K2 for providing the details here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=34384" width="1" height="1"&gt;</content><author><name>Bob</name><uri>http://k2underground.com/members/Bob/default.aspx</uri></author></entry><entry><title>Misc Windows 2008 Configuration Steps</title><link rel="alternate" type="text/html" href="/blogs/fromthebench/archive/2009/11/17/misc-windows-2008-configuration-steps.aspx" /><id>/blogs/fromthebench/archive/2009/11/17/misc-windows-2008-configuration-steps.aspx</id><published>2009-11-17T14:25:00Z</published><updated>2009-11-17T14:25:00Z</updated><content type="html">&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;There are some subtle changes to configuring a Windows Server 2008 environment.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;I recently did a K2 installation within an environment where all servers were running Windows Server 2008 SP2.&amp;nbsp; &lt;/span&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;Below are some issues I encountered and how I got around them.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;In speaking with others that have done installs in Windows 2008 it sounds like these are not always encountered, but I thought it worthwhile sharing in case someone does come across one or more of them.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l0 level1 lfo1;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin;mso-themecolor:dark2;"&gt;&lt;span style="mso-list:Ignore;"&gt;1.&lt;span style="font:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;IIS &amp;amp; Windows Authentication&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;When initially installing K2 Workspace on the server running IIS7 in the, the K2 Configuration Manager would not permit it to be configured because IIS did not have Windows Authentication enabled.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;When I checked out this site in IIS I found that Windows Authentication was not even an option to be enabled.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;After following the instructions in the below blog and doing an IIS reset for good measure, I was able to enable Windows Authentication for the site and the Configuration Manager proceeded.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="text-indent:0.5in;margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;&lt;a href="http://weblogs.asp.net/zroiy/archive/2008/08/17/missing-windows-authentication-provider-for-iis-7-on-windows-server-2008.aspx"&gt;http://weblogs.asp.net/zroiy/archive/2008/08/17/missing-windows-authentication-provider-for-iis-7-on-windows-server-2008.aspx&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l0 level1 lfo1;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin;mso-themecolor:dark2;"&gt;&lt;span style="mso-list:Ignore;"&gt;2.&lt;span style="font:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;DTC and Windows Firewall&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;The first time I tried to deploy a SmartObject I received a &amp;ldquo;root element is missing&amp;rdquo; error.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;After doing a little digging it seems that Windows Firewall will block DTC by default.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Since DTC is required on all server machines running K2 components, simply I simply opened up Windows Firewall on each server in the mix and adding an exception for DTC.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;After doing this my SmartObjects deployed without issue.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;FYI, details on how to enabled firewall exceptions for MS DTC can be found here:&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;&lt;span style="mso-tab-count:1;"&gt;&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; &lt;/span&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc725913(WS.10).aspx"&gt;http://technet.microsoft.com/en-us/library/cc725913(WS.10).aspx&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l0 level1 lfo1;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin;mso-themecolor:dark2;"&gt;&lt;span style="mso-list:Ignore;"&gt;3.&lt;span style="font:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;K2 Webpart failing to connect to K2 server&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;After deploying the K2 task list webpart, I tried to configure it.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;After wiring it up to the proper K2 server and ports, I received &amp;ldquo;failure to connect; no such host&amp;rdquo; messages.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;I confirmed my K2 service was up and running.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;In watching the service in console mode I did not see any activity hitting the K2 sever at all.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;I was able to ping the K2 server without issue from the SharePoint server.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;I then tried telnetting to the K2 server workflow (5252) and host (5555) ports.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;These both failed.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;NOTE:&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;the telnet utility is considered a feature in Win 2008 and may not be enabled on the system you are working on.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;To enable it you can following the instructions here:&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;a href="http://www.elmajdal.net/Win2k8/How_To_Enable_Telnet_In_Windows_Server_2008.aspx"&gt;http://www.elmajdal.net/Win2k8/How_To_Enable_Telnet_In_Windows_Server_2008.aspx&lt;/a&gt;.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;Once confirmed that I couldn&amp;rsquo;t connect to the ports, it started to sound like another Windows Firewall issue.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;I then opened Windows Firewall again on the SharePoint server and added some custom exceptions to unblock the workflow port (5252) and host port (5555).&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;After completing this, the webpart was able to connect to the K2 server with out issue.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 1in;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l0 level1 lfo1;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin;mso-themecolor:dark2;"&gt;&lt;span style="mso-list:Ignore;"&gt;4.&lt;span style="font:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;Not able to connect to K2 workspace from a machine other than the server running K2 workspace&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;Workspace opened without issue when browsing to it on the local IIS server. However whenever I tried to connect to it from a different machine in the domain, I got prompted for my credentials three times then was rejected with a 401 error.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Long story short, it turns out that while Windows Authentication was enabled for the Workspace, no authentication protocols had been configured.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;This was confirmed by opening the appplicationhost.config file (C:\Windows\System32\inetsrv\config\ applicationHost.config) and then locating the &amp;lt;security&amp;gt; node within &lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&lt;/span&gt;Workspace entry.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;It looked something like:&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-family:Times New Roman;font-size:small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="mso-tab-count:3;"&gt;&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;&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; &lt;/span&gt;&amp;lt;windowsAuthentication enabled=&amp;quot;true&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin;"&gt;&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;&lt;span style="mso-tab-count:3;"&gt;&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;&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; &lt;/span&gt;&amp;lt;/windowsAuthentication&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;I changed it to read:&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-family:Times New Roman;font-size:small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="mso-tab-count:3;"&gt;&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;&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; &lt;/span&gt;&amp;lt;windowsAuthentication enabled=&amp;quot;true&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin;"&gt;&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; &lt;span style="mso-tab-count:4;"&gt;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;providers&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin;"&gt;&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; &lt;span style="mso-tab-count:5;"&gt;&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;&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;&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; &lt;/span&gt;&amp;lt;clear /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin;"&gt;&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; &lt;span style="mso-tab-count:5;"&gt;&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;&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;&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; &lt;/span&gt;&amp;lt;add value=&amp;quot;NTLM&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin;"&gt;&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;&amp;nbsp; &lt;span style="mso-tab-count:5;"&gt;&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;&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;&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; &lt;/span&gt;&amp;lt;add value=&amp;quot;Negotiate&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin;"&gt;&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; &lt;span style="mso-tab-count:4;"&gt;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/providers&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin;"&gt;&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; &lt;span style="mso-tab-count:3;"&gt;&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;&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; &lt;/span&gt;&amp;lt;/windowsAuthentication&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;After doing this I was able to open Workspace for other machines without issue.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;NOTE: this is essentially the same steps outlined in the K2 product documentation around enabling Kerberos:&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;&lt;span style="mso-tab-count:2;"&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;&lt;span style="mso-tab-count:1;"&gt;&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; &lt;/span&gt;&lt;span style="mso-tab-count:1;"&gt;&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; &lt;/span&gt;&lt;a href="http://help.k2.com/helppages/k2blackpearl/page=Activate_delegation_settings_for_IIS_7.0_web_application_.html"&gt;&lt;span style="color:#0000ff;"&gt;http://help.k2.com/helppages/k2blackpearl/page=Activate_delegation_settings_for_IIS_7.0_web_application_.html&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 0pt 0.5in;"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-theme-font:minor-bidi;mso-themecolor:dark2;"&gt;However, since I hadn&amp;rsquo;t gotten to the point of Kerberos configuration yet I had not set these.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Also, it is probably worth mentioning as I could see potential for this issue to occur even if Kerberos is not being used.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=34331" width="1" height="1"&gt;</content><author><name>Bob</name><uri>http://k2underground.com/members/Bob/default.aspx</uri></author></entry><entry><title>How To: Create an InfoPath Integrated Process</title><link rel="alternate" type="text/html" href="/blogs/fromthebench/archive/2009/08/20/how-to-create-an-infopath-integrated-process.aspx" /><id>/blogs/fromthebench/archive/2009/08/20/how-to-create-an-infopath-integrated-process.aspx</id><published>2009-08-20T09:13:00Z</published><updated>2009-08-20T09:13:00Z</updated><content type="html">&lt;p&gt;&lt;strong&gt;Platforms:&lt;/strong&gt; K2 blackpoint, K2 blackpearl&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Audience:&lt;/strong&gt; K2 process designers&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Requirements:&lt;/strong&gt; This article assumes that the reader has a basic understanding of how to create a K2 process and is familiar with the concepts of processes and activities. Knowledge of MOSS and InfoPath would be very helpful along with a high level understanding of XML.&lt;/p&gt;
&lt;h4&gt;Introduction&lt;/h4&gt;
&lt;p&gt;Whether you are using K2 blackpearl or K2 blackpoint, both platforms have the ability to allow a process designer to use InfoPath as the user interface. The nice thing about InfoPath is that is can allow nontechnical staff to create forms without writing any code. If your organization is using the enterprise version of SharePoint with Forms Services, InfoPath forms can be easily rendered as web pages by simply enabling that feature in the form, but more on that in a moment.&lt;/p&gt;
&lt;p&gt;For the purpose of this article, I am going to explain how to create an InfoPath Integrated process from creation through deployment. I am going to focus primarily on K2 concepts and how the technologies overlap. If you have not used InfoPath before, there are many great blogs on the Internet that can help you get started. A couple of basic InfoPath concepts that you need to be familiar with before starting your first process are views and data sources as these concepts will be introduced early in the process development cycle. Additionally, a high level understanding of form libraries in SharePoint would also be extremely beneficial. &lt;/p&gt;
&lt;p&gt;The steps I provide in this article can be applied to both K2 blackpearl or blackpoint. K2 blackpoint does provide a more streamlined method for creating an InfoPath based process through the use of a Process Helper. I prefer to teach people how to setup this type of process manually the first time so the process designer has a clear understanding of how all the moving parts fit together. Later should you have an issue, the designer will have a better understanding of where they need to start troubleshooting.&lt;/p&gt;
&lt;p&gt;So let&amp;rsquo;s begin&amp;hellip;.&lt;/p&gt;
&lt;h4&gt;Create an InfoPath Form&lt;/h4&gt;
&lt;p&gt;The first step is to create your form. You can take your design queues from an existing paper form or use your own imagination. In either case, you need to have a clear understanding of what information you will need to be collecting and presenting to users throughout the process lifecycle. An InfoPath form is more than what it appears. It is really an XML data structure wrapped in a package with a form stacked on top to display the data. The data is displayed using &amp;ldquo;views&amp;rdquo;. [ Important InfoPath Concept #1 ]&lt;/p&gt;
&lt;p&gt;A view is just another way of displaying the same data. All the views in an InfoPath form reference the same XML data structure. The difference is that on each view of the form a designer can decide what data is visible to the form user. This is a key concept to keep in mind when designing forms for a K2 process. As the process moves from step to step such as a first level manager approval step to a second level approver each of those steps may have slightly different requirements for displaying the data. The first level approver may need to see fields that the second level approver does not. Another situation is that the original person submitting the form may need to see less options than either of the approvers. This is the most common scenario for a K2 process. When you design a form for K2, you are going to need at least two views: one for the submitter and one for the approver. Just to clarify, when you add views to an InfoPath form, you are not duplicating data, you are merely providing additional options for how that data is displayed.&lt;/p&gt;
&lt;p&gt;Speaking of data, before the views can be designed a data structure has to be created. This is done by adding fields to the main data source of the InfoPath form. [ Important InfoPath Concept #2 ] I recommend starting with the data structure first. As your create your data fields, they can be easily dragged onto your form to create text boxes, drop down lists and so on. In my experience, I find when a user starts the design process by dragging controls (textboxes and what not) onto the form they end up with extra fields in their data structure that are unused. This happens because when the designer drags a control onto the form a data field is automatically created. If the designer changes their mind and deletes the control, the data field remains. This is why I recommend defining all your data fields first to avoid orphaned fields.&lt;/p&gt;
&lt;p&gt;For this exercise, I am going to create a form with at least one data field. I am going to name this field, Approver_Action. The purpose of this field is that it will contain the result of a choice made by an approver in the process. When the form is created, this field will only be used on the approver views. Simply drag the field onto the form in a location that works with your design. Later, when this form is added to the K2 process, the field will be automatically changed into a drop down list that will display possible actions that are updated automatically from the process. More on this in a bit&amp;hellip;&lt;/p&gt;
&lt;p&gt;To review, a designer will need to create an InfoPath form with at least two views. One view will be a submitter view that users who are submitting the form (starting the K2 process) will use and an approver view that will be used by approvers in the process. The approver view will need at least one control that was created from an Approver_Action field defined in the main data source. To be clear, a real InfoPath form will always have many more fields in the data source and multiple controls on each view to display data. These are just minimum requirements for K2 to work with the form.&lt;/p&gt;
&lt;p&gt;Finally, save the form in a location that can be easily located. I recommend in My Documents as this is the default location the K2 wizard looks first in order to save a few clicks, but the form can be saved wherever works best.&lt;/p&gt;
&lt;h4&gt;Create a K2 Process&lt;/h4&gt;
&lt;p&gt;When creating a K2 process, all the real work is done when creating the form. The steps taken to integrate the form with a K2 process is wizard driven and incredibly easy as long as you understand the basic concepts. It only becomes complicated when the process designer does not understand the InfoPath and SharePoint concepts needed to be successful or the requirements of the business process exceed the capabilities of the technologies used such as complex form validation requirements.&lt;/p&gt;
&lt;p&gt;First, open the K2 process design application for your version of the platform. In order to follow along with this article, K2 blackpearl users will need to use Visual Studio and blackpoint users will be using K2 Studio. The concepts shared can be applied to the K2 blackpearl Visio design tool as the wizards involved are the same as the other design applications, the only difference is how the wizard is launched from within Visio.&lt;/p&gt;
&lt;p&gt;In the process design application, create a new K2 process. Visual Studio users will choose File &amp;agrave; New &amp;agrave; Project ( or Crtl + Shift + N) and from the New Project dialogue box select the K2 project type and then select &amp;ldquo;K2 workflow project&amp;rdquo; from the templates section on the right. Do not forget to give the project a name and click OK.&lt;/p&gt;
&lt;p&gt;K2 blackpoint users will click on the K2 button in the upper left hand corner of the application and select &amp;ldquo;New&amp;rdquo;. Select &amp;ldquo;K2 Project&amp;rdquo;, provide a project name at the bottom of the window and click &amp;ldquo;Create&amp;rdquo; in the lower right hand corner. Choose a save location and click &amp;ldquo;Save&amp;rdquo;. Next choose &amp;ldquo;Blank Process&amp;rdquo;, provide a name for the process at the bottom of the window and click &amp;ldquo;Create&amp;rdquo; in the lower right hand corner.&lt;/p&gt;
&lt;p&gt;In both applications, there should be a blank process canvas with a single start activity.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/blogs/fromthebench/clip_image002_1108F566.jpg"&gt;&lt;img height="173" width="244" src="http://k2underground.com/blogs/fromthebench/clip_image002_thumb_2FDF6944.jpg" alt="clip_image002" border="0" title="clip_image002" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Before the InfoPath can be used in this process, it must be &amp;ldquo;integrated&amp;rdquo; with the process. I emphasized the word integrated because that is the name of the first wizard, InfoPath Integration. This wizard can be located under &amp;ldquo;Process Wizards&amp;rdquo; in both the K2 Studio and Visual Studio applications. &lt;/p&gt;
&lt;p&gt;For those designers that this may be their first process, a process wizard is used to set high level or global settings for the entire process. There will not be any visual indication that this wizard has been run on the canvas because these setting compass the process itself. In Visual Studio, an icon will appear on the tool bar in the upper right hand corner of the canvas. In K2 Studio, an icon will appear on the ribbon bar at the top of the application under the Process tab in a section entitled Integration.&lt;/p&gt;
&lt;p&gt;The InfoPath Integration process wizard is ran to communicate a few important facts to the K2 process such as what form should be used with this process and where the form will live when the process is deployed. The most common location for an InfoPath form to live is inside a Form Library in SharePoint. This is a requirement if the plan is to use Forms Services to display the form as a web page.&lt;/p&gt;
&lt;p&gt;The next step is to launch the InfoPath Integration process wizard by selecting it from the toolbox, left click holding the button down and dragging it onto the canvas. If successful, a wizard window will launch.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/blogs/fromthebench/clip_image004_3D457C4A.jpg"&gt;&lt;img height="223" width="244" src="http://k2underground.com/blogs/fromthebench/clip_image004_thumb_4E49AA2D.jpg" alt="clip_image004" border="0" title="clip_image004" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Click next on the wizard window to move to the &amp;ldquo;Workflow Form Templates&amp;rdquo; page. This is where a process designer tells K2 which form (or forms there can be multiple) are being added to the process. To add a form, start by clicking the &amp;ldquo;Add&amp;rdquo; button in the upper left corner of the window. This launches a second wizard entitled &amp;ldquo;Add an InfoPath Form Template&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/blogs/fromthebench/clip_image006_549080BB.jpg"&gt;&lt;img height="200" width="244" src="http://k2underground.com/blogs/fromthebench/clip_image006_thumb_6CB3EB16.jpg" alt="clip_image006" border="0" title="clip_image006" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The first page of this new wizard wants to know where the form you are adding has been saved. If my directions have been followed closely, this would be &amp;ldquo;My Documents&amp;rdquo;. To locate the file, click the &amp;ldquo;browse&amp;rdquo; button to the right of the window. Other source location options are available via the drop down box at the top of the window, but those are outside the scope of this article.&lt;/p&gt;
&lt;p&gt;Once you have selected the form, click next on the wizard window.&lt;/p&gt;
&lt;p&gt;It may look like the wizard did not change, but it did. Pay attention to the wording at the top of the window. As illustrated in the graphic above, the previous page was entitled &amp;ldquo;InfoPath Form Source Location&amp;rdquo;, the new page is entitled &amp;ldquo;InfoPath Form Deployment Location&amp;rdquo;. With this page, the wizard is asking the process designer where the InfoPath form is going to live when the process is deployed. For my example, I am going to choose &amp;ldquo;SharePoint Form Library&amp;rdquo; from the drop down list at the top of the window. When I made this selection, the window updated with new options that are specific to this type of deployment location.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/blogs/fromthebench/clip_image008_65287BA9.jpg"&gt;&lt;img height="200" width="244" src="http://k2underground.com/blogs/fromthebench/clip_image008_thumb_5D30D947.jpg" alt="clip_image008" border="0" title="clip_image008" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Under location details, there are now three additional questions that need to be answered. First, the wizard wants to know in which SharePoint site the Form Library is or will be located. In this example, the wizard is already populated with an Environment Library field. &lt;/p&gt;
&lt;p&gt;What is the environment library? In brief, the environment library is a global resource that stores the locations of servers or URLs that make up your environment. The purpose is to provide a centralized location for managing configuration information to avoid hard coding the setting into a process. By storing the information outside a process and referencing it in this manner, it helps make the process more portable when moving between environments like development to production. Please see the K2 Documentation for more details on the environment library.&lt;/p&gt;
&lt;p&gt;Next, the wizard need to know which form library to use. At this point in my example, I have not created a form library to hold the form. I could have created the form library before hand or I have the ability to create a new form library on the fly from inside this wizard. In either case, click the browse button. K2 will now communicate with the SharePoint server at the site URL you provided above and return a list of available form libraries.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/blogs/fromthebench/clip_image010_4A7BDF90.jpg"&gt;&lt;img height="199" width="244" src="http://k2underground.com/blogs/fromthebench/clip_image010_thumb_30A7A961.jpg" alt="clip_image010" border="0" title="clip_image010" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As illustrated by the screen shot, I currently have only one form library in my SharePoint site. This will not meet my requirements. If I click &amp;ldquo;Create&amp;rdquo; in the upper left corner of the window, I am given another new window which asks for details about the new form library. If you have been keeping count, there are now four windows stacked on top of each other.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/blogs/fromthebench/clip_image012_7B2EE73B.jpg"&gt;&lt;img height="116" width="244" src="http://k2underground.com/blogs/fromthebench/clip_image012_thumb_1A718E0F.jpg" alt="clip_image012" border="0" title="clip_image012" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here, provide a name for the new form library. I will call mine MyFormLibrary. There are also options for providing a description and indicating if the form library should appear on the Quick Launch. Once the choices have been made click &amp;ldquo;OK&amp;rdquo; to create the form library. After a brief delay while K2 talks to SharePoint, the window closes and the form library that was just created is shown in the &amp;ldquo;SharePoint Browser&amp;rdquo; window.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/blogs/fromthebench/clip_image014_79EA4E5C.jpg"&gt;&lt;img height="200" width="244" src="http://k2underground.com/blogs/fromthebench/clip_image014_thumb_54EC8DE3.jpg" alt="clip_image014" border="0" title="clip_image014" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Select the new form library and click &amp;ldquo;OK&amp;rdquo;. The SharePoint browser window closes and the selected library is now displayed in the Form Library text box on the &amp;ldquo;Add an InfoPath Form Template&amp;rdquo; window.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/blogs/fromthebench/clip_image016_4D611E76.jpg"&gt;&lt;img height="200" width="244" src="http://k2underground.com/blogs/fromthebench/clip_image016_thumb_45697C14.jpg" alt="clip_image016" border="0" title="clip_image016" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is still two more bits of information the wizard needs. A choice needs to be made if this form will be added to the library we just selected as a library template or as a content type. I recommend choosing to add as a content type. The reason is that if the form is made a content type, then it will be versioned with the process. For example, the first phase of a process is completed, the business is happy and it is placed into production. A few months later, the business comes back to the process design team with new requirements that change the form and the process. The team makes the changes including changes to the data structure of the form and they are ready to deploy. &lt;/p&gt;
&lt;p&gt;The dilemma faced by the team is that there are still processes running that are the old version that have not completed. Will deploying the changed process break the current running processes if the updated form is deployed? The answer is no if the form was deployed as a content type. This allows both the old form and the new form to coexist. This scenario would break if the form had been deployed as a library template since the new form would have overwritten the old form, breaking the currently running processes.&lt;/p&gt;
&lt;p&gt;The final question remaining is which form client to use. The options are:&lt;/p&gt;
&lt;p&gt;&amp;middot; InfoPath &amp;ndash; this choice configures the library to attempt to open the form in the InfoPath application when it is opened.&lt;/p&gt;
&lt;p&gt;&amp;middot; InfoPath, Web browser if InfoPath is not available &amp;ndash; this choice is fairly self explanatory. If the user opening the form does not have the InfoPath application, then SharePoint will attempt to use Forms Services to open the form.&lt;/p&gt;
&lt;p&gt;&amp;middot; Web browser &amp;ndash; this setting instructs SharePoint to always open the InfoPath form as a web page using Forms Services&lt;/p&gt;
&lt;p&gt;For my example, I am going to choose &amp;ldquo;Web browser&amp;rdquo; and click &amp;ldquo;Next&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;The next page in the &amp;ldquo;Add an InfoPath Template&amp;rdquo; wizard is entitled Smart Object Integration. This page would allow a process designer to add smart object methods to an InfoPath form to allow the designer to save a retrieve data from alternate locations inside the InfoPath form. This can be a very handy feature and is worth a closer look. The K2 Documentation has additional details on this feature.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/blogs/fromthebench/clip_image018_04C72FA5.jpg"&gt;&lt;img height="199" width="244" src="http://k2underground.com/blogs/fromthebench/clip_image018_thumb_35E66A45.jpg" alt="clip_image018" border="0" title="clip_image018" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For the purpose of this article and keeping to the basics, I am not using Smart Objects in my InfoPath form, so I simply click &amp;ldquo;Next&amp;rdquo; on the wizard page to move to the next step.&lt;/p&gt;
&lt;p&gt;Because I am using the web browser as my form client, the next page entitled &amp;ldquo;HTML Task Pane&amp;rdquo; does not apply to this example and is only available if InfoPath as been selected as the form client, so I click &amp;ldquo;Finish&amp;rdquo; to complete this wizard and close the window returning me to the &amp;ldquo;InfoPath Integration&amp;rdquo; wizard page. This window now shows a single entry called MyIPForm which was the name of my InfoPath form. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/blogs/fromthebench/clip_image020_5C484D90.jpg"&gt;&lt;img height="221" width="244" src="http://k2underground.com/blogs/fromthebench/clip_image020_thumb_34359E71.jpg" alt="clip_image020" border="0" title="clip_image020" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Everything looks good so far, so I click &amp;ldquo;Next&amp;rdquo; to move to the next page in the wizard entitled &amp;ldquo;Process Start Details.&amp;rdquo; Here, a process design tells K2 how an InfoPath integrated process is to be started. My business requirement is that when a user submits a new form, a process is started so I change the form template drop down from &amp;ldquo;Start without InfoPath form&amp;rdquo; to myIPForm indicating that when this form is submitted it starts a new K2 process.&lt;/p&gt;
&lt;p&gt;Here is also where views first start to come into play. Along with what form to use, the wizard also needs to know which view in the form has been designated as the view used to start the form. When I designed my form, I created a view called &amp;ldquo;Submitter&amp;rdquo; for this exact purpose. &lt;/p&gt;
&lt;p&gt;The last bit of information needed to complete this page is the Folio. This field serves as an open text box where the process designer can basically create a subject line for each instance of a process. This field is surfaced on the K2 work list, where it can help provide information that distinguishes one task from another. For example, an accounting user is responsible for reviewing expense requests. They may get 50 to 100 requests day. When the accounting user looks at the K2 work list, all these tasks could start to look the same and there would not be an easy way of knowing some details about each individual task. The process designer can help ease some of the pain by putting a few details in the folio such as the requestor name and expense amount. Now when the accounting user looks as the work list , they may see an entry in the folio field like &amp;ldquo;Becky Smith - $100&amp;rdquo; or &amp;ldquo;Jim Connor - $50&amp;rdquo;. This is just one illustration. The folio field can be populated with any process data, workflow context information (metadata about the process) or smart object data. Just keep in mind that space is limited so it is best to make the folio entry clear and to the point. Once the folio has been configured, click &amp;ldquo;Next&amp;rdquo;. Skip the advanced settings page by clicking &amp;ldquo;Next&amp;rdquo; again, very rarely is there ever a need to change the values on this page. &lt;/p&gt;
&lt;p&gt;Welcome to the final page of the InfoPath Integration process wizard! This page contains a single option &amp;ldquo;Would you like to configure a client event now?&amp;rdquo; I am being asked if I want to K2 to go ahead and add a client event for me. This would close the current wizard and launch the &amp;ldquo;InfoPath Client Event&amp;rdquo; wizard. Since many processes consist of more than one approval step, I am going to leave the check box blank and click &amp;ldquo;Finish&amp;rdquo; closing the wizard and returning me to the canvas. Remember, at this point there will not be any visual indication on the design canvas that the process wizard was ran. Look to the tools bars described earlier to access the wizard again if changes need to be made.&lt;/p&gt;
&lt;p&gt;Since this article has went much longer than I intended, I am going to move briskly through the next steps focusing on InfoPath specific concepts. General K2 concepts I am going to gloss over and details can be found in the K2 Documentation .&lt;/p&gt;
&lt;p&gt;In my example process, I need an approval step to allow someone to review my process and make a decision such as approve or decline. This accomplished by using an InfoPath client event. I locate the Event Wizards section of my toolbox and find the InfoPath Client Event. Select the event, click and hold to drag the event onto the process design canvas. This action will launch the &amp;ldquo;InfoPath Client Event&amp;rdquo; wizard.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/blogs/fromthebench/clip_image022_2180A4BA.jpg"&gt;&lt;img height="222" width="244" src="http://k2underground.com/blogs/fromthebench/clip_image022_thumb_47765510.jpg" alt="clip_image022" border="0" title="clip_image022" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Click &amp;ldquo;Next&amp;rdquo; to move to the next page entitled &amp;ldquo;General Event Setting&amp;rdquo;. This page we tell the wizard what to name the event, which InfoPath Form should be used, which view will this user see and where the action taken will be saved.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/blogs/fromthebench/clip_image024_71E2862D.jpg"&gt;&lt;img height="222" width="244" src="http://k2underground.com/blogs/fromthebench/clip_image024_thumb_5EC15981.jpg" alt="clip_image024" border="0" title="clip_image024" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The important points on this page are the form template which is the InfoPath form that was just added during the InfoPath Integration Event. The client event view which I explained earlier should be different for the review or approval step as there would be an additional control added to allow the work list task to be actioned (hint hint). The task action field tells K2 that this field is where the action the approver takes will be stored. This field is located by using the Object Brower to locate the Process/Activity Data tab which will provide access to the data fields defined in the form. I located the Approver_Action field and drug it into the text box. When &amp;ldquo;Next&amp;rdquo; is clicked, the wizard will prompt to be allowed to create a drop down list control to display the available actions, click &amp;ldquo;yes&amp;rdquo;, the prompt closes and the wizard advances.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/blogs/fromthebench/clip_image026_1E1F0D12.jpg"&gt;&lt;img height="87" width="244" src="http://k2underground.com/blogs/fromthebench/clip_image026_thumb_2465E3A0.jpg" alt="clip_image026" border="0" title="clip_image026" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The rest of this wizard covers K2 concepts that are universal to any K2 client event regardless of forms technology used. The process designer will be asked if email notifications should be sent, what actions should be made available, automatically generate outcomes and lines and pick what users will be responsible for working this task in the form of destination users. Once these questions have been answered, click &amp;ldquo;Finish&amp;rdquo; to close the wizard and a new activity will appear on the canvas. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/blogs/fromthebench/clip_image028_03DEA3EE.jpg"&gt;&lt;img height="197" width="244" src="http://k2underground.com/blogs/fromthebench/clip_image028_thumb_09B94787.jpg" alt="clip_image028" border="0" title="clip_image028" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;At this point my process is incomplete. Additional steps that need to be taken are connecting the Start activity to my InfoPathClientEvent Activity, adding an activity for both the approve and decline branches of my process (I am going to use mail events to notify the originator of the decision) and, finally, saving and deploying the process. So the end result would look something like this&amp;hellip;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/blogs/fromthebench/clip_image030_6D3C55A6.jpg"&gt;&lt;img height="171" width="244" src="http://k2underground.com/blogs/fromthebench/clip_image030_thumb_1A514275.jpg" alt="clip_image030" border="0" title="clip_image030" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The only step left to do is give users start rights to the process. To start the process, I open a web browser and navigate to the SharePoint site and locate the form library. Once in the library, I click new from the menu bar to open a new InfoPath form. I fill out the form and click submit which will start a new K2 process.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/blogs/fromthebench/clip_image032_40B325C0.jpg"&gt;&lt;img height="164" width="244" src="http://k2underground.com/blogs/fromthebench/clip_image032_thumb_52238698.jpg" alt="clip_image032" border="0" title="clip_image032" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That is all there is to it. It really is simple to accomplish once a process designer knows what to do, and I hope this article can help provide that guidance. &lt;/p&gt;
&lt;p&gt;Good Luck!&lt;/p&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=32625" width="1" height="1"&gt;</content><author><name>jscott</name><uri>http://k2underground.com/members/jscott/default.aspx</uri></author></entry><entry><title>How To: Use a web service for destinations in K2 blackpoint</title><link rel="alternate" type="text/html" href="/blogs/fromthebench/archive/2009/08/18/how-to-use-a-web-service-for-destinations-in-k2-blackpoint.aspx" /><id>/blogs/fromthebench/archive/2009/08/18/how-to-use-a-web-service-for-destinations-in-k2-blackpoint.aspx</id><published>2009-08-19T04:45:37Z</published><updated>2009-08-19T04:45:37Z</updated><content type="html">&lt;p&gt;&lt;b&gt;Platforms:&lt;/b&gt; K2 blackpoint&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Audience:&lt;/b&gt; K2 process designers, .NET Developers&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Requirements:&lt;/b&gt; This article assumes that the reader has a basic understanding of how to create a K2 process and is familiar with the concepts of processes and activities. .NET development experience in the area of web services is also helpful.&lt;/p&gt;  &lt;h3&gt;Introduction&lt;/h3&gt;  &lt;p&gt;There are many times when users are not managed in Active Directory. Their roles and functional areas are managed in a third party application or even a SQL database. In K2 blackpoint, there is not an out of the box method of accessing these third party data sources unless you use a web service. &lt;/p&gt;  &lt;p&gt;K2 blackpoint provides process designers with the ability to use web services through the Reference Event Wizard. This event allows the user to reference either a web service or a .NET DLL. In this article, I am going to explore how to use a web service, but this approach could also be applied to a DLL as well.&lt;/p&gt;  &lt;p&gt;Also, as you read this article, keep in mind that the main point is how to retrieve data from a web service and save those values to an XML data field. For illustration purposes, I have chosen to discuss this in the context of setting a destination rule, but this approach could be used to meet other requirements such as populating an email with values from a data source. Once the information retrieved from the web service has been saved to an XML data field, those values can be used any where in the K2 process that accepts XML data.&lt;/p&gt;  &lt;h3&gt;Creating the web service&lt;/h3&gt;  &lt;p&gt;First, I am going to write a simple web service to return some XML that contains a list of users. For this example, I am going to manually create my XML with a few hard coded users. This code could be easily updated to use ADO.NET, Oracle’s API or some other vendor API to retrieve data. The key points to take away are the data type used to return the XML and the structure of the XML.&lt;/p&gt;  &lt;div style="padding-bottom:5px;padding-left:5px;width:849px;padding-right:5px;display:block;float:none;margin-left:auto;margin-right:auto;padding-top:5px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:70a1604b-af0a-4867-9374-2e915d2cca4f" class="wlWriterEditableSmartContent"&gt;
&lt;div style="border:#000080 1px solid;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;"&gt;Code Snippet&lt;/div&gt;
&lt;div style="background-color:#000000;max-height:auto;overflow:scroll;padding:2px 5px;white-space:nowrap;"&gt;
&lt;p&gt;  &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System;&lt;br&gt; &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br&gt; &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Linq;&lt;br&gt; &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Web;&lt;br&gt; &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Web.Services;&lt;br&gt; &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Xml;&lt;br&gt; &lt;br&gt; &lt;span style="color:#0000ff;"&gt;namespace&lt;/span&gt; MyWebService&lt;br&gt; {&lt;br&gt;     &lt;span style="color:#808080;"&gt;///&lt;/span&gt;&lt;span style="color:#008000;"&gt; &lt;/span&gt;&lt;span style="color:#808080;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br&gt;     &lt;span style="color:#808080;"&gt;///&lt;/span&gt;&lt;span style="color:#008000;"&gt; Summary description for Service1&lt;/span&gt;&lt;br&gt;     &lt;span style="color:#808080;"&gt;///&lt;/span&gt;&lt;span style="color:#008000;"&gt; &lt;/span&gt;&lt;span style="color:#808080;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br&gt;     [&lt;span style="color:#2b91af;"&gt;WebService&lt;/span&gt;(Namespace = &lt;span style="color:#a31515;"&gt;"http://tempuri.org/"&lt;/span&gt;)]&lt;br&gt;     [&lt;span style="color:#2b91af;"&gt;WebServiceBinding&lt;/span&gt;(ConformsTo = &lt;span style="color:#2b91af;"&gt;WsiProfiles&lt;/span&gt;.BasicProfile1_1)]&lt;br&gt;     [System.ComponentModel.&lt;span style="color:#2b91af;"&gt;ToolboxItem&lt;/span&gt;(&lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;)]&lt;br&gt;     &lt;br&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Service1&lt;/span&gt; : System.Web.Services.&lt;span style="color:#2b91af;"&gt;WebService&lt;/span&gt;&lt;br&gt;     {&lt;br&gt; &lt;br&gt;         [&lt;span style="color:#2b91af;"&gt;WebMethod&lt;/span&gt;]&lt;br&gt;         &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; ReturnUserList()&lt;br&gt;         {&lt;br&gt;             &lt;span style="color:#2b91af;"&gt;XmlDocument&lt;/span&gt; doc = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;XmlDocument&lt;/span&gt;();&lt;br&gt;             &lt;span style="color:#2b91af;"&gt;XmlElement&lt;/span&gt; root = doc.CreateElement(&lt;span style="color:#a31515;"&gt;"UserList"&lt;/span&gt;);&lt;br&gt;             doc.AppendChild(root);&lt;br&gt; &lt;br&gt;             &lt;span style="color:#2b91af;"&gt;XmlElement&lt;/span&gt; SQLUser = doc.CreateElement(&lt;span style="color:#a31515;"&gt;"Users"&lt;/span&gt;);&lt;br&gt;             SQLUser.InnerText = &lt;span style="color:#a31515;"&gt;@"domain&amp;#92;user1"&lt;/span&gt;;&lt;br&gt;             root.AppendChild(SQLUser);&lt;br&gt; &lt;br&gt;             SQLUser = doc.CreateElement(&lt;span style="color:#a31515;"&gt;"Users"&lt;/span&gt;);&lt;br&gt;             SQLUser.InnerText = &lt;span style="color:#a31515;"&gt;@"domian&amp;#92;user2"&lt;/span&gt;;&lt;br&gt;             root.AppendChild(SQLUser);&lt;br&gt; &lt;br&gt;             SQLUser = doc.CreateElement(&lt;span style="color:#a31515;"&gt;"Users"&lt;/span&gt;);&lt;br&gt;             SQLUser.InnerText = &lt;span style="color:#a31515;"&gt;@"domain&amp;#92;user3"&lt;/span&gt;;&lt;br&gt;             root.AppendChild(SQLUser);&lt;br&gt; &lt;br&gt;             &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; doc.OuterXml.ToString();&lt;br&gt;         }&lt;br&gt;     }&lt;br&gt; }&lt;br&gt;  &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;  &lt;p&gt;The first important item to note about this code example is that my method “ReturnUserList” has been declared as type string. This is because the Reference Event Wizard only handles simple data types. The last line of my method we return the XMLDocument’s OuterXml converted to a string. These are the two key points to make this method successful. &lt;/p&gt;  &lt;p&gt;Build and publish your web service.&lt;/p&gt;  &lt;h3&gt;Creating an XSD&lt;/h3&gt;  &lt;p&gt;The first step to setup your blackpoint process to use the web service is creating an XML process data field to hold the returned values from your web service. XML data fields in K2 require a schema definition to define the data field’s structure. &lt;/p&gt;  &lt;p&gt;For the purpose of my example, I took my XML file and used the XSD.EXE tool included with Visual Studio to generate an XSD for me. For more information on the XSD.exe utility, check out this &lt;a href="http://msdn.microsoft.com/en-us/library/x6c1kb0s(VS.80).aspx" target="_blank"&gt;article on MSDN&lt;/a&gt;. You can also write your own by hand using your favorite text editor. Here is an example of the XSD I used:&lt;/p&gt;  &lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;    &lt;br /&gt;&amp;lt;xs:schema id=&amp;quot;UserList&amp;quot; xmlns=&amp;quot;&amp;quot; xmlns:xs=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot; xmlns:msdata=&amp;quot;urn:schemas-microsoft-com:xml-msdata&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160; &amp;lt;xs:element name=&amp;quot;UserList&amp;quot; msdata:IsDataSet=&amp;quot;true&amp;quot; msdata:UseCurrentLocale=&amp;quot;true&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xs:complexType&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xs:choice minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;unbounded&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xs:element name=&amp;quot;Users&amp;quot; nillable=&amp;quot;true&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xs:element&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xs:choice&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xs:complexType&amp;gt;     &lt;br /&gt;&amp;#160; &amp;lt;/xs:element&amp;gt;     &lt;br /&gt;&amp;lt;/xs:schema&amp;gt;&lt;/p&gt;  &lt;p&gt;I saved this file as mywebservice.xsd since this represented the XML structure of what my web service would be returning. Please note, it is important to make sure that the node in your XML that is going to contain the list of users (in my case the node is called Users) is defined as a complex type. For more information on XSD files and how to create them check out this &lt;a href="http://www.w3schools.com/Schema/default.asp" target="_blank"&gt;article at W3Schools.com&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Once you have your xsd file created, you are ready to start K2 Studio and begin developing your process.&lt;/p&gt;  &lt;h3&gt;Setting up the blackpoint process XML data field&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/image_75BAF688.png"&gt;&lt;img style="border-right-width:0px;margin:0px 0px 0px 10px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="K2 Object Browser" border="0" alt="K2 Object Browser" align="right" src="http://www.k2underground.com/blogs/fromthebench/image_thumb_3440442F.png" width="320" height="187" /&gt;&lt;/a&gt; The first thing I like to do when creating a new process is to define my data fields. New data fields can be created at any time during the process development cycle, but I like to define data fields first, as I prefer a more structured approach to process design. Plus, it is always good practice to make sure you have done your homework.&lt;/p&gt;  &lt;p&gt;To create a new XML process data field, you need to locate the K2 object browser on the left side of the K2 Studio window and look for the Process/Activity Data tab.&lt;/p&gt;  &lt;p&gt;Locate the XML Fields node and lick on the + sign to extend the node. Next, you will right click on the node below Activities. In my example to the right, the node is called “MyTestProcess”. This is the process level XML data field node. Since it contains data field definitions that are global to the whole process, this node takes on the name of the process which in my case is called MyTestProcess.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/image_5382EB02.png"&gt;&lt;img style="border-right-width:0px;margin:0px 10px 0px 0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" align="left" src="http://www.k2underground.com/blogs/fromthebench/image_thumb_68083A80.png" width="151" height="46" /&gt;&lt;/a&gt; Finally, it is now time to add a new process XML data field. Right click and choose “add”. Do you remember where you saved the XSD file you created above? It is now time for us to use that file to define the structure of the XML data field we are adding. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/image_1993A816.png"&gt;&lt;img style="border-right-width:0px;margin:0px 0px 0px 10px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" align="right" src="http://www.k2underground.com/blogs/fromthebench/image_thumb_19277521.png" width="202" height="104" /&gt;&lt;/a&gt; The Add XML Field dialogue box contains several tabs: General, Initial Value, Metadata and XML Schema. For this article, we are going to focus on XML Schema and Initial Value. On the General tab, we only need to provide a name for this data field. I am going to call mine “MyXMLData”.&amp;#160; It is a required field as noted by the red vertical bar next to the text box. You will receive a validation error if you forget to provide a name.&lt;/p&gt;  &lt;p&gt;Now that we have given the data field a name, click on the XML Schema tab in the Add XML Field window. In the lower left hand corner of the window you will see a “browse” button. Clicking this button will give you a file dialogue box where you will navigate to the save location of your XSD file, select it and choose open.&lt;/p&gt;  &lt;p&gt;The final step in preparing the XML data field is to click on the Initial Value tab and then click the “Generate sample XML file” button at the bottom of the window. This generates sample XML that represents what the data structure of your field will look like. Once satisfied with the results, simply click OK to save.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/image_268D8827.png"&gt;&lt;img style="border-right-width:0px;margin:0px 10px 0px 0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" align="left" src="http://www.k2underground.com/blogs/fromthebench/image_thumb_78340279.png" width="162" height="76" /&gt;&lt;/a&gt; Back in the Object Browser you should see a new XML data field. In my case, I see a new field called MyXMLData. When I click on the + sign next to the field, I sell all the nodes that make up my XML data structure.&lt;/p&gt;  &lt;h3&gt;Adding a reference to the web service to the process&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/image_059A1580.png"&gt;&lt;img style="border-right-width:0px;margin:0px 0px 10px 10px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" align="right" src="http://www.k2underground.com/blogs/fromthebench/image_thumb_490216E2.png" width="240" height="121" /&gt;&lt;/a&gt; A web service is a resource that is external to your K2 process. In order to use the service, you are going to have to tell the process where it is and that it is available by adding a Reference to your project. &lt;/p&gt;  &lt;p&gt;You can find the button to access the reference settings for your project at the top of the K2 Studio window on the ribbon bar on the “Home” tab. There, you will see a button called “References.”&amp;#160; You may also access the Project References feature by pressing Crtl + R.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/image_2F2DE0B3.png"&gt;&lt;img style="border-right-width:0px;margin:0px 10px 5px 0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" align="left" src="http://www.k2underground.com/blogs/fromthebench/image_thumb_47514B0E.png" width="274" height="217" /&gt;&lt;/a&gt; The next steps are pretty simple. Click Add in the upper left hand corner of the window. This will present you with the “Add References” window. Here, you will see four tabs: .NET, COM, Web and Service. For this article, we are going to work with the Web tab.&lt;/p&gt;  &lt;p&gt;At the top of the window, there is a text box with the label: WSDL Url. This is where we are going to enter the full URL to our web service. This location will depend entirely on where you decided to publish your web service in your environment.&lt;/p&gt;  &lt;p&gt;Once you enter the URL, click the “Discover” button at the right of the window. This basically validates your URL web service and ensures that it can be reached.&lt;/p&gt;  &lt;p&gt;Next, locate the Name textbox and make any changes to the name of your reference.&lt;/p&gt;  &lt;p&gt;Finally, click “Select” on the right hand side of the window. This adds this new reference to the Selected Items section and once completed, you may click OK to close the “Add References “ window and return to the Project References wizard. In the reference list, you should now see the reference you just added. Click the “Finish” button in the lower right corner of the screen to close the wizard. &lt;/p&gt;  &lt;h3&gt;Calling the Web Service and populating the data field with results&lt;/h3&gt;  &lt;p&gt;To begin, from the Event Wizards tool box, click and drag the Reference Event onto the process design canvas. This will launch the Reference Event wizard. Click next and you will be given the opportunity to name the event. In my example, I am going to call my Reference Event “My Web Service Call”. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/image_1BA08112.png"&gt;&lt;img style="border-right-width:0px;margin:0px 0px 0px 10px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" align="right" src="http://www.k2underground.com/blogs/fromthebench/image_thumb_6D46FB64.png" width="170" height="100" /&gt;&lt;/a&gt; The next page of the wizard is titled “Event Method Editor”. Basically this is the page where you will setup the call to your web service and then be given an opportunity to decide what to do with the results. Setting up the web service call is a two step process, and may be a bit confusing the first time through for non-technical process designers. I am not going to go into why these steps must be followed, but simply explain what to do to achieve the results you desire. Now, click on the “Add” button in the upper left corner of the window. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/image_4CBFBBB2.png"&gt;&lt;img style="border-right-width:0px;margin:0px 10px 5px 0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" align="left" src="http://www.k2underground.com/blogs/fromthebench/image_thumb_2C387C00.png" width="170" height="185" /&gt;&lt;/a&gt; A new window called “Select a Constructor” opens. The window should contain a list of references that are available. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;STEP 1:&lt;/strong&gt; You will locate the reference that was just added in the previous step. In my case, I named my reference, well, MyReference. As you can see in the image to the left, I clicked on “MyReference” and extended the nodes till I reached the “Constructor” node. I selected the constructor node and clicked the “Next” button.&lt;/p&gt;  &lt;p&gt;The next window will provide you with the ability to set many different parameters for your web service. My web service is very basic, so I do not need to make any changes to his page, so I clicked the “Finish” button.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/image_19838249.png"&gt;&lt;img style="border-right-width:0px;margin:0px 0px 0px 10px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" align="right" src="http://www.k2underground.com/blogs/fromthebench/image_thumb_0A6CA36F.png" width="228" height="240" /&gt;&lt;/a&gt; Back on the “Event Method Editor” window, you will now see an entry for the constructor you just added. Now, we need to actually add a method call which uses this constructor. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;STEP 2:&lt;/strong&gt; Click on the single line to that it is highlighted in grey and then click the “Add” button once more. This opens a new “Configure Method Call” window. Scroll through the list and locate the method you wish to use. Based on the web service I provided at the beginning of this article, my method is called “ReturnUserList”. Simply select the method name, and click “Next”.&lt;/p&gt;  &lt;p&gt;This page in the wizard is the page that we have all be waiting for as this is where the magic finally happens. We now will configure the wizard to save the method results. Click on “Return Parameter” so the that line is highlighted in grey and then click the “Assign” button in the upper left hand corner of the window. You will be given a small window where you will want to click on the ellipse button at the right of the text box to bring up the Object Browser. Locate the Process/Activity Data tab, choose XML Fields and then the process data field node. You should see the data field we added a few steps ago called “MyXmlData”.&amp;#160; Select your data field, click add and then click “OK” to close the window. &lt;/p&gt;  &lt;p&gt;Now, simply click “Next” and then “Finish” in the Configure Method call window. The configure method call window will close returning you to the Event Method Editor. You should now see a second method entry in the window. Click “Finish” to close the wizard.&lt;/p&gt;  &lt;p&gt;If everything was wired up correctly, when your process reaches this activity it will invoke the web service and save the results to the process XML field. Now, you will be able to use those results anywhere in the process. It is import to keep in mind that information in the XML data field is static. You may have to add additional reference events elsewhere in the process if the needs change. &lt;/p&gt;  &lt;p&gt;For example, if you were retrieving a list of users selected based on department and the first time you used the web service you pulled a list of users for marketing, you would then have to repeat the steps in this section if you wanted to retrieve a list for HR or Sales at a different point in the process.&lt;/p&gt;  &lt;p&gt;The reference event has to be called &lt;u&gt;BEFORE&lt;/u&gt; you need to use the data to make sure the XML field is correctly populated with the right information.&lt;/p&gt;  &lt;h3&gt;Use the XML data field in a destination rule ( or anywhere else )&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/image_4EBA6D06.png"&gt;&lt;img style="border-right-width:0px;margin:0px 10px 0px 0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" align="left" src="http://www.k2underground.com/blogs/fromthebench/image_thumb_5FBE9AE9.png" width="207" height="189" /&gt;&lt;/a&gt; Now that you have a populated XML data field, you simply add it to any text box where you want to provide a value that is determined dynamically as the process executes. &lt;/p&gt;  &lt;p&gt;In the case of a destination rule, you would add the “users” node since this is the part of the XML data structure that contains the AD account name for the user that is to be assigned a task.&lt;/p&gt;  &lt;p&gt;As I stated at the beginning of this article, the ideas conveyed here are not limited only to destination rules. You can use XML data fields through out your K2 processes to meet many different requirements. The most common use of data fields (XML or other wise) in a K2 process is to make the process more dynamic while it is running. Allowing choices to be made by the users of a process instead of hard coding values while the process is being designed. This provides a great deal of flexibility.&lt;/p&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=32601" width="1" height="1"&gt;</content><author><name>jscott</name><uri>http://k2underground.com/members/jscott/default.aspx</uri></author></entry><entry><title>How To: Create InfoPath Task URL</title><link rel="alternate" type="text/html" href="/blogs/fromthebench/archive/2009/08/10/how-to-create-infopath-task-url.aspx" /><id>/blogs/fromthebench/archive/2009/08/10/how-to-create-infopath-task-url.aspx</id><published>2009-08-10T19:21:00Z</published><updated>2009-08-10T19:21:00Z</updated><content type="html">&lt;p&gt;Create an InfoPath URL to open work list item in Forms Services.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Platforms:&lt;/b&gt; K2 blackpearl, K2 blackpoint&lt;/p&gt;&lt;p&gt;&lt;b&gt;Audience:&lt;/b&gt; K2 process designers&lt;/p&gt;&lt;p&gt;&lt;b&gt;Requirements:&lt;/b&gt; This article assumes that the reader has a basic understanding of how to create a K2 process and is familiar with the concepts of processes, activities, events (client event, InfoPath client event and mail event). An understanding of Microsoft SharePoint Server and InfoPath would also be helpful.&lt;/p&gt;&lt;p&gt;&lt;font size="4"&gt;&lt;b&gt;Work List Item URLs - Some Background&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;As much functionality as K2 delivers out of the box, there is constant interest on how to do things a bit more custom. One of the most common is process designers like to use K2’s mail events to send task notifications to users instead of using the out of the box task notifications since they are easier to customize from inside the process.&lt;/p&gt;&lt;p&gt;Part of the information that is commonly included in the body of the email is a link to the task item. This is the same link a user is directed to upon clicking a work list item in either K2 workspace or the Work list web part in Microsoft SharePoint Server.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/clip_image0024_0D6E5F81.jpg"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="clip_image002[4]" border="0" alt="clip_image002[4]" width="244" height="203" src="http://www.k2underground.com/blogs/fromthebench/clip_image0024_thumb_57A8F459.jpg"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;When creating a process that uses an ASP.NET page as the UI, creating the URL is fairly easy and straight forward. The URL is merely the complete website address for the webpage that is being used with a parameter on the end. For example, let’s pretend I have a website that is hosting my web pages called www.mysite.com. The web page I have decided to use as my UI for my process is called mypage.aspx. The complete URL to an ASP.NET based task list item would look something like http://www.mysite.com/mypage.aspx?SN=123_14. The parameter SN is added by K2 and stands for serial number. This is a unique number that identifies this particular work list item. &lt;/p&gt;&lt;p&gt;An important concept to remember as we move forward is how a serial number is created. In the example above, the serial number used in the URL, 123_14, is actually two unique numbers separated by an underscore. These two numbers are the Process ID and the Activity Instance Destination ID.&lt;/p&gt;&lt;p&gt;The what? The who? &lt;/p&gt;&lt;p&gt;The Process ID is a unique number that is assigned to a process each time an instance of that process is started. For example, if you have an expense report process, each time a user submits an expense report that instance of the process will be assigned a unique process id number.&lt;/p&gt;&lt;p&gt;The Activity Instance Destination ID is a unique number that is assigned to each activity in the process that is executed. To create a serial number, you simply use the format Process ID_Activity Instance Destination ID. The good news is that these numbers are easily accessible when you are designing your K2 processes from the K2 Object Browser under the “Workflow Context Browser” tab. &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/clip_image0044_397B36A5.jpg"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="clip_image004[4]" border="0" alt="clip_image004[4]" width="217" height="226" src="http://www.k2underground.com/blogs/fromthebench/clip_image0044_thumb_6C6AC70C.jpg"&gt;&lt;/a&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/clip_image0064_7C2A5C10.jpg"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="clip_image006[4]" border="0" alt="clip_image006[4]" width="213" height="174" src="http://www.k2underground.com/blogs/fromthebench/clip_image0064_thumb_4EC8C640.jpg"&gt;&lt;/a&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/clip_image0084_2C90BABA.jpg"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="clip_image008[4]" border="0" alt="clip_image008[4]" width="185" height="124" src="http://www.k2underground.com/blogs/fromthebench/clip_image0084_thumb_03A5A5B1.jpg"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;So now that you have a basic understanding of a work list item url and how to determine the always important serial number the next step is to show you how to apply these concepts in order to create an InfoPath work list item url.&lt;/p&gt;&lt;p&gt;The InfoPath URL is a bit more complicated than a standard ASPX page. This is because there are a few more moving parts involved. InfoPath work list item URLs do not point directly to the form itself, but start out pointing to a K2 ASP.NET web page that is passed several parameters. The web page will then redirect the user to the correct URL of the InfoPath form. It can sound a bit complicated, but once it is broken down you will see that is actually pretty simple once you know the correct answers for all the parameters.&lt;/p&gt;&lt;p&gt;For the purpose of this post, I will be focusing primarily on what is needed to create an InfoPath work list item URL for an InfoPath form that is going to be delivered via Forms Services. The concepts learned here can be applied to situations where the form is opened using the InfoPath application with some minor modifications.&lt;/p&gt;&lt;p&gt;&lt;font size="4"&gt;&lt;b&gt;The InfoPath Work List Item URL – Deconstructed&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;Here is an example of the InfoPath work list item URL:&lt;/p&gt;&lt;p&gt;http://&amp;lt;workspace_servername&amp;gt;/RuntimeServices/OpenInfoPathTask.aspx?K2Server=&amp;lt;k2 server&amp;gt;&amp;amp;SN=&amp;lt;serial number&amp;gt;&amp;amp;XmlFN=&amp;lt;InfoPath Form Name&amp;gt;&amp;amp;Lib=&amp;lt;MOSS Form Library&amp;gt;&amp;amp;OpenAsWebPage=True&amp;amp;SPURL=&amp;lt;SharePoint Site URL&amp;gt;&amp;amp;Single=True&amp;amp;target=_blank&lt;/p&gt;&lt;p&gt;In this example, I have inserted &amp;lt;variable place holders&amp;gt; to denote the spots that should contain information specific to your environment and K2 process. The list below discusses each of the variables and the values that are expected.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;InfoPath URL Variables:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;· &lt;b&gt;&lt;i&gt;Workspace_servername:&lt;/i&gt;&lt;/b&gt; This is the fully qualified server name (server.yourdomain.com) that hosts the K2 runtime services. If you are using K2 blackpearl this is typically the server upon which you installed K2 Workspace. If you are using K2 blackpoint this will be MOSS web front end where you installed blackpoint. &lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;· &lt;b&gt;&lt;i&gt;K2 Server:&lt;/i&gt;&lt;/b&gt; This is the name of the K2 server. K2 blackpearl users will enter the name of the server where pearl was installed. K2 blackpoint users will enter the name of the MOSS web front end where point was installed.&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;· &lt;b&gt;&lt;i&gt;Serial Number:&lt;/i&gt;&lt;/b&gt; Now you can see why the discussion on the serial number was important. This is where that number is used for an InfoPath work list item. Just remember, Process ID_Activity Instance Destination ID.&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;· &lt;b&gt;&lt;i&gt;InfoPath Form Name:&lt;/i&gt;&lt;/b&gt; This is the name of the InfoPath form that was added to your K2 process when you ran the InfoPath process integration wizard. If you forget the name of the form, it is available from the Solution Explore under the InfoPath Templates folder. The name is the file name you assigned to the form WITHOUT the XSN file extension. For example, if I added a form to my process called MyForm.XSN the InfoPath Form Name that is used in the URL will be MyForm.&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;· &lt;b&gt;MOSS Form Library:&lt;/b&gt; This is the form library that was chosen during the InfoPath integration wizard as the deployment location for the InfoPath form template such as MyFormLibrary.&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;· &lt;b&gt;SharePoint Site URL:&lt;/b&gt; This is the SharePoint site where the form library lives. The variable expects a full URL such as http://mymosssite.yourdomian.com/.&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Using the examples provided in the list above, a complete InfoPath work list URL would look like:&lt;/p&gt;&lt;p&gt;http://server.yourdomain.com/RuntimeServices/OpenInfoPathTask.aspx?K2Server=k2server.yourdomain.com&amp;amp;SN=123_14&amp;amp;XmlFN=MyForm&amp;amp;Lib=MyFormLibrary&amp;amp;OpenAsWebPage=True&amp;amp;SPURL=http://mymosssite.yourdomain.com/&amp;amp;Single=True&amp;amp;target=_blank&lt;/p&gt;&lt;p&gt;If you are not certain what the values are for your environment, you can find answers to many of these in the K2 Object Browser such as workspace_servername which is stored in the K2 Object Browser on the Environment Library tab under Web Service URL. &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/clip_image0104_213780B0.jpg"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="clip_image010[4]" border="0" alt="clip_image010[4]" width="211" height="228" src="http://www.k2underground.com/blogs/fromthebench/clip_image0104_thumb_05464BB8.jpg"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Right click on the node and choose “edit field”. This will open a dialogue box so that you can see the value. &lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;IMPORTANT: DO NOT CHANGE THE VALUE OF THIS FIELD! &lt;/u&gt;&lt;/b&gt;When in doubt, simply click CANCEL when you are ready to close the dialogue box.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/clip_image0124_34B4BA84.jpg"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="clip_image012[4]" border="0" alt="clip_image012[4]" width="244" height="133" src="http://www.k2underground.com/blogs/fromthebench/clip_image0124_thumb_5F407594.jpg"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="4"&gt;&lt;b&gt;Building the InfoPath Work List Item URL in a K2 Process&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;Now that you know how to create a proper InfoPath work list item URL, we can now take a look at how you could go about building this URL inside a K2 process. For this example, we will be looking at how to place this URL inside a Mail Event to be emailed to a process user. You will add a Mail Event to your process and move through the wizard to the Message Body page. The first thing you will want to do is set the Message Format to HTML. This will allow us to enter a bit of HTML code to add a clickable link to the body of the message.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/clip_image0144_3D749D03.jpg"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="clip_image014[4]" border="0" alt="clip_image014[4]" width="244" height="94" src="http://www.k2underground.com/blogs/fromthebench/clip_image0144_thumb_45A8C29A.jpg"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Next, we need to start writing our HTML code to add a link to the email message. To create a link, we will be using the &amp;lt;a&amp;gt; tag with the href attribute.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/clip_image0164_2AFC2681.jpg"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="clip_image016[4]" border="0" alt="clip_image016[4]" width="244" height="92" src="http://www.k2underground.com/blogs/fromthebench/clip_image0164_thumb_7D2E5DBB.jpg"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The href attribute expects a fully qualified URL as its value. This is where we will start to build the InfoPath work list item URL. &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/clip_image0184_06A71C32.jpg"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="clip_image018[4]" border="0" alt="clip_image018[4]" width="244" height="118" src="http://www.k2underground.com/blogs/fromthebench/clip_image0184_thumb_17CAD408.jpg"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In this example, I typed in the URL with correct values with the exception of ProcessID and ActivityInstanceDestID which are displayed in green above. This is because I added these values from the K2 Object Browser by clicking n the ellipse to the right side of the body window, selecting the values and then clicking “add”.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/clip_image0204_4811A8BE.jpg"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="clip_image020[4]" border="0" alt="clip_image020[4]" width="195" height="244" src="http://www.k2underground.com/blogs/fromthebench/clip_image0204_thumb_562071EE.jpg"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Why hard code the whole URL and not the IDs?&lt;/p&gt;&lt;p&gt;As discussed above, the Process ID and the Activity Instance Destination ID are unique for each time the process is ran and for each time an activity is executed so these numbers are always changing and therefore cannot be hard coded. Environments can change. Ideally, a process designer would have set the URL outside of the process in some sort of variable that could be changed later on if the environment changed without having to edit the process. K2 provides this funcaitonality as part of the Environment Library using a field&amp;nbsp;called a “miscellaneous field”.&lt;/p&gt;&lt;p&gt;After the URL is complete, simply finish out the rest of the &amp;lt;a&amp;gt; tag with the necessary information. In my example, I used CLICK ME as the text that would represent the URL in the body of my email. &lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;font size="4"&gt;Conclusion&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;At first glance, the InfoPath work list item URL can seem pretty intimidating. It took me a bit of head scratching to figure it out the first time I attempted to create one, but once you are successful they are easy. The key is to understand what information the URL requires.&lt;/p&gt;&lt;p&gt;This method can be used in other K2 event wizards in which you may want to provide the URL. Another common use is when a SharePoint list is used to display items in process. The list will need to be created with a column that is set to type of hyperlink. A K2 process designer can then use the SharePoint List Items event to make new entries into that list and using this article can set the value of the hyperlink column to the InfoPath URL.&lt;/p&gt;&lt;p&gt;It is important that as a K2 process designer, you will need to remember that your event will only have access to the correct Activity Destination Instance ID from inside the same activity as the InfoPath Client event. Work list items are created by InfoPath client events which derive part of the serial number from the activity destination instance ID.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.k2underground.com/blogs/fromthebench/clip_image0224_28BEDC1E.jpg"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="clip_image022[4]" border="0" alt="clip_image022[4]" width="197" height="104" src="http://www.k2underground.com/blogs/fromthebench/clip_image0224_thumb_31CB679F.jpg"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;This technique can be very useful and address many business scenarios, but it is not without its limitations. Whenever a work list URL is emailed or written out to a list, the URL starts to spoil like fresh fruit and will have a very limited shelf life. For example, if a task is always assigned to a single user, then chances are things will be fine. The situation can become more complicated when there are many users that could be assigned to a task. &lt;/p&gt;&lt;p&gt;The out of the box K2 work list is designed to filter out and remove work list items that expire or are no longer available. This is because it queries the K2 database for the latest snapshot of data everytime the worklist is opened. The link in an email, however, is static. In a scenario where there are multiple users, the first user that clicks on the link can action the item without issue, but this does not remove the email from other users InBox. Thus any of the other users that attempted to open the link from their respective emails would be presented with an error because the link would have become stale. SharePoint lists are preferable to email messages since the K2 process can be designed with steps to keep the list up to date. NOTE: there are scenarios within K2 where a task can be setup to be actioned by multiple users (called “slots”); for the purposes of simplicity in explanation; this example assumes only 1 slot; which is the default.&lt;/p&gt;&lt;p&gt;Personally, I recommend that process designers refrain from embedding specific work list time URLs in an email message. I find a better approach is to include a link to either the K2 workspace, a MOSS site that is home to the K2 work list web part or even a link to a SharePoint list. This way the link can remain static but will send the user to a location that is constantly being refreshed.&lt;/p&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=32445" width="1" height="1"&gt;</content><author><name>jscott</name><uri>http://k2underground.com/members/jscott/default.aspx</uri></author><category term="Infopath" scheme="http://k2underground.com/blogs/fromthebench/archive/tags/Infopath/default.aspx" /><category term="blackpearl" scheme="http://k2underground.com/blogs/fromthebench/archive/tags/blackpearl/default.aspx" /><category term="blackpoint" scheme="http://k2underground.com/blogs/fromthebench/archive/tags/blackpoint/default.aspx" /><category term="forms services" scheme="http://k2underground.com/blogs/fromthebench/archive/tags/forms+services/default.aspx" /><category term="worklist" scheme="http://k2underground.com/blogs/fromthebench/archive/tags/worklist/default.aspx" /><category term="URL" scheme="http://k2underground.com/blogs/fromthebench/archive/tags/URL/default.aspx" /></entry><entry><title>Code Sample: How to use Workflow.Management API to force a process instance to a specific activity</title><link rel="alternate" type="text/html" href="/blogs/fromthebench/archive/2009/08/10/code-sample-how-to-use-workflow-management-api-to-force-a-process-instance-to-a-specific-activity.aspx" /><id>/blogs/fromthebench/archive/2009/08/10/code-sample-how-to-use-workflow-management-api-to-force-a-process-instance-to-a-specific-activity.aspx</id><published>2009-08-10T18:30:00Z</published><updated>2009-08-10T18:30:00Z</updated><content type="html">&lt;P&gt;I was asked today how to use the workflow managment (SourceCode.Workflow.Management.dll) API to programmatically force a process instance to a specific activity.&amp;nbsp; This is done with the GotoActivity method.&amp;nbsp; Below is the code sampe:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void WorkflowManagementGoto(int processinstanceid, string activityname)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // get connection to Workflow.Management for a K2 workflow SERVER admin&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SourceCode.Workflow.Management.WorkflowManagementServer mgmt = new SourceCode.Workflow.Management.WorkflowManagementServer();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mgmt.CreateConnection();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mgmt.Connection.Open(GetConnectionString(5555, "K2Demo", "bpservice", "k2pass"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;mgmt.GotoActivity(processinstanceid, activityname);&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mgmt.Connection.Close();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private string _K2Server = "localhost";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private uint _WFPort = 5252;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private string GetConnectionString(uint port, string domain, string username, string pwd)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder builder =&lt;BR&gt;&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; new SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; builder.Integrated = true;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; builder.IsPrimaryLogin = true;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; builder.Authenticate = true;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; builder.EncryptedPassword = false;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; builder.Host = _K2Server;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; builder.Port = port;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; builder.SecurityLabelName = "K2";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (domain != "")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&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; builder.WindowsDomain = domain;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (username != "")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&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; builder.UserID = username;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (pwd != "")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&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; builder.Password = pwd;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Integrated=True;IsPrimaryLogin=True;Authenticate=True;EncryptedPassword=False;Host=localhost;SecurityLabelName=K2;Port=5252&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return builder.ToString();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=32444" width="1" height="1"&gt;</content><author><name>Bob</name><uri>http://k2underground.com/members/Bob/default.aspx</uri></author></entry><entry><title>Code Sample:  How to add a user to a Working Hour / Zone</title><link rel="alternate" type="text/html" href="/blogs/fromthebench/archive/2009/03/04/code-sample-how-to-add-a-user-to-a-working-hour-zone.aspx" /><id>/blogs/fromthebench/archive/2009/03/04/code-sample-how-to-add-a-user-to-a-working-hour-zone.aspx</id><published>2009-03-04T14:14:00Z</published><updated>2009-03-04T14:14:00Z</updated><content type="html">Recently I needed to expose the ability to add users to an existing Zone / Working Hour Set.&amp;nbsp; This can of course be done manually via K2 Workspace but these requirements needed to do this from a custom application.&amp;nbsp; This can be done pretty easily via the K2 API (SourceCode.Workflow.Management.dll)&lt;br&gt;&lt;p&gt;First you'll need to add a reference in your project to the K2 file SourceCode.Workflow.Management.dll.&amp;nbsp; The below example also uses the K2 connection string builder which is from the&amp;nbsp; file SourceCode.HostClientAPI.dll.&lt;br&gt;&lt;/p&gt;&lt;p&gt;Below is some sample code that can be used to expose this functionality:&lt;br&gt;&lt;/p&gt;&lt;p&gt;
 
  Normal
  0
  
  
  
  
  false
  false
  false
  
  EN-US
  X-NONE
  X-NONE
  
   
   
   
   
   
   
   
   
   
   
   
  
  MicrosoftInternetExplorer4
  
   
   
   
   
   
   
   
   
   
   
   
  

 
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 




 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-qformat:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}



&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
private void Form1_Load(object sender, EventArgs e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
string zoneName = "Sales";&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
string userName = @"K2:K2Demo\CarolM";&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
AddUserToZone(zoneName, userName);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
private void AddUserToZone(string zoneName, string userName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder connectionString =
new&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&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;&amp;nbsp;
SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
connectionString.Authenticate = true;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
connectionString.Host = "localhost";&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
connectionString.Integrated = true;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
connectionString.IsPrimaryLogin = true;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
connectionString.Port = 5555;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
connectionString.Integrated = true;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
// this connection needs to be made as a Workflow admin&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
// in this example we're forcing it to a specific ID.&amp;nbsp; It must be a workflow server admin because&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //only those identities have the rights to set zone users in K2&lt;br&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
connectionString.WindowsDomain = "K2Demo";&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
connectionString.UserID = "bpservice";&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
connectionString.Password = "k2pass";&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
WorkflowManagementServer workflowServer = new WorkflowManagementServer();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
try&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&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;
workflowServer.CreateConnection();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&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;
workflowServer.Connection.Open(connectionString.ToString());&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&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;
if (workflowServer.ZoneExists(zoneName))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&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;
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&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;
workflowServer.UserSetZone(userName, zoneName);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&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;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;catch (Exception ex)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&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;
// do something with the exception&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&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;
throw (ex);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;



&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
finally&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;



&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&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;
workflowServer.Connection.Close();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;



&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;





&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=29219" width="1" height="1"&gt;</content><author><name>Bob</name><uri>http://k2underground.com/members/Bob/default.aspx</uri></author></entry><entry><title>Leverage existing SmartObjects to access new Sharepoint sites created with Templates or Site Definitions</title><link rel="alternate" type="text/html" href="/blogs/fromthebench/archive/2008/11/21/leverage-existing-smartobjects-to-access-new-sharepoint-sites-created-with-templates-or-site-definitions.aspx" /><link rel="enclosure" type="application/msword" length="484864" href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.00.02.73.86/Dynamic-MOSS-SmartObject-Methods.doc" /><id>/blogs/fromthebench/archive/2008/11/21/leverage-existing-smartobjects-to-access-new-sharepoint-sites-created-with-templates-or-site-definitions.aspx</id><published>2008-11-21T17:01:00Z</published><updated>2008-11-21T17:01:00Z</updated><content type="html">&lt;P&gt;Throughout the Sharepoint service interface you will find a curious little property called Sharepoint URL.&amp;nbsp;&amp;nbsp; This url refers to the "site" that you want to run the method against, for instance &lt;A href="http://localhost/somesite"&gt;http://localhost/somesite&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Attached is a Word Doc that walks you through a quick overview of getting an example of this running and understanding how you can leverage this in your processes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=27386" width="1" height="1"&gt;</content><author><name>Joseph</name><uri>http://k2underground.com/members/Joseph/default.aspx</uri></author></entry><entry><title>InfoPath Tip: InfoPath Wizards Part 2 - Conditional Formatting Is Your Friend</title><link rel="alternate" type="text/html" href="/blogs/fromthebench/archive/2008/11/19/infopath-tip-infopath-wizards-part-2-conditional-formatting-is-your-friend.aspx" /><id>/blogs/fromthebench/archive/2008/11/19/infopath-tip-infopath-wizards-part-2-conditional-formatting-is-your-friend.aspx</id><published>2008-11-19T19:12:00Z</published><updated>2008-11-19T19:12:00Z</updated><content type="html">&lt;p class="MsoNormal"&gt;In my last post, I talked about how to create an online wizard using InfoPath and Forms Services. It was a pretty simple process, but I did mention there was a pitfall regarding data validation.&lt;br&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;The pitfall is when using data validation on multiple views in a wizard scenario, the submit button is typically on the last view/page of the wizard. The submit button is responsible for causing data validation to fire. This can create an issue if one of the controls you used 3 pages back has a validation problem. The user is told validation failed, but what they aren’t told is which view contains the offending field. &lt;/p&gt;&lt;p class="MsoNormal"&gt;One way to address this issue is by using conditional formatting.&lt;/p&gt;&lt;p class="MsoNormal"&gt;Conditional formatting allows you to hide or disable controls based on conditions in the form, hence the name. Additionally, there are other formatting options such as read-only or text formatting options.&lt;/p&gt;&lt;p class="MsoNormal"&gt;This approach works best when dealing with situations where the data validation pertains to required fields. You may be able to handle more complex situations, but it will take some creativity and a combination of rules and conditional formatting. For the purpose of this article, I am going to stick to required fields.&lt;/p&gt;&lt;p class="MsoNormal"&gt;Conditional formatting doesn’t actually validate the data, but what it can do is prevent the user from advancing in the wizard if they haven’t filled in all the required fields.&lt;span style="mso-spacerun:yes;"&gt;  &lt;/span&gt;The trick is you don’t apply the formatting rules to the field; you apply the formatting to the navigation button.&lt;/p&gt;&lt;p class="MsoNormal"&gt;In our wizard scenario, to advance from step to step (change from one IP view to the next) we had to provide the user with a NEXT button. What we are going to do is set the conditional formatting to disable the NEXT button if our field we are requiring has been left blank.&lt;/p&gt;&lt;p class="MsoNormal"&gt;First, locate the navigation button on your view, right click and choose “conditional formatting.” You will be presented with a conditional formatting dialogue box. You have the option of adding multiple formatting rules. &lt;/p&gt;&lt;p class="MsoNormal"&gt;Next, click the add button and you will be presented with the “Conditional Format” window. The first line in the window is where you will define the condition.&lt;span style="mso-spacerun:yes;"&gt;  &lt;/span&gt;For this example,I am going to assume I have a field called “name” that I am going to require.In the conditional format window, I would select the “name” field from the first drop down box. The middle drop down is your comparison argument. For this scenario, I am going to select “Is blank”. The third drop down box becomes unavailable since the comparison argument I chose doesn’t’ make a comparison against another field. &lt;span style="mso-spacerun:yes;"&gt; &lt;/span&gt;At this point,you could also click the “And” button which would allow you to add another condition rule to check if you had more than one field required. For example, you could say if Name is blank OR address is blank. Once you click the “And” button, you are given a drop down list so that you may specify the logic that needs to be applied to the second condition.&lt;/p&gt;&lt;p class="MsoNormal"&gt;The bottom half of the window is what sort of formatting isapplied based on the conditions we just defined above. Since I am checking to see if the field is blank because I am going to require that field (in this case the “name” field), I will check “Disable this control.”&lt;span style="mso-spacerun:yes;"&gt;  &lt;/span&gt;The NEXT button will remain on our page, but the user will be unable to click it unless they have provided a value for the name field.&lt;/p&gt;&lt;p class="MsoNormal"&gt;These steps would need to be repeated on the navigation buttons on the rest of the views in our wizard. These steps could even be applied to the submit button on the last view, to prevent submission of the form if certain fields on that page are blank.&lt;/p&gt;&lt;p class="MsoNormal"&gt;The goal of this approach is to prevent the user from advancing to the next page in the wizard if all the fields we need have not been filled out, so refrain from creating conditional formatting rules that reference fields on other views as we are only interested in checking to see if this step in our wizard have been fully completed before allowing the user to advance to the next step.&lt;/p&gt;&lt;p class="MsoNormal"&gt;Granted there are situations where this approach will not work because the validation required is more complex, but works great for scenarios where the need is simply to check if the field has been completed or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=27350" width="1" height="1"&gt;</content><author><name>jscott</name><uri>http://k2underground.com/members/jscott/default.aspx</uri></author></entry><entry><title>InfoPath Tip: Creating a wizard using InfoPath and Form Services</title><link rel="alternate" type="text/html" href="/blogs/fromthebench/archive/2008/11/17/infopath-tip-creating-a-wizard-using-infopath-and-form-services.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="4731" href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.00.02.72.98/wizardexample.zip" /><id>/blogs/fromthebench/archive/2008/11/17/infopath-tip-creating-a-wizard-using-infopath-and-form-services.aspx</id><published>2008-11-17T17:33:00Z</published><updated>2008-11-17T17:33:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;It would seem that InfoPath and I are crossing paths on a more frequent basis these days. I was assigned to assist a client with an interesting idea, they wanted to use InfoPath and Form Services to create a wizard (i.e. a series of web pages) interface for the start of a process, &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;I admit, I had to crack the InfoPath book for this one, but what I found out is that it is actually simple to accomplish! &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;First, you will need to create an InfoPath form with a view for each step (page) in the wizard. For example, let’s assume that you want to create a wizard that consists of 3 steps. You will have a view for Step 1, Step 2 and Step 3. Each view will contain fields for the information that needs to be collected during that step, PLUS one extra feature: the “next” button.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;The nice thing about using Form Services with InfoPath in this scenario is that moving between the pages in our wizard doesn’t require anything special other than a button or two that surfaces the ability to move between the views. The reason is that MOSS manages the session for you and automatically saves the information you are collecting as part of the session as you move from page to page.&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;Visit with the MOSS Administrator to make sure session state has been enabled in your configuration.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;As I mentioned, each of the views will need to have a button on the page that moves the wizard from one view to the next. The configuration of the button is pretty simple. All that is required is one rule on the button that is set to change the view of the form. For example, the button on “Step 1” view would have a rule to change the view to “Step 2”. If you are not sure where to set the rules for your button, just right click on the control and choose Button Properties &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY:Wingdings;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-char-type:symbol;mso-symbol-font-family:Wingdings;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;"&gt;&lt;SPAN style="mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;à&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; Rules… &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY:Wingdings;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-char-type:symbol;mso-symbol-font-family:Wingdings;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;"&gt;&lt;SPAN style="mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;à&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; Add… &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY:Wingdings;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-char-type:symbol;mso-symbol-font-family:Wingdings;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;"&gt;&lt;SPAN style="mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;à&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; Add Action…&lt;/FONT&gt;&lt;/FONT&gt;&lt;SPAN style="mso-no-proof:yes;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;The one key thing to keep in mind when working with InfoPath is that IP is all about the rules. So be prepared for several dialogue boxes and lots of clicking “OK”.&lt;SPAN style="mso-no-proof:yes;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;SPAN style="mso-no-proof:yes;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;The final view in the wizard (in this scenario “Step 3”), the button will be configured as a a submit button instead of using it to change views. If you wanted to add extra functionality, the submit button could be configured to change the view to confirmation page after submit. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;SPAN style="mso-no-proof:yes;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Once the views have been created and the buttons added to control navigation and submission, the IP form is ready to be integrated into a K2 process. All the data that is collected in the various views of the form is saved as part of the session allowing it all to be submitted to K2 during the final step. K2 treats the form just as it would any other InfoPath form, so nothing special is needed within K2 outside of the normal InfoPath integration steps.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;SPAN style="mso-no-proof:yes;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;I was pleasantly surprised with how simple it was to setup a wizard, but it isn’t without a few pitfalls. The primary issue is using multiple views in this configuration is going to cause an interesting situation if the form designer decides to use field validation. IP’s default behavior is to fire validation upon submit. IP will validate all controls configured for validation on all the views, but it will not tell you which control is causing the validation error. There is a pretty quick solution to the situation, but I’ll save that for another post. In the mean time, you can find an example InfoPath form attached to this post.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;SPAN style="mso-no-proof:yes;"&gt;Until next time....&lt;/SPAN&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=27298" width="1" height="1"&gt;</content><author><name>jscott</name><uri>http://k2underground.com/members/jscott/default.aspx</uri></author></entry><entry><title>InfoPath Tip: My form won't open in Form Services!</title><link rel="alternate" type="text/html" href="/blogs/fromthebench/archive/2008/11/13/infopath-tip-my-form-won-t-open-in-form-services.aspx" /><id>/blogs/fromthebench/archive/2008/11/13/infopath-tip-my-form-won-t-open-in-form-services.aspx</id><published>2008-11-13T17:13:00Z</published><updated>2008-11-13T17:13:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;When working at a client site, I ran into a situation where my InfoPath form became cross with me and refused to open in Forms Services. This was confusing because everything had been working great up until that point. Isn’t it that way with most relationships?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;I had been working on my form making changes. One of the changes caused an error in&amp;nbsp;the form which prevented it from opening&amp;nbsp;using just the web browser. Below are a few things to check if you find yourself in a situation where your IP form refuses to open using Form Services.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;mso-fareast-font-family:Arial;"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;1)&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;Check the current patch level of the K2 software&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;. I feel it is always a good rule of thumb to make sure you have the latest and greatest. To find out what level you are on, go into the Control Panel &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Wingdings;mso-ascii-font-family:Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;&lt;SPAN style="mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;à&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt; Add Remove Programs &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Wingdings;mso-ascii-font-family:Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;&lt;SPAN style="mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;à&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt; Check “Show Updates” and compare the version number of the K2 bits to the latest version number listed in the K2 customer portal at &lt;A href="http://portal.k2workflow.com/"&gt;&lt;FONT color=#800080&gt;http://portal.k2workflow.com&lt;/FONT&gt;&lt;/A&gt;. The latest updates and releases can be found under Downloads &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Wingdings;mso-ascii-font-family:Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;&lt;SPAN style="mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;à&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt; BlackPearl.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.25in;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;mso-fareast-font-family:Arial;"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;2)&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;Check to make sure “Web Browser” is selected in the InfoPath Integration wizard. &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;When you add an IP form to your K2 process, you are asked if you want to open the form in InfoPath, Web Browser with No InfoPath or Web Browser. To check this setting, click on the purple InfoPath Integration icon in the upper right hand corner of the design canvas in K2 Designer for Visual Studio. In the wizard window, choose your form and click the edit button on the menu bar above. In the next window, check the “Form Client” option to ensure “web browser” is selected.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;mso-fareast-font-family:Arial;"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;3)&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;Check the Form Library settings in MOSS.&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt; All is in vain if the MOSS form library itself isn’t configured to open the form template in a web browser. During deployment, the form library setting will be made based on your choices when you added your InfoPath form to the process. From time to time, a situation may arise where the form library doesn’t get configured. It could be due to an environmental issue or the form client option was incorrectly set. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.5in;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;In any case, it is a good idea to double check. Navigate to your form library in MOSS, choose Settings &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Wingdings;mso-ascii-font-family:Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;&lt;SPAN style="mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;à&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt; Form Library Settings. Under General Settings, you will find an option for “Advanced Settings.” Here, there will be an option for “Browser-enabled documents” which will need to be set to “Display as web page.” Make the change if needed and click OK to save your changes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;mso-fareast-font-family:Arial;"&gt;&lt;SPAN style="mso-list:Ignore;"&gt;4)&lt;SPAN style="FONT:7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;Check the design of your form. &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;This was the problem in my situation. I had made changes to the form that caused an error. Whenever you make changes to or when you originally design your form, always run the design checker.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.5in;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;Before you begin, you will need to open Tools &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Wingdings;mso-ascii-font-family:Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;&lt;SPAN style="mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;à&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt; Form Options &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Wingdings;mso-ascii-font-family:Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;&lt;SPAN style="mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;à&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt; Compatibility and ensure you have checked “Design a form template that can be opened in a browser or InfoPath.” Also on this page, there will be a text box where you will enter the URL of your MOSS website. InfoPath will use this URL to contact your MOSS server to check the design of the form template.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.5in;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.5in;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;To check your design, choose Tools &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Wingdings;mso-ascii-font-family:Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;&lt;SPAN style="mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;à&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt; Design Checker from inside InfoPath. If your form has any errors or warnings, they will be displayed on the right side of the window. My form had an error with an image I chose to use and was the source of my troubles. I corrected the issue and redeployed. Success!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.5in;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;Please note that these are not in any particular order and assumes you are working in an environment that has been properly configured. You will need to be using the enterpirse version of MOSS which includes Form Serivces, or installed the stand alone Form Services product. A good way to check to see if Form Services is working properly before you get started with K2 is simply create a form library and check the setting from step 3 above. Then, create a web enabled form in InfoPath and deploy directly to your MOSS/FS server from InfoPath. Try to open the form from the library to see if it opens in a web browser as expected. If it works, you are ready to start working with K2. If not, I see additional troubleshooting steps in your future and quality time with the MOSS administrator.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;In my case, since the form had been working before I made changes I should have ran design checker first. It could be considered a best practice to always run design checker to make sure you aren't setting yourself up for an issue later. What is the saying, "An ounce of prevention is worth a pound of cure?"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;Have fun!&lt;/SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.5in;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=27251" width="1" height="1"&gt;</content><author><name>jscott</name><uri>http://k2underground.com/members/jscott/default.aspx</uri></author></entry></feed>