<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://k2underground.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"><channel><title>K2 Underground</title><link>http://k2underground.com/blogs/</link><description>K2 Underground is our new community-driven Web site designed to further empower users (and partners) of the K2 software platform.  We built the new site for you, and our goal is that it becomes a gathering place for both new and experienced users to discuss ideas, ask questions and share solutions. 

 </description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Using K2 connect 4.6.5 deserialize/serialize functionality in K2 smartforms</title><link>http://k2underground.com/blogs/johnny/archive/2013/06/06/using-k2-connect-4-6-5-deserialize-serialize-functionality-in-k2-smartforms.aspx</link><pubDate>Thu, 06 Jun 2013 07:30:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:45328</guid><dc:creator>johnny</dc:creator><slash:comments>0</slash:comments><description>K2 connect 4.6.5 (KB000750) just got released recently. Apart from the designer support for VS2012 and the ability to directly upgrade from existing 4.5 installs, one of the exciting new features is the ability to work with SAP structures and collections using SmartObjects. This is pretty nifty as this basically allows you to use K2 smartforms to insert or display complex SAP data types. So how does this work? Now there is a KB article that shows you how to serialize and de-serialize a structure...(&lt;a href="http://k2underground.com/blogs/johnny/archive/2013/06/06/using-k2-connect-4-6-5-deserialize-serialize-functionality-in-k2-smartforms.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://k2underground.com/aggbug.aspx?PostID=45328" width="1" height="1"&gt;</description></item><item><title>K2 smartform Tips: Using the Transfer Data Rule</title><link>http://k2underground.com/blogs/johnny/archive/2013/05/20/k2-smartform-tips-using-the-transfer-data-rule.aspx</link><pubDate>Mon, 20 May 2013 06:40:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:45216</guid><dc:creator>johnny</dc:creator><slash:comments>2</slash:comments><description>Author: Nuqman Baktiar In this series of tips and tricks, we will showcase how transferring data using the Transfer Data rule to pass a value from one view to the other. Question: How do I transfer a value from one view to the other with K2 smartforms? Answer: STEP 1 Lets start by creating 2 views, ViewA and ViewB , add a textbox and a button for both views. ViewA ViewB In ViewA we will add a rule to display a subview when the button is clicked. This can be done easily from Rules page. Add the rule...(&lt;a href="http://k2underground.com/blogs/johnny/archive/2013/05/20/k2-smartform-tips-using-the-transfer-data-rule.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://k2underground.com/aggbug.aspx?PostID=45216" width="1" height="1"&gt;</description></item><item><title>K2 smartforms 1.0.2 is out!</title><link>http://k2underground.com/blogs/johnny/archive/2013/05/11/k2-smartforms-1-0-2-is-out.aspx</link><pubDate>Fri, 10 May 2013 18:23:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:45177</guid><dc:creator>johnny</dc:creator><slash:comments>0</slash:comments><description>K2 smartforms 1.0.2 has just been released. Don&amp;#39;t let the minor number revision fool you. There is a slew of fixes and new features that has been packed into this exciting release. Some highlights: New Content control (works like an iFrame) PDF control (for snapshotting your form and stores it as a PDF file for use later in emails, reports, etc) View parameters (you can know initialize views with just parameters. The rules stay within the view) Numerous performance enhancements on runtime performance...(&lt;a href="http://k2underground.com/blogs/johnny/archive/2013/05/11/k2-smartforms-1-0-2-is-out.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://k2underground.com/aggbug.aspx?PostID=45177" width="1" height="1"&gt;</description></item><item><title>Setting up a secondary K2 smartform runtime site for anonymous access</title><link>http://k2underground.com/blogs/johnny/archive/2012/10/10/setting-up-a-secondary-k2-smartform-runtime-site-for-anonymous-access.aspx</link><pubDate>Tue, 09 Oct 2012 16:18:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:43810</guid><dc:creator>johnny</dc:creator><slash:comments>0</slash:comments><description>The default K2 smartforms runtime site uses windows authentication and authenticates to Active Directory. However, it is usually a common scenario where you need to create a form that is targeted for external users that do not use Active Directory credentials. e.g. internet users. This article shows you how to make a secondary K2 smartforms runtime folder used for public facing forms (anonymous users). 1) First make a copy of the K2 SmartForms Runtime folder. I am calling mine K2 SmartForms Runtime...(&lt;a href="http://k2underground.com/blogs/johnny/archive/2012/10/10/setting-up-a-secondary-k2-smartform-runtime-site-for-anonymous-access.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://k2underground.com/aggbug.aspx?PostID=43810" width="1" height="1"&gt;</description></item><item><title>Working with Onboarding and K2</title><link>http://k2underground.com/blogs/johnny/archive/2012/10/03/working-with-onboarding-and-k2.aspx</link><pubDate>Wed, 03 Oct 2012 04:32:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:43744</guid><dc:creator>johnny</dc:creator><slash:comments>0</slash:comments><description>I have been working a bit on onboarding processes and utilizing the Active Directory and Exchange Event Wizards makes this really easy to generate user accounts and mailboxes as part of the K2 process. However, there are two issues I noticed: The AD user is generated using the first name and not the full name There is no option to specify an additional proxy SMTP email address for the user. e.g For a user called John Smith, his default email might be JohnS@denallix.com but you might want to add a...(&lt;a href="http://k2underground.com/blogs/johnny/archive/2012/10/03/working-with-onboarding-and-k2.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://k2underground.com/aggbug.aspx?PostID=43744" width="1" height="1"&gt;</description></item><item><title>Deploying the Silverlight package to users using a GPO</title><link>http://k2underground.com/blogs/johnny/archive/2012/09/13/deploying-the-silverlight-package-to-users-using-a-gpo.aspx</link><pubDate>Thu, 13 Sep 2012 03:24:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:43594</guid><dc:creator>johnny</dc:creator><slash:comments>0</slash:comments><description>There are a number of K2 components which leverages off Microsoft Silverlight. The K2 View Flow, K2 designer for SharePoint and the K2 smartform designer utilize Silverlight. So if you decide to expose one or more of these components to end users, they need to install Microsoft Silverlight on their machines first. However in a number of corporate environments, users normally will not be able to directly download components and install them by themselves. So how do we automate this? One of the easy...(&lt;a href="http://k2underground.com/blogs/johnny/archive/2012/09/13/deploying-the-silverlight-package-to-users-using-a-gpo.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://k2underground.com/aggbug.aspx?PostID=43594" width="1" height="1"&gt;</description></item><item><title>VMWare Workstation Long Shutdowns or odd pauses</title><link>http://k2underground.com/blogs/johnny/archive/2012/08/30/vmware-workstation-long-shutdowns-or-odd-pauses.aspx</link><pubDate>Thu, 30 Aug 2012 03:20:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:43456</guid><dc:creator>johnny</dc:creator><slash:comments>0</slash:comments><description>Though this isn&amp;#39;t exactly K2 related but we tend to run a lot of test VMs running off VMware workstation. I thought this tip might be useful to pass along as somebody mentioned that they also faced this issue with VMware. However, I tried the following setting and it works pretty well for me. Add the following entries to this config file. It will be in one of these locations. C:\ProgramData\VMware\VMware Workstation\config.ini C:\Documents and Settings\All Users\Application Data\VMware\VMware...(&lt;a href="http://k2underground.com/blogs/johnny/archive/2012/08/30/vmware-workstation-long-shutdowns-or-odd-pauses.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://k2underground.com/aggbug.aspx?PostID=43456" width="1" height="1"&gt;</description></item><item><title>K2 Tip of the Day : When to use IPCs?</title><link>http://k2underground.com/blogs/johnny/archive/2012/07/27/k2-tip-of-the-day-when-to-use-ipcs.aspx</link><pubDate>Fri, 27 Jul 2012 03:46:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:43191</guid><dc:creator>johnny</dc:creator><slash:comments>0</slash:comments><description>IPCs are a great feature as it allows you to call sub-processes from a main process. However, a customer recently asked me when they should be using IPCs and when not to. This is a tricky question to answer. It should be noted that IPCs are in general a bit more expensive in terms of execution (as we are creating another process instance and also maintaining IPC records to track the relationship). In general, there are two scenarios that would call for IPC usage: When you have sub-processes that...(&lt;a href="http://k2underground.com/blogs/johnny/archive/2012/07/27/k2-tip-of-the-day-when-to-use-ipcs.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://k2underground.com/aggbug.aspx?PostID=43191" width="1" height="1"&gt;</description></item><item><title>K2 XML Fields and XML Schemas</title><link>http://k2underground.com/blogs/k2/archive/2012/07/09/k2-xml-fields-and-xml-schemas.aspx</link><pubDate>Mon, 09 Jul 2012 19:23:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:42996</guid><dc:creator>chrisg</dc:creator><slash:comments>0</slash:comments><description>&lt;h3&gt;&lt;a name="_Toc317080236"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;K2 BlackPearl allows you to define XML fields within a process that can be used to store XML data / documents that are used by the process and / or its user interface. Please note that the K2 process may store multiple copies of the XML field for auditing purposes, which if large can consume a large amount of space in the K2 databases. As such it is generally not wise to store large document attachments inside the XML stored in the K2 process. &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;&lt;span style="font-size:medium;"&gt;XML Schema&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;When defining XML fields in K2 you can specify a Schema which is used by K2 to enable to object browser to display the structure of the XML. This is the difference between seeing a monolithic XML field where K2 is only aware that it has an XML document and in seeing a graphical hierarchical representation of the XML data where each field can be used in the process via drag and drop. Note the difference in the two XML fields defined below: With Schema and Without Schema. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2045.image_5F00_20794A83.png"&gt;&lt;img height="428" width="193" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4276.image_5F00_thumb_5F00_7AA3241F.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;By providing a schema and allowing the object browser to display the data structure a great deal of custom code and manual XML manipulation can be eliminated. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;Please be aware that while you can provide a schema K2 does not perform a strict validation of the XML either when setting the value via the API or when consuming the data from within the process. Thus, there are no issues with adding new elements and/or attributes to the XML that are not in the schema. This loose coupling provides the advantages of being able to easily access fields defined in the schema from within the K2 Design Tools while maintaining the flexibility to allow external systems to extend the XML without requiring you to update the K2 process definition. Obviously, it is possible to have breaking XML changes such the removal of a field that the K2 process is using, but this would be an issue even with custom code where an XSD is not defined within K2.&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a name="_Toc316050050"&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;An XML Schema file (*.XSD) can easily be created from a representative sample XML file using the XSD.exe utility found in the Windows Platform SDK. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;The simplest use of this utility is simply (with the Win SDK in the path) is&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;XSD.exe Source.xml&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;An additional useful option is /outputdir which allows you to specify where the XSD should be written. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;CSD.exe Source.xml /outputdir:&amp;rdquo;C:\XSDOutputFolder\&amp;rdquo;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;For additional information about XSD.exe please reference: &lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/x6c1kb0s(v=vs.100).aspx"&gt;&lt;span style="font-size:small;"&gt;http://msdn.microsoft.com/en-us/library/x6c1kb0s(v=vs.100).aspx&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a name="_Toc316050051"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;In the K2 Object Brower switch to the third vertical tab button named, &amp;ldquo;Process / Activity Data&amp;rdquo;. Expand the XML Fields tree node as shown and right click on the Process name (&amp;lsquo;XML Test&amp;rsquo; is this case) and click Add (shown below).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2438.image_5F00_0B3B1F0E.png"&gt;&lt;img height="181" width="323" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7416.image_5F00_thumb_5F00_4A98D29E.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;This will open the Add XML Field dialog. Type a value in the Name field&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8308.image_5F00_696F467C.png"&gt;&lt;img height="344" width="336" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3108.image_5F00_thumb_5F00_3F3F9894.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;Switch to the XML Schema tab, click the Browse button and select the XSD file created in the previous step and click Open. The XML Schema tab will look similar to the following depending on the namespace used in the Schema. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2045.image_5F00_124A35B9.png"&gt;&lt;img height="365" width="356" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2438.image_5F00_thumb_5F00_7156C311.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;Click OK. You should now have a new XML field in the object browser. Note, how you can see all of the child elements even the ones nested multiple levels deep. Any of these can be used with the K2 wizards including Smart Objects (SmO) calls without needing custom code to extract and store the values in data fields.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4276.image_5F00_5063506A.png"&gt;&lt;img height="414" width="199" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6330.image_5F00_thumb_5F00_6E615E5E.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:medium;"&gt;&lt;em&gt;This blog written by Jon Coign&lt;/em&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=42996" width="1" height="1"&gt;</description></item><item><title>Access SQL Server Information for a K2 process Part 2</title><link>http://k2underground.com/blogs/k2/archive/2012/07/02/access-sql-server-information-for-a-k2-process-part-2.aspx</link><pubDate>Mon, 02 Jul 2012 18:47:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:42943</guid><dc:creator>chrisg</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;span style="font-size:small;"&gt;In the previous &lt;a href="http://k2underground.com/blogs/k2/archive/2012/06/18/access-sql-server-information-for-a-k2-process-part-1.aspx"&gt;post&lt;/a&gt;, I showed you how to expose SQL Server objects such as tables and stored procedures as SmartObjects in K2.&amp;nbsp; In this post, we&amp;rsquo;ll take it one step further and actually work with SQL information by using a SmartObject inside a K2 process.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;
&lt;p&gt;&lt;br /&gt;As you already know, K2 offers a dynamic SQL Service broker that can be used to immediately access SQL information.&amp;nbsp; Basically there are 3 options available for registering a new SQL Server Service Instance:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;bull;&amp;nbsp;&amp;nbsp;&amp;nbsp; Broker Management Tool:&amp;nbsp; &amp;lt; Installation Directory&amp;gt;\ServiceBroker\BrokerManagement.exe &lt;br /&gt;&amp;bull;&amp;nbsp;&amp;nbsp;&amp;nbsp; SmartObject Services Tester Tool:&amp;nbsp; &amp;lt; Installation Directory&amp;gt;\bin\SmartObject Service Tester.exe &lt;br /&gt;&amp;bull;&amp;nbsp;&amp;nbsp;&amp;nbsp; K2&amp;rsquo;s SQL Server Data Management:&amp;nbsp; SharePoint Central Administration&lt;/p&gt;
&lt;p&gt;Previously, I used SharePoint Central Administration to generate the SQL SmartObjects for my database.&amp;nbsp;&amp;nbsp; K2 automatically generated the basic CRUD functionality for these database tables (and also provided a List method).&amp;nbsp; By default, when K2 generates the SmartObjects through the SharePoint Data Management interface (in Central Administration), they are placed within the SQL Category as shown below through K2 Studio: &lt;/p&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6471.image_5F00_0A6FA561.png"&gt;&lt;img height="427" width="254" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5700.image_5F00_thumb_5F00_53B24A5C.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;span style="font-size:small;"&gt; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;Great, now that we have our SmartObjects, how do we use them within K2? &lt;br /&gt;Firstly, K2 offers 3 design canvases to create workflows: &lt;br /&gt;&amp;bull;&amp;nbsp;&amp;nbsp;&amp;nbsp; K2 Designer for SharePoint &amp;ndash; Offers a no-code design experience, browser-based, and fully-housed in SharePoint, allows you to create SharePoint based solutions &lt;br /&gt;&amp;bull;&amp;nbsp;&amp;nbsp;&amp;nbsp; K2 Studio &amp;ndash; Offers a no-code design experience, allows you to create both SharePoint and non-SharePoint based solutions, more functionality including the ability to create SmartObjects &lt;br /&gt;&amp;bull;&amp;nbsp;&amp;nbsp;&amp;nbsp; K2 Designer for Visual Studio &amp;ndash; All the features in K2 Studio and more, including access to code. &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;For more detailed information on these canvases, check out www.k2.com &lt;br /&gt;In this example, we will be using K2 Studio.&amp;nbsp; But, keep in mind that K2 Designer for Visual Studio offers pretty much the same design experience as K2 Studio.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;br /&gt;For K2 Designer for SharePoint, you will need to configure access to the SmartObjects through SharePoint.&amp;nbsp; The main reason for this is that often times, you may not want to expose critical system functionality to the broader SharePoint audience.&amp;nbsp; For this reason, K2 allows you to select which SmartObjects methods you&amp;rsquo;d like to expose.&amp;nbsp; This setting can be accessed in SharePoint via K2 Site Settings.&amp;nbsp; Within the K2 Site Settings, under the K2 Designer for SharePoint Management section there is a link to Configure SmartObject Access.&amp;nbsp; After you configure access to the SmartObjects, you will see a new tab appear in the K2 Designer for SharePoint which will allow you access to SmartObject methods:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0284.image_5F00_3971E138.png"&gt;&lt;img height="123" width="445" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1273.image_5F00_thumb_5F00_38997B4E.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;span style="font-size:small;"&gt; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;Now back to K2 Studio, to invoke any of the SmartObject&amp;rsquo;s methods is really easy.&amp;nbsp; In K2 Studio (and K2 Designer for Visual Studio), all you need to do is drag the SmartObject Event onto the Design Canvas (see below):&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2335.image_5F00_09D3C2AC.png"&gt;&lt;img height="391" width="378" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2335.image_5F00_thumb_5F00_04F10EF0.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;span style="font-size:small;"&gt; &lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;A wizard will then appear to guide you through the specific configuration steps for the SmartObject method.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7115.image_5F00_07B6C3E3.png"&gt;&lt;img height="343" width="384" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5074.image_5F00_thumb_5F00_2D404144.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;span style="font-size:small;"&gt; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;For example, let&amp;rsquo;s say that we&amp;rsquo;d like to create a new Applicant from within the process.&amp;nbsp; &lt;br /&gt;First we need to click Next, this will take us to the screen where we specify the SmartObject method that should be called.&amp;nbsp; In our scenario, we need to locate the &amp;ldquo;Create&amp;rdquo; method for the Applicant SmartObject (from within the Context Browser).&amp;nbsp; The Context Browser is accessible either through the ellipsis button or by clicking on the arrow found on the right-side of the wizard (see below):&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&amp;nbsp;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6545.image_5F00_331AE4DD.png"&gt;&lt;img height="304" width="355" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8105.image_5F00_thumb_5F00_43B2DFCB.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;/span&gt;
&lt;p&gt;&lt;br /&gt;In the top tab of the Context Browser, you will see the SmartObject Server section, expand this section and locate the SmartObject and the method you&amp;rsquo;d like to invoke.&amp;nbsp; In this example, we will drag-and-drop the Applicant SmartObject&amp;rsquo;s &amp;ldquo;Create&amp;rdquo; method from into the SmartObject Method (see below). &lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2742.image_5F00_50ACBFDC.png"&gt;&lt;img height="222" width="375" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6557.image_5F00_thumb_5F00_6F1700C5.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;Now that we have defined our SmartObject method, click Next, and the Wizard will guide us through the remaining configuration items such as input parameters and output parameters, which can be a combination of data process fields or statically defined inputs (as seen below):&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7127.image_5F00_26E944E9.png"&gt;&lt;img height="233" width="389" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6064.image_5F00_thumb_5F00_616444BD.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;span style="font-size:small;"&gt; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;At this point, we can click Finish, or we can store the output (ie. like an ApplicantID) for future use. &lt;/span&gt;&lt;span style="font-size:small;"&gt;And that&amp;rsquo;s it!&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;To summarize, we&amp;rsquo;ve used a SmartObject inside a K2 process to create information inside a SQL Server table.&amp;nbsp; In other words, we created a new applicant within the Applicant SQL table, without code.&amp;nbsp; We did this by using the Applicant SmartObject (which was generated by K2), then invoking its Create method from within a K2 process.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;As you can see, SmartObjects are an important part of the K2 platform, not only in terms of integration but they also allow non-technical (and technical) people the ability to easily work with information stored in different line of business systems to create powerful-process driven applications.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;strong&gt;This blog written by Melissa Layupan&lt;/strong&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=42943" width="1" height="1"&gt;</description></item><item><title>Consolidating Views</title><link>http://k2underground.com/blogs/k2/archive/2012/06/25/consolidating-views.aspx</link><pubDate>Mon, 25 Jun 2012 19:57:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:42883</guid><dc:creator>chrisg</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;K2 houses its repositories in Microsoft SQL Server. In a K2 version where there is a single database or older versions where there are multiple databases there is always one data server for each K2 Logical Server/K2 Farm (Network Load Balanced Servers). Organizations may have multiple K2 logical servers/farms which are configured to separate K2 Data Servers for reasons of dividing the company&amp;rsquo;s workflow, geographically or functionally. In such cases, normally the Worklist and K2 Reports will be aware of only one data server and its content per K2 Farm.&lt;/p&gt;
&lt;p&gt;If management then wants to consolidate data content from these separate K2 data servers for a unified report, there are various approaches to take to combine the data. This is not trivial as each data server will have a set of primary keys on its tables which will not be globally unique, and thus the solution to combining the data will require a logical server identifier in combined views or aggregations of the data.&lt;/p&gt;
&lt;p&gt;OOTB reports, SmartObjects and several other components of a K2 installation are not able to switch to this &amp;ldquo;combined&amp;rdquo; scenario, as they depend on the keys from a single logical K2 data server.&lt;/p&gt;
&lt;p&gt;Yes. That means custom reports will need to be constructed over the combined data servers content to accommodate an extra indicator for the data server as part of the various entities&amp;rsquo; primary keys.&lt;/p&gt;
&lt;p&gt;For example, the Process Instance ID will be unique on K2 Data Server A, as will the Activity Instance ID. These two vital keys combine to make the all-important Serial Number that matches positioning of a workflow instance and activity instances. If one were to combine the data from two separate K2 data servers, those keys will be found again on the second of those data servers, and thus no realization of where the data really is&amp;hellip;.not to mention keys that cannot properly join n associations to other entities. You have to add a K2 Server ID to make a complex key on Process Instances and Activity Instances.&lt;/p&gt;
&lt;h3&gt;&lt;a name="_Toc323336820"&gt;First approach the data aggregation&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Before one begins to register K2 Sql Service Instances for each K2 Data Store and generate K2 ServiceObjects which can be composited to a single K2 SmartObject, let&amp;rsquo;s consider where processingpower should occur if this combined data access has a chance to perform well.&lt;/p&gt;
&lt;p&gt;Since K2 data is housed in Microsoft Sql Server, it is best practice to keep the data combining effort from multiple K2 data servers in the Sql Server Engine before we try to surface it in any data access technology. We will add components to the K2 data servers to make this feasible.&lt;/p&gt;
&lt;h3&gt;&lt;a name="_Toc323336821"&gt;Do not alter the schema of The k2 database&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;There is no need to alter any parts of the K2 database to enable this functionality. In fact, you may trap yourself if you tried altering K2 data stores (not to mention the invalidation of your license and support). When K2 updates occur &amp;ndash; they may impact those data stores. An abstraction concept is needed here to enable responsibility to any changes in K2 database.&lt;/p&gt;
&lt;h3&gt;&lt;a name="_Toc323336822"&gt;The consolidation strategy&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;As all data servers will be Sql Server instances, we can easily use Linked Servers, a construct which allows for accessing data from different servers from the native or local Sql Server instance. I recommend that a database is created on the business application data servers, since reports will likely be built against these data stores along with other business solution related data of the organization.&lt;/p&gt;
&lt;p&gt;The &amp;ldquo;Biz&amp;rdquo; Data Server will then &amp;ldquo;Link&amp;rdquo; to all of the K2 Data Servers.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8037.image_5F00_0496B41E.png"&gt;&lt;img height="295" width="386" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0508.image_5F00_thumb_5F00_1BE1B88F.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;&lt;a name="_Toc323336823"&gt;Preparation for Linking servers&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;There is plenty of documentation at Microsoft on using Linked Servers. Using the tools in Sql Server Management Studio (SSMS), you will achieve that I am outlining below with Sql Scripts.&lt;/p&gt;
&lt;p&gt;(1) Create a &amp;ldquo;shell&amp;rdquo; database on each K2 Data Server. This abstraction will keep hands of the actual K2 database AND enable maintenance as needed in the objects created in the &amp;ldquo;shell&amp;rdquo; database to respond to any evolutions that occur in the K2 databases, and preserve your consolidation strategy. I recommend these are contained in a schema as well, which is created as well as shown in this script.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2677.image_5F00_4C288D45.png"&gt;&lt;img height="238" width="423" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0027.image_5F00_thumb_5F00_005CB68C.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;(1) Create Views in the &amp;ldquo;shell&amp;rdquo; database qualified by the database name, schema and object. Alias all the columns so this abstraction will always expose a consistent column name.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4214.image_5F00_3F4E3727.png"&gt;&lt;img height="265" width="413" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5126.image_5F00_thumb_5F00_4528DAC0.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here are more samples of possible views&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1172.image_5F00_283FB5EB.png"&gt;&lt;img height="247" width="414" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6371.image_5F00_thumb_5F00_353995FC.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2654.image_5F00_6D780D14.png"&gt;&lt;img height="258" width="409" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4214.image_5F00_thumb_5F00_00B8C3B4.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7457.image_5F00_78C12151.png"&gt;&lt;img height="254" width="403" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7851.image_5F00_thumb_5F00_4FD60C48.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7848.image_5F00_5CCFEC59.png"&gt;&lt;img height="303" width="404" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4214.image_5F00_thumb_5F00_7F447B14.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1172.image_5F00_5A46BA9B.png"&gt;&lt;img height="296" width="404" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8831.image_5F00_thumb_5F00_315BA592.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;(1) This is a possible sample for retrieving data the same as some OOTB SmartObjects. This is a reworked version of the query that extracts Activity Destination Instances.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;PART 1 &amp;ndash; Output columns&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7848.image_5F00_7693FCBB.png"&gt;&lt;img height="350" width="444" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1581.image_5F00_thumb_5F00_75BB96D1.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;PART 2 &amp;ndash; remaining output columns&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3730.image_5F00_19088B77.png"&gt;&lt;img height="207" width="465" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3644.image_5F00_thumb_5F00_6D57C17A.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;PART 3 &amp;ndash; Begin From Clause&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8422.image_5F00_17C3F298.png"&gt;&lt;img height="41" width="285" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8037.image_5F00_thumb_5F00_1757BFA3.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;PART 4 &amp;ndash; Begin First of three sub-queries, columns&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3618.image_5F00_2BDD0F21.png"&gt;&lt;img height="178" width="366" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2642.image_5F00_thumb_5F00_4B1FB5F4.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;PART 5 &amp;ndash; First sub-query &amp;ldquo;Duration&amp;rdquo; column&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3225.image_5F00_758BE711.png"&gt;&lt;img height="171" width="366" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7853.image_5F00_thumb_5F00_7B668AAA.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;PART 6 &amp;ndash; End of first sub-query&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0508.image_5F00_68B190F3.png"&gt;&lt;img height="115" width="364" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5775.image_5F00_thumb_5F00_79B5BED6.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;PART 7 &amp;ndash; Second sub-query&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3225.image_5F00_39137267.png"&gt;&lt;img height="244" width="381" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7838.image_5F00_thumb_5F00_505E76D8.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;PART 8 &amp;ndash; Third sub-query&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5775.image_5F00_7D7363A6.png"&gt;&lt;img height="251" width="409" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3323.image_5F00_thumb_5F00_0E0B5E95.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0676.image_5F00_2D4E0568.png"&gt;&lt;img height="142" width="416" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3618.image_5F00_thumb_5F00_7A11CBFE.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1172.image_5F00_32504317.png"&gt;&lt;img height="41" width="307" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4621.image_5F00_thumb_5F00_26BA85D8.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;PART 9 &amp;ndash; Other Joins/Lookups&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7357.image_5F00_3F4A2328.png"&gt;&lt;img height="139" width="363" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4214.image_5F00_thumb_5F00_249D870F.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;&lt;a name="_Toc323336824"&gt;The SECURE CONNECTIONS&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To prepare for Linking Servers, create a SQL Login account on the K2 Data Server and on the &amp;ldquo;shell&amp;rdquo; and K2 databases.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5873.image_5F00_55508EBA.png"&gt;&lt;img height="288" width="389" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2161.image_5F00_thumb_5F00_7A6DD926.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;&lt;a name="_Toc323336825"&gt;CREATE THE LINKED SERVERS&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Now, on the Business Data Server, you can make Linked Servers to the K2 Data Servers.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2664.image_5F00_0767B938.png"&gt;&lt;img height="263" width="436" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1663.image_5F00_thumb_5F00_705937FB.png" alt="image" border="0" title="image" style="background-image:none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;&lt;a name="_Toc323336826"&gt;CREATE THE DISTRIBUED VIEWS&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Now create a schema to hold the distributed views to be made over the linked servers.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2148.image_5F00_164EE852.png"&gt;&lt;img height="139" width="387" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6862.image_5F00_thumb_5F00_07A43C6D.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A sample Process Instance View&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1072.image_5F00_02C188B1.png"&gt;&lt;img height="265" width="426" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5488.image_5F00_thumb_5F00_12ED50AA.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A sample Activity Instance View&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6378.image_5F00_18C7F443.png"&gt;&lt;img height="299" width="350" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6763.image_5F00_thumb_5F00_01B97307.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sample Activity Destination Instance View&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1588.image_5F00_5CBBB28D.png"&gt;&lt;img height="292" width="367" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3125.image_5F00_thumb_5F00_7406B6FE.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;PART 2&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7357.image_5F00_5A3280CF.png"&gt;&lt;img height="264" width="379" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0676.image_5F00_thumb_5F00_6ACA7BBD.png" alt="image" border="0" title="image" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:small;"&gt;This blog written by Jeff Belnap&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=42883" width="1" height="1"&gt;</description><enclosure url="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.00.04.28.83/DistroViewsScripts.zip" length="5387" type="application/x-zip-compressed" /></item><item><title>K2 4.6.1 Tip of the Day : ADUM Logging</title><link>http://k2underground.com/blogs/johnny/archive/2012/06/22/k2-4-6-1-tip-of-the-day-adum-logging.aspx</link><pubDate>Fri, 22 Jun 2012 04:17:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:42845</guid><dc:creator>johnny</dc:creator><slash:comments>0</slash:comments><description>Saw this useful tip on the grapevine (Thanks to Vernon for this) when troubleshooting issues with the Active Directory User Manager (ADUM) provider. In 4.6.1, more advanced debugging can be enabled by setting additional flags in the RoleInit field in the SecurityLabels table in the K2HostServer database. There are two settings explained in KB001286 , LogLevel and LogSize . LogLevel values can be set to None , Error , Debug , All (in order of increasing amount of log data). LogSize specifies the size...(&lt;a href="http://k2underground.com/blogs/johnny/archive/2012/06/22/k2-4-6-1-tip-of-the-day-adum-logging.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://k2underground.com/aggbug.aspx?PostID=42845" width="1" height="1"&gt;</description></item><item><title>Access SQL Server Information for a K2 process Part 1</title><link>http://k2underground.com/blogs/k2/archive/2012/06/18/access-sql-server-information-for-a-k2-process-part-1.aspx</link><pubDate>Mon, 18 Jun 2012 15:58:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:42802</guid><dc:creator>chrisg</dc:creator><slash:comments>1</slash:comments><description>&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;A common question I receive is how to access SQL Server information from within a K2 process.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;So, I thought I&amp;rsquo;d dedicate a couple posts around how to do just that, this is actually Part 1 of a 2 Part series.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;In part 1, I&amp;rsquo;ll show you how to expose SQL Server information (like SQL Tables) as SmartObjects in K2.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;For part 2, we&amp;rsquo;ll take a look at how you can access the SmartObjects from within a K2 process.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;In this scenario, we will begin to create an Employee Onboarding process which needs access to information stored within a company&amp;rsquo;s HRIS database.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Since the database is a SQL Server database, we can use the out-of-the-box Dynamic SQL Server Service Broker which is provided by K2.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;In blackpearl, you have a few options for registering the Service Instance to the HRIS database.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;For example, you can use: &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpFirst" style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 38.25pt;tab-stops:428.25pt;mso-add-space:auto;mso-list:l1 level1 lfo1;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-fareast-font-family:symbol;mso-bidi-font-family:symbol;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style="font-size:11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-size:11pt;"&gt;Broker Management Tool:&lt;/span&gt;&lt;span style="mso-spacerun:yes;"&gt;&lt;span style="font-size:11pt;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="line-height:10pt;"&gt;&lt;span style="font-size:9pt;"&gt;&amp;lt; Installation Directory&amp;gt;\ServiceBroker\BrokerManagement.exe&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="line-height:12pt;mso-bidi-font-size:9.0pt;"&gt;&lt;span style="font-size:10pt;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 38.25pt;tab-stops:428.25pt;mso-add-space:auto;mso-list:l1 level1 lfo1;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-fareast-font-family:symbol;mso-bidi-font-family:symbol;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style="font-size:11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="line-height:13pt;mso-bidi-font-size:9.0pt;"&gt;&lt;span style="font-size:11pt;"&gt;SmartObject Services Tester Tool:&lt;/span&gt;&lt;span style="mso-spacerun:yes;"&gt;&lt;span style="font-size:11pt;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="line-height:10pt;"&gt;&lt;span style="font-size:9pt;"&gt;&amp;lt; Installation Directory&amp;gt;\bin\SmartObject Service Tester.exe&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="line-height:10pt;"&gt;&lt;span style="font-size:9pt;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 10pt 38.25pt;tab-stops:428.25pt;mso-add-space:auto;mso-list:l1 level1 lfo1;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-fareast-font-family:symbol;mso-bidi-font-family:symbol;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style="font-size:11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-size:11pt;"&gt;K2&amp;rsquo;s SQL Server Data Management:&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;SharePoint Central Administration&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;Of the 3 options above, I find myself spending the most time within SmartObject Services Tester tool.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;It&amp;rsquo;s a great utility tool for not only registering new Service Brokers (and their instances) but it also makes it easy to create and test SmartObjects outside of K2&amp;rsquo;s designers, which is really valuable since often times you&amp;rsquo;ll want to test that your SmartObjects work as expected before wiring them up to a process. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;In this example, we will be using the K2&amp;rsquo;s SQL Server Data Management found within SharePoint Central Administration to generate our HRIS SmartObjects.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;*As a side note, even though I will be using Central Administration to create the HRIS SmartObjects (mainly because this technique applies to both K2 blackpearl and blackpoint), I&amp;rsquo;d still like to suggest that you check out the SmartObject Services Tester Tool if you haven&amp;rsquo;t done so already, hopefully you&amp;rsquo;ll find it as useful as I do.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;In Central Administration, go to the &lt;b style="mso-bidi-font-weight:normal;"&gt;K2 for SharePoint&lt;/b&gt; then look for the &lt;b style="mso-bidi-font-weight:normal;"&gt;Data Management&lt;/b&gt; section.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Located within the Data Management section is a link &lt;b style="mso-bidi-font-weight:normal;"&gt;to Manage SQL SmartObjects&lt;/b&gt; (see below).&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span style="mso-no-proof:yes;"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1512.clip_5F00_image002_5F00_4847096D.jpg"&gt;&lt;img height="339" width="615" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3681.clip_5F00_image002_5F00_thumb_5F00_4702708E.jpg" alt="clip_image002" border="0" title="clip_image002" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;Clicking on the link will take you to a page which lists all the different databases that K2 currently accesses.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;On this screen, click the &lt;b style="mso-bidi-font-weight:normal;"&gt;New Connection&lt;/b&gt; link at the top:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span style="mso-no-proof:yes;"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3175.clip_5F00_image004_5F00_6CF820E4.jpg"&gt;&lt;img height="281" width="590" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8468.clip_5F00_image004_5F00_thumb_5F00_4C04AE3D.jpg" alt="clip_image004" border="0" title="clip_image004" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;Now specify the details of the connection such as:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;Connection Settings&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpFirst" style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 1in;tab-stops:428.25pt;mso-add-space:auto;mso-list:l3 level1 lfo2;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-fareast-font-family:symbol;mso-bidi-font-family:symbol;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style="font-size:11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-size:11pt;"&gt;Connection Name:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:11pt;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;This is the name of the connection.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;The name is typically something that let&amp;rsquo;s other users know what the connection is for.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;In my case, since I&amp;rsquo;m connecting to the HRIS database, I&amp;rsquo;ll name my connection:&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;HRIS.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 10pt 1in;tab-stops:428.25pt;mso-add-space:auto;mso-list:l3 level1 lfo2;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-fareast-font-family:symbol;mso-bidi-font-family:symbol;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style="font-size:11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-size:11pt;"&gt;Description&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:11pt;"&gt;:&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Enter a description for the connection (optional)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;SQL Settings&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpFirst" style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 1in;tab-stops:428.25pt;mso-add-space:auto;mso-list:l2 level1 lfo3;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-fareast-font-family:symbol;mso-bidi-font-family:symbol;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style="font-size:11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-size:11pt;"&gt;Server&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:11pt;"&gt;:&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;This is the name of the SQL Server. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 1in;tab-stops:428.25pt;mso-add-space:auto;mso-list:l2 level1 lfo3;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-fareast-font-family:symbol;mso-bidi-font-family:symbol;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style="font-size:11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-size:11pt;"&gt;Database&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:11pt;"&gt;:&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;The name of the database.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 10pt 1in;tab-stops:428.25pt;mso-add-space:auto;mso-list:l2 level1 lfo3;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-fareast-font-family:symbol;mso-bidi-font-family:symbol;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style="font-size:11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-size:11pt;"&gt;Authentication&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:11pt;"&gt;:&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Specify the credentials for authentication to the database&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;Database Settings:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 10pt 1in;tab-stops:428.25pt;mso-add-space:auto;mso-list:l0 level1 lfo4;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-fareast-font-family:symbol;mso-bidi-font-family:symbol;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style="font-size:11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-size:11pt;"&gt;Authentication&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:11pt;"&gt;:&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Specify the credentials for retrieving schema information &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;In this example, the connection information looks as follows:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span style="mso-no-proof:yes;"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8054.clip_5F00_image006_5F00_79199B0B.jpg"&gt;&lt;img height="463" width="564" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3162.clip_5F00_image006_5F00_thumb_5F00_5ED931E7.jpg" alt="clip_image006" border="0" title="clip_image006" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;"&gt;&lt;span style="font-size:11pt;"&gt;Once the connection information is filled out, click the &amp;ldquo;OK&amp;rdquo; button.&lt;/span&gt;&lt;span style="mso-spacerun:yes;"&gt;&lt;span style="font-size:11pt;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;"&gt;&lt;span style="font-size:11pt;"&gt;K2 will then use the Dynamic SQL Server Service broker in conjunction with the connection information to retrieve the database&amp;rsquo;s objects like the tables, stored procedures and views.&lt;/span&gt;&lt;span style="mso-spacerun:yes;"&gt;&lt;span style="font-size:11pt;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;K2 will then allow you to &amp;ldquo;check&amp;rdquo; all objects you&amp;rsquo;d like to create SmartObjects for:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span style="mso-no-proof:yes;"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0458.clip_5F00_image008_5F00_28F43CCD.jpg"&gt;&lt;img height="244" width="507" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8372.clip_5F00_image008_5F00_thumb_5F00_1C8619A4.jpg" alt="clip_image008" border="0" title="clip_image008" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;In my sample database, I only have 4 tables, so I&amp;rsquo;ll select everything and click the Create button.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;K2 will now automatically generate the corresponding SmartObjects for each of the tables I&amp;rsquo;ve selected.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;These SmartObjects will contain the basic CRUD functionality as well as a List operation, and by default, K2 will place the SmartObjects within the SQL Category.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;tab-stops:428.25pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;Now that the SmartObjects are created, this means that they are also available for use within a K2 process and can be accessible via K2 Studio and K2 Designer for Visual Studio.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;For example, when I open K2 Studio and open the Objects Browser, and expand the SQL folder under the SmartObject Server, you&amp;rsquo;ll notice a new folder named &amp;ldquo;HRIS&amp;rdquo; which contains all of the newly created SmartObjects (see below):&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;span style="mso-no-proof:yes;"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3326.clip_5F00_image010_5F00_4389BB06.jpg"&gt;&lt;img height="855" width="507" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6064.clip_5F00_image010_5F00_thumb_5F00_5736A49A.jpg" alt="clip_image010" border="0" title="clip_image010" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;In this post, we&amp;rsquo;ve seen how K2 simplifies SQL Server data access by providing the Dynamic SQL Server Service broker.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;This service broker allows you to quickly work with and gain access to information stored within SQL Server.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;In my next post, we&amp;rsquo;ll see how you can use the SQL SmartObjects within a K2 Process. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;span style="color:#000000;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;span style="color:#000000;font-size:small;"&gt;&lt;em&gt;This blog post Written by Melissa Layupan&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;span&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;&amp;nbsp;&lt;/span&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=42802" width="1" height="1"&gt;</description></item><item><title>How to Automate Document Assembly from within a K2 Process</title><link>http://k2underground.com/blogs/k2/archive/2012/06/04/how-to-automate-document-assembly-from-within-a-k2-process.aspx</link><pubDate>Mon, 04 Jun 2012 20:04:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:42728</guid><dc:creator>chrisg</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In this article, I will show you how to create new documents from within a K2 process. &lt;br /&gt;Automating content is an essential component to those committed to a paperless office.&amp;nbsp; Especially in terms of time, savings, and convenience, document assembly is shown to be a huge win for document-centric processes such as contract management, HR, legal, compliance, etc.&amp;nbsp; &lt;br /&gt;What you&amp;rsquo;ll need: &lt;br /&gt;&amp;bull;&amp;nbsp;&amp;nbsp;&amp;nbsp; K2 (blackpoint/blackpearl) &lt;br /&gt;&amp;bull;&amp;nbsp;&amp;nbsp;&amp;nbsp; SharePoint (MOSS, 2010) &lt;br /&gt;&amp;bull;&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft Word &lt;br /&gt;Step #1:&amp;nbsp; Create a Template &lt;br /&gt;The first step is to create a Word Template for the type of document you&amp;rsquo;d like to assemble.&amp;nbsp; In my example, I am creating a template for a Proposal Letter that will be sent out to prospective customers: &lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0842.image_5F00_1878C883.png"&gt;&lt;img height="353" width="378" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7128.image_5F00_thumb_5F00_1DE73927.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Step #2:&amp;nbsp; Add Content Controls &lt;br /&gt;Now that we have our template, the next step is to add some Content Controls.&amp;nbsp; These Content Controls act as placeholders for the dynamic content that will be added later to the document via K2.&amp;nbsp; &lt;br /&gt;First, you&amp;rsquo;ll need to verify that you can access the Developer tab within the ribbon:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6237.image_5F00_0091E15D.png"&gt;&lt;img height="79" width="463" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4578.image_5F00_thumb_5F00_7B42FAAB.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;If you do not see the tab, then you&amp;rsquo;ll need to enable it.&amp;nbsp; Please refer to the following link for instructions:&amp;nbsp; &lt;a href="http://msdn.microsoft.com/en-us/library/bb608625.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb608625.aspx&lt;/a&gt; &lt;br /&gt;Next add a control to the template by putting the cursor to where you&amp;rsquo;d like the content control to appear then click on the Plain Text Content Control:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8787.image_5F00_0C47288F.png"&gt;&lt;img height="125" width="541" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6622.image_5F00_thumb_5F00_23FE5FF5.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;Now you&amp;rsquo;ll need to provide your content control with a meaningful name by clicking on Properties:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7608.image_5F00_3BB5975B.png"&gt;&lt;img height="89" width="541" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1348.image_5F00_thumb_5F00_21752E37.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;For my template, I am adding a content control to hold a name, so I updated the Content Control Properties as: &lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5732.image_5F00_274FD1D0.png"&gt;&lt;img height="233" width="206" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0336.image_5F00_thumb_5F00_5464BE9E.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Your first content control should look something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5141.image_5F00_5796A686.png"&gt;&lt;img height="340" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5141.image_5F00_thumb_5F00_245A6D1D.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt; &lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can add as many content controls as you wish, this can include any piece of information that K2 has access to such as values from a database, calculations, or dates. &lt;br /&gt;Step #3:&amp;nbsp; SharePoint &amp;ndash; Update Document Library Template &lt;br /&gt;Now that we have our document template, we need to upload this template to a SharePoint document library.&amp;nbsp; In my example, I am going to create a new document library and update the base Document content type template: &lt;br /&gt;&amp;bull;&amp;nbsp;&amp;nbsp;&amp;nbsp; In your document library &lt;br /&gt;o&amp;nbsp;&amp;nbsp;&amp;nbsp; Goto the Document Library Settings &lt;br /&gt;o&amp;nbsp;&amp;nbsp;&amp;nbsp; Click on Advanced Settings -&amp;gt; Allow Management of Content Types (yes) &lt;br /&gt;o&amp;nbsp;&amp;nbsp;&amp;nbsp; Click on the Document Content Type located within the Content Types section &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Click Advanced Settings &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Upload your document template&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6131.image_5F00_3C11A483.png"&gt;&lt;img height="182" width="551" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7215.image_5F00_thumb_5F00_69269151.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Step #4:&amp;nbsp; K2 &amp;ndash; Assemble the document from within a K2 process &lt;br /&gt;Included in all of K2&amp;rsquo;s design canvases is the K2 Word Wizard.&amp;nbsp; This wizard allows you to build documents on the fly in K2 by leveraging SharePoint and Word Services.&amp;nbsp; I am going to use the K2 Designer for SharePoint to assemble the proposal letters, but you can also use K2 Studio and K2 Designer for Visual Studio to do the same thing.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8204.image_5F00_2F374E65.png"&gt;&lt;img height="235" width="494" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2821.image_5F00_thumb_5F00_2E5EE87B.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;First let&amp;rsquo;s create a new document, by dragging the &amp;lsquo;Create Document&amp;rsquo; wizard onto the design canvas and filling out the information:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7380.image_5F00_1175C3A6.png"&gt;&lt;img height="324" width="430" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7215.image_5F00_thumb_5F00_50674441.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;bull;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select the document library &amp;ndash; Select the document library that holds your template.&amp;nbsp; Note that the generated file will be found in this library. &lt;br /&gt;&amp;bull;&amp;nbsp;&amp;nbsp;&amp;nbsp; Document Reference Name &amp;ndash; This is the K2 process reference to the newly created document (we will use this reference later to set the data in our Content Control) &lt;br /&gt;&amp;bull;&amp;nbsp;&amp;nbsp;&amp;nbsp; Content Type &amp;ndash; The content type of the document.&amp;nbsp; In my case, I updated the template for the base Document content type, so I will leave it as Document. &lt;br /&gt;&amp;bull;&amp;nbsp;&amp;nbsp;&amp;nbsp; File Name &amp;ndash; The name of the generated file. &lt;br /&gt;Now let&amp;rsquo;s update the Content Control inside my template.&amp;nbsp; For that, we&amp;rsquo;ll need to add a new workflow step and drag onto the step the &amp;lsquo;Update Document Content Control&amp;rsquo; wizard.&amp;nbsp; Let&amp;rsquo;s now complete the wizard by filling in the missing information:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0336.image_5F00_6F3DB81F.png"&gt;&lt;img height="198" width="552" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4062.image_5F00_thumb_5F00_5C1C8B73.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &lt;br /&gt;On this page, we need to enter 3 pieces of information: &lt;br /&gt;1)&amp;nbsp;&amp;nbsp;&amp;nbsp; From (Text) &amp;ndash; This field defines the value for the Content Control.&amp;nbsp; I am selecting the &amp;lsquo;Text&amp;rsquo; option because the value is text-based.&amp;nbsp; In this case, I just typed in my name but you can use information in the Context Browser (or process variables) just the same. &lt;br /&gt;2)&amp;nbsp;&amp;nbsp;&amp;nbsp; Into (Referenced Document) &amp;ndash; We need to specify the document that needs to be updated.&amp;nbsp; In the previous &amp;lsquo;Create Document&amp;rsquo; wizard we defined the reference value. &lt;br /&gt;3)&amp;nbsp;&amp;nbsp;&amp;nbsp; Into (Content Control Name) &amp;ndash; This is the name of the content control to update.&amp;nbsp; In my template, content control was named &amp;lsquo;Name&amp;rsquo;, so I just typed it in, but again, you can set this field using the Context Browser or process variables. &lt;br /&gt;In the end, my simple example process looked like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8272.image_5F00_6D20B956.png"&gt;&lt;img height="249" width="450" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6131.image_5F00_thumb_5F00_6BDC2077.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;After running the process, the newly created document will be found in the same document library where the template was updated&amp;hellip;.&amp;nbsp; And here&amp;rsquo;s how it looks:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8360.image_5F00_06A84684.png"&gt;&lt;img height="462" width="431" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0336.image_5F00_thumb_5F00_76B901BF.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt; &lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hopefully, this article gave you some ideas of how you might be able to leverage K2 in your different document automation scenarios.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;This blog post by Melissa Layupan&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=42728" width="1" height="1"&gt;</description></item><item><title>Using Linq for XML in K2</title><link>http://k2underground.com/blogs/k2/archive/2012/05/29/using-linq-for-xml-in-k2.aspx</link><pubDate>Tue, 29 May 2012 14:45:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:42698</guid><dc:creator>chrisg</dc:creator><slash:comments>0</slash:comments><description>&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;1) Overview&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;With the addition of the &lt;i&gt;Data Event&lt;/i&gt; to K2 blackpearl, the requirement to drop into code to work with XML data has been significantly reduced. But it still happens. Fortunately, gone are the days of guesstimating X-paths and troubleshooting unreadable namespaces to find a required value in the maze of an XML document &amp;ndash; enters &lt;i&gt;Linq for XML&lt;/i&gt; (refered to as XLinq onwards). XLinq allows the developer to write SQL-like queries in code against an XML document to find a specific XML node, or a collection of nodes.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;In the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;System.Xml&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; namespace coding paradigm, the XML is formatted into a tree structure where a specific node in that tree can only be found by determining its relative path to the root node (i.e. the X-path), thus access to any node in the Xml document starts at the root node. Contradictory, the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;System.Xml.Linq&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; coding paradigm of XLinq sorts all the nodes in the XML document in a long, single-file list where nodes can be accessed at random using their name in &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span lang="EN-ZA" style="font-family:&amp;#39;Courier New&amp;#39;;color:#1f497d;font-size:10pt;mso-ansi-language:EN-ZA;"&gt;select&lt;/span&gt;&lt;/i&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;-statements (queries). Once the required node has been selected, relational nodes (parent, siblings, descendants, etc.) can&amp;nbsp; also be found easily.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;When learning XLinq, Google will be your best friend &amp;ndash; there is a ton of information out there. Here is two articles that I found:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="mso-ansi-language:EN-ZA;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb387087.aspx"&gt;&lt;span style="font-family:Calibri;color:#0000ff;font-size:small;"&gt;http://msdn.microsoft.com/en-us/library/bb387087.aspx&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="mso-ansi-language:EN-ZA;"&gt;&lt;a href="http://www.dreamincode.net/forums/topic/218979-linq-to-xml/"&gt;&lt;span style="font-family:Calibri;color:#0000ff;font-size:small;"&gt;http://www.dreamincode.net/forums/topic/218979-linq-to-xml/&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;For the purposes of this blog, I&amp;rsquo;m going to stick to the objects and techniques to work with Xml-Fields in the context of a K2 blackpearl process, but should be general enough to be applied to other development areas. Hopefully this will explain the power of using XLinq when you need to drop into code.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;2) The Usual Suspects&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;To start using XLinq, you need to include the following namespaces in your &lt;i&gt;Default Server Event&lt;/i&gt; code:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;using&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt; System.Linq;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;using&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt; System.Xml.Linq;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;Within the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;System.Xml.Linq&lt;/span&gt;&lt;span lang="EN-ZA" style="mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; &lt;span style="color:#1f497d;"&gt;namespace, you&amp;rsquo;ll be using the following classes:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph"&gt;&lt;span lang="EN-ZA" style="font-family:Symbol;font-size:9.5pt;mso-ansi-language:EN-ZA;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&amp;middot;&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;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#2b91af;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;XDocument&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph"&gt;&lt;span lang="EN-ZA" style="font-family:Symbol;font-size:9.5pt;mso-ansi-language:EN-ZA;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&amp;middot;&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;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#2b91af;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;XElement&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph"&gt;&lt;span lang="EN-ZA" style="font-family:Symbol;font-size:9.5pt;mso-ansi-language:EN-ZA;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&amp;middot;&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;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#2b91af;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;XAttribute&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;The &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#2b91af;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;XDocument&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; class is used to read the XML string into a usable object, which is very similar to &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;System.Xml.&lt;span style="color:#2b91af;"&gt;XmlDocument&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; class used previously. The &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#2b91af;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;XDocument&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; object contains the undated value of the XML if it was updated as part of your code. This class will be used to read the K2 Xml-Field&amp;rsquo;s value, and to update its value at the end of your &lt;i&gt;Default Server Event&lt;/i&gt; code.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;The &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#2b91af;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;XElement&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; class is used to represent a XML node (my understanding &amp;ndash; may not be politically correct) within your XML document. This object provides the following methods, which is commonly used:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph"&gt;&lt;span lang="EN-ZA" style="font-family:Symbol;font-size:9.5pt;mso-ansi-language:EN-ZA;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&amp;middot;&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;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;Ancestors()&amp;nbsp;&amp;nbsp;&amp;nbsp;&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-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;Returns list of all the nodes &amp;lsquo;above&amp;rsquo; (not just parent) a specific XML node in the XML document&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph"&gt;&lt;span lang="EN-ZA" style="font-family:Symbol;font-size:9.5pt;mso-ansi-language:EN-ZA;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&amp;middot;&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;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;Attributes()&amp;nbsp;&amp;nbsp;&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-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;Returns a list of attributes for the XML node&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph"&gt;&lt;span lang="EN-ZA" style="font-family:Symbol;font-size:9.5pt;mso-ansi-language:EN-ZA;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&amp;middot;&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;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;ElementsAfterSelf()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;Returns a list of all sibling-nodes after the XML node&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph"&gt;&lt;span lang="EN-ZA" style="font-family:Symbol;font-size:9.5pt;mso-ansi-language:EN-ZA;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&amp;middot;&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;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;ElementsBeforeSelf()&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-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;Returns a list of all sibling-nodes before the XML node&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph"&gt;&lt;span lang="EN-ZA" style="font-family:Symbol;font-size:9.5pt;mso-ansi-language:EN-ZA;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&amp;middot;&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;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;Descendants()&amp;nbsp;&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-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;Returns all nodes &amp;lsquo;below&amp;rsquo; (not just children) the XML node in the XML document&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;This class is basically the &amp;lsquo;worker&amp;rsquo; class and is used to find/query XML nodes, update or remove them.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;The &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#2b91af;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;XAttribute&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; class is used to work with the attributes for a &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#2b91af;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;XElement&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; object.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;3) The script&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;The XML below is used in the remainder of the blog in the concepts, examples and coding techniques. Note that the XML structure is similar ( I customized it for some of the examples) to that of a Process Xml-Field created when an InfoPath form is integrated into a Process Definition.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:myFields&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:CreatedBy&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;Eugene Jones&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;my:CreatedBy&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:DateCreated&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;04/10/2012&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;my:DateCreated&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:ProcessID&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt; &lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:red;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;ProcessName&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;=&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;quot;&lt;span style="color:blue;"&gt;SomeProcess&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;StartDate&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;04/12/2012&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;14&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;my:ProcessID&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:StartView&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:No&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;1234&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;my:No&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:Comments&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;Some comments&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;my:Comments&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:SerialNumber&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;SN9284&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;my:SerialNumber&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:MachineID&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;284&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;my:MachineID&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:WarrantyAdminADAccount&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;DENALLIX\Blake&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;my:WarrantyAdminADAccount&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:Distributor&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:DistributorID&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;5&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;my:DistributorID&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:DistributorName&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;ACME Int&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;my:DistributorName&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:Distributor&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:SomeAttachment&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt; &lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:red;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;xsi:nil&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;=&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;quot;&lt;span style="color:blue;"&gt;true&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;my:SomeAttachment&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:MyContacts&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:Contact&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt; &lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:red;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;No&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;=&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;quot;&lt;span style="color:blue;"&gt;2&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;pc:Person&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;pc:DisplayName&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;Bob Maggio&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;pc:DisplayName&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;pc:AccountId&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;DENALLIX\bob&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;pc:AccountId&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;pc:AccountType&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;User&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;pc:AccountType&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;pc:Person&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:Contact&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:Contact&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt; &lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:red;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;No&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;=&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;quot;&lt;span style="color:blue;"&gt;1&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;pc:Person&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;pc:DisplayName&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;Codi Kaji&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;pc:DisplayName&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;pc:AccountId&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;DENALLIX\codi&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;pc:AccountId&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;pc:AccountType&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;User&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;pc:AccountType&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;pc:Person&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:Contact&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:Contact&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt; &lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:red;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;No&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;=&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;quot;&lt;span style="color:blue;"&gt;3&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;pc:Person&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;pc:DisplayName&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;Mike Tally&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;pc:DisplayName&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;pc:AccountId&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;DENALLIX\mike&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;pc:AccountId&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;pc:AccountType&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;User&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;pc:AccountType&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;pc:Person&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:Contact&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:MyContacts&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:StartView&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;lt;/&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:myFields&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;4) Practical Examples &amp;ndash; working with XLinq&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span lang="EN-ZA" style="color:#1f497d;font-size:10pt;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;"&gt;4.1) Act I: Get XML into and out of XDocument&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;The first step in working with XLinq is read the XML into a &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#2b91af;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;XDocument&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; object. This can be done either from a XML file or XML string value. Here is how to do it:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Read from XML file on file-system&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.IO.&lt;span style="color:#2b91af;"&gt;StreamReader&lt;/span&gt; fileReader = &lt;span style="color:blue;"&gt;new&lt;/span&gt; System.IO.&lt;span style="color:#2b91af;"&gt;StreamReader&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;@&amp;quot;C:\temp\myForm.xml&amp;quot;&lt;/span&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;XDocument&lt;/span&gt; xDoc = &lt;span style="color:#2b91af;"&gt;XDocument&lt;/span&gt;.Load(fileReader);&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileReader.Close();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileReader.Dispose();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;OR&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Read from XML string&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;XDocument&lt;/span&gt; xDoc = &lt;span style="color:#2b91af;"&gt;XDocument&lt;/span&gt;.Parse(&lt;span style="color:#a31515;"&gt;&amp;quot;&amp;lt;XmlStart&amp;gt;...&amp;lt;/XmlEnd&amp;gt;&amp;quot;&lt;/span&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;To obtain the complete XML string, it is as easy as to call the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;ToString()&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; method on the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#2b91af;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;XDocument&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; object.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xDoc.ToString();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span lang="EN-ZA" style="color:#1f497d;font-size:10pt;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;"&gt;4.2) Act II: Select a specific node using its name&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;Now that we have our XML in the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#2b91af;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;XDocument&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; object, this object can be used to find a specific node in the XML document. For example, to find the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:SerialNumber&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; node (&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:myFields&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;/&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:StartView&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;/&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:SerialNumber&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;), the following code can be used:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;XElement&lt;/span&gt; xSerialNumber = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; item &lt;span style="color:blue;"&gt;in&lt;/span&gt; xDoc.Descendants()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;where&lt;/span&gt; item.Name.LocalName == &lt;span style="color:#a31515;"&gt;&amp;quot;SerialNumber&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;select&lt;/span&gt; item).FirstOrDefault();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;The &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;FirstOrDefault()&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; method states that if the query returns multiple matches, the first node should be used. To get the actual value for the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;SerialNumber&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; node, the following code can be used:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;string&lt;/span&gt; serialNumber = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; item &lt;span style="color:blue;"&gt;in&lt;/span&gt; xDoc.Descendants()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;where&lt;/span&gt; item.Name.LocalName == &lt;span style="color:#a31515;"&gt;&amp;quot;SerialNumber&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;select&lt;/span&gt; item.Value).FirstOrDefault();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;OR&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;string&lt;/span&gt; serialNumber = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; item &lt;span style="color:blue;"&gt;in&lt;/span&gt; xDoc.Descendants()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;where&lt;/span&gt; item.Name.LocalName == &lt;span style="color:#a31515;"&gt;&amp;quot;SerialNumber&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;select&lt;/span&gt; item).FirstOrDefault().Value;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;Set the value of a node, the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;SetValue()&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; method can be used. Note that this method updates the actual XML in the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#2b91af;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;XDocument&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; object.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;XElement&lt;/span&gt; xDistributorName = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; item &lt;span style="color:blue;"&gt;in&lt;/span&gt; xDoc.Descendants()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;where&lt;/span&gt; item.Name.LocalName == &lt;span style="color:#a31515;"&gt;&amp;quot;DistributorName&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;select&lt;/span&gt; item).FirstOrDefault();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xDistributorName.SetValue(&lt;span style="color:#a31515;"&gt;&amp;quot;ACME Supplies Inc&amp;quot;&lt;/span&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span lang="EN-ZA" style="color:#1f497d;font-size:10pt;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;"&gt;4.3) Act III: Select a multiple nodes using conditions&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;Working with a collection of nodes/repeating nodes in Linq for XML is really easy. To select all the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:Contact&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; nodes in the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;lt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:MyContacts&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:MyContacts&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:blue;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; section, the following code can be used:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;XElement&lt;/span&gt;&amp;gt; myContacts = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; contact &lt;span style="color:blue;"&gt;in&lt;/span&gt; xDoc.Descendants()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;where&lt;/span&gt; contact.Name.LocalName.ToUpper() == &lt;span style="color:#a31515;"&gt;&amp;quot;Contact&amp;quot;&lt;/span&gt;.ToUpper()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;select&lt;/span&gt; contact).ToList();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;To select all the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;pc:AccountId&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; nodes, and to sort them by name, the following code can be used:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;XElement&lt;/span&gt;&amp;gt; myContacts = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; contact &lt;span style="color:blue;"&gt;in&lt;/span&gt; xDoc.Descendants()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;where&lt;/span&gt; contact.Name.LocalName.Contains(&lt;span style="color:#a31515;"&gt;&amp;quot;AccountId&amp;quot;&lt;/span&gt;) == &lt;span style="color:blue;"&gt;true&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;orderby&lt;/span&gt; contact.Value&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;select&lt;/span&gt; contact).ToList();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;To order descending, use:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;XElement&lt;/span&gt;&amp;gt; myContacts = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; contact &lt;span style="color:blue;"&gt;in&lt;/span&gt; xDoc.Descendants()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;where&lt;/span&gt; contact.Name.LocalName.Contains(&lt;span style="color:#a31515;"&gt;&amp;quot;AccountId&amp;quot;&lt;/span&gt;) == &lt;span style="color:blue;"&gt;true&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;select&lt;/span&gt; contact).OrderByDescending(x =&amp;gt; x.Value).ToList();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span lang="EN-ZA" style="color:#1f497d;font-size:10pt;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;"&gt;4.4) Act IV: Working with attributes&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;To get the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#2b91af;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;XAttributes&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; for a node, you have to get a &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#2b91af;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;XElement&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; object to the node first. To get the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:red;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;ProcessName&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; attribute of the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;ProcessID&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; node, the following code can be used:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;XElement&lt;/span&gt; xProcessID = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; item &lt;span style="color:blue;"&gt;in&lt;/span&gt; xDoc.Descendants()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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="color:blue;"&gt;where&lt;/span&gt; item.Name.LocalName == &lt;span style="color:#a31515;"&gt;&amp;quot;ProcessID&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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="color:blue;"&gt;select&lt;/span&gt; item).FirstOrDefault();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;XAttribute&lt;/span&gt; xProcessName = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; attribute &lt;span style="color:blue;"&gt;in&lt;/span&gt; xProcessID.Attributes()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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 style="color:blue;"&gt;where&lt;/span&gt; attribute.Name.LocalName == &lt;span style="color:#a31515;"&gt;&amp;quot;ProcessName&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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 style="color:blue;"&gt;select&lt;/span&gt; attribute).FirstOrDefault();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;Attributes can also be used to filter and sort a list of repeating nodes. For example, to return all the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;Contact&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; nodes of which the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:red;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;No&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; attribute is greater than one and sorted numerically, the following code can be used:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;XElement&lt;/span&gt;&amp;gt; myContacts = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; item &lt;span style="color:blue;"&gt;in&lt;/span&gt; xDoc.Descendants()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;where&lt;/span&gt; ((item.Name.LocalName == &lt;span style="color:#a31515;"&gt;&amp;quot;Contact&amp;quot;&lt;/span&gt;) &amp;amp;&amp;amp; (&lt;span style="color:#2b91af;"&gt;Int32&lt;/span&gt;.Parse(item.Attribute(&lt;span style="color:#a31515;"&gt;&amp;quot;No&amp;quot;&lt;/span&gt;).Value) &amp;gt; 1))&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;orderby&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Int32&lt;/span&gt;.Parse(item.Attribute(&lt;span style="color:#a31515;"&gt;&amp;quot;No&amp;quot;&lt;/span&gt;).Value)&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;select&lt;/span&gt; item).ToList();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span lang="EN-ZA" style="color:#1f497d;font-size:10pt;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;"&gt;4.5) Act V: Changes to the XML document&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;First thing to understand is that any change made to an Linq for XML object is immediately reflected in that object&amp;rsquo;s &amp;lsquo;parent&amp;rsquo; object(s). To explain this behaviour, consider the following code:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Read from XML file on file-system&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileReader = &lt;span style="color:blue;"&gt;new&lt;/span&gt; System.IO.&lt;span style="color:#2b91af;"&gt;StreamReader&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;@&amp;quot;C:\temp\myForm.xml&amp;quot;&lt;/span&gt;); &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xDoc = &lt;span style="color:#2b91af;"&gt;XDocument&lt;/span&gt;.Load(fileReader); &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileReader.Close();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileReader.Dispose();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Example 1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Find the my:DistributorName node&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;XElement&lt;/span&gt; xDistributorName = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; item &lt;span style="color:blue;"&gt;in&lt;/span&gt; xDoc.Descendants()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;where&lt;/span&gt; item.Name.LocalName == &lt;span style="color:#a31515;"&gt;&amp;quot;DistributorName&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;select&lt;/span&gt; item).FirstOrDefault();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Set the new value for the my:DistributorName node&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xDistributorName.SetValue(&lt;span style="color:#a31515;"&gt;&amp;quot;ACME Supplies Inc&amp;quot;&lt;/span&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Example 2&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Find the ProcessID node&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;XElement&lt;/span&gt; xProcessID = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; item &lt;span style="color:blue;"&gt;in&lt;/span&gt; xDoc.Descendants()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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="color:blue;"&gt;where&lt;/span&gt; item.Name.LocalName == &lt;span style="color:#a31515;"&gt;&amp;quot;ProcessID&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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="color:blue;"&gt;select&lt;/span&gt; item).FirstOrDefault();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Find the ProcessName attribute of the my:ProcessID node&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;XAttribute&lt;/span&gt; xProcessName = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; attribute &lt;span style="color:blue;"&gt;in&lt;/span&gt; xProcessID.Attributes()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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 style="color:blue;"&gt;where&lt;/span&gt; attribute.Name.LocalName == &lt;span style="color:#a31515;"&gt;&amp;quot;ProcessName&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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 style="color:blue;"&gt;select&lt;/span&gt; attribute).FirstOrDefault();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Set the new value for the ProcessName attribute&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xProcessName.SetValue(&lt;span style="color:#a31515;"&gt;&amp;quot;NewProcessName123&amp;quot;&lt;/span&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;In the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:green;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;Example 1&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; above, the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;xDoc &lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;object is used to create/find the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;xDistributorName &lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;object. When the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;xDistributorName &lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;object&amp;rsquo;s value is updated, this change is immediately reflected in the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;xDoc &lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;object. Similarly in &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:green;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;Example 2&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;, the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;xDoc &lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;object is used to create/find the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;xProcessID &lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;object, which then used to create the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;xProcessName &lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;object. When the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;xProcessName &lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;object&amp;rsquo;s value is updated, the change is immediately reflected in both the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;xDoc &lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;and &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;xProcessID &lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;objects.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:green;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;Example 1&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; above shows how to update the value of a node in the XML document, whereas &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:green;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;Example 2&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; shows how to update the value of an attribute. Below is other common changes that are done to the XML document.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;To remove a node (&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:DistributorID&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; in this example) from the XML document, the following code can be used:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Example 3&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;XElement&lt;/span&gt; xDistributorID = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; item &lt;span style="color:blue;"&gt;in&lt;/span&gt; xDoc.Descendants()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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 style="color:blue;"&gt;where&lt;/span&gt; item.Name.LocalName == &lt;span style="color:#a31515;"&gt;&amp;quot;DistributorID&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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 style="color:blue;"&gt;select&lt;/span&gt; item).FirstOrDefault();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xDistributorID.Remove();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;Note that the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;Remove()&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; method also removes all the nodes child-nodes from the XML document. The &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;RemoveAll()&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; method on the other hand basically &amp;lsquo;clears&amp;rsquo; the node from all attributes and children and sets the node to an empty value.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;To remove a list of nodes (&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:Contact&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; in this example) from the XML document, the following code can be used:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Example 4&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;XElement&lt;/span&gt;&amp;gt; myContacts = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; contact &lt;span style="color:blue;"&gt;in&lt;/span&gt; xDoc.Descendants()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;where&lt;/span&gt; contact.Name.LocalName == &lt;span style="color:#a31515;"&gt;&amp;quot;Contact&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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; &lt;span style="color:blue;"&gt;select&lt;/span&gt; contact).ToList();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color:#2b91af;"&gt;XElement&lt;/span&gt; xContact &lt;span style="color:blue;"&gt;in&lt;/span&gt; myContacts)&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xContact.Remove();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;To remove an attribute (&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:red;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;StartDate&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt; from the &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:ProcessID&lt;/span&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;) from a node in the XML document, the following code can be used:&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Example 5&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;XElement&lt;/span&gt; xProcessID = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; item &lt;span style="color:blue;"&gt;in&lt;/span&gt; xDoc.Descendants()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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="color:blue;"&gt;where&lt;/span&gt; item.Name.LocalName == &lt;span style="color:#a31515;"&gt;&amp;quot;ProcessID&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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="color:blue;"&gt;select&lt;/span&gt; item).FirstOrDefault();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;XAttribute&lt;/span&gt; xStartDate = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; attribute &lt;span style="color:blue;"&gt;in&lt;/span&gt; xProcessID.Attributes()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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 style="color:blue;"&gt;where&lt;/span&gt; attribute.Name.LocalName == &lt;span style="color:#a31515;"&gt;&amp;quot;StartDate&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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 style="color:blue;"&gt;select&lt;/span&gt; attribute).FirstOrDefault();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xStartDate.Remove();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;To create a new attribute for a node (&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;color:#a31515;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;my:Comments&lt;/span&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; in this example) in the XML document, the following code can be used:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Example 6&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;XElement&lt;/span&gt; xComment = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; item &lt;span style="color:blue;"&gt;in&lt;/span&gt; xDoc.Descendants()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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="color:blue;"&gt;where&lt;/span&gt; item.Name.LocalName == &lt;span style="color:#a31515;"&gt;&amp;quot;Comments&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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="color:blue;"&gt;select&lt;/span&gt; item).FirstOrDefault();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xComment.SetAttributeValue(&lt;span style="color:#a31515;"&gt;&amp;quot;NewAttributeName&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;New Attribute Value&amp;quot;&lt;/span&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;Finally, here is the code required to empty-out an attachment control value in the InfoPath Form XML:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Read from XML from the InfoPath Form XML field&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xDoc = &lt;span style="color:#2b91af;"&gt;XDocument&lt;/span&gt;.Parse(K2.ProcessInstance.XmlFiels[&lt;span style="color:#a31515;"&gt;&amp;quot;myInfoPathForm&amp;quot;&lt;/span&gt;].Value); &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Create the required &amp;lsquo;xsi&amp;rsquo; namespace object&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;XNamespace&lt;/span&gt; xsi = &lt;span style="color:#a31515;"&gt;&amp;quot;&lt;a href="http://www.w3.org/2001/XMLSchema-instance"&gt;&lt;span style="color:#0000ff;"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/span&gt;&lt;/a&gt;&amp;quot;&lt;/span&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Find the my:SomeAttachment node in the XML document&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;XElement&lt;/span&gt; xAttachment = (&lt;span style="color:blue;"&gt;from&lt;/span&gt; items &lt;span style="color:blue;"&gt;in&lt;/span&gt; xDoc.Descendants()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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="color:blue;"&gt;where&lt;/span&gt; items.Name.LocalName == &lt;span style="color:#a31515;"&gt;&amp;quot;SomeAttachment&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&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="color:blue;"&gt;select&lt;/span&gt; items).FirstOrDefault();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Set the value of the node to an empty string&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xAttachment.SetValue(&lt;span style="color:blue;"&gt;string&lt;/span&gt;.Empty);&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Create and add the &amp;lsquo;xsi:nil&amp;rsquo; attribute to indicate to InfoPath that the node is empty&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;if&lt;/span&gt; (xAttachment.FirstAttribute == &lt;span style="color:blue;"&gt;null&lt;/span&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xAttachment.Add(&lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;XAttribute&lt;/span&gt;(xsi + &lt;span style="color:#a31515;"&gt;&amp;quot;nil&amp;quot;&lt;/span&gt;, &lt;span style="color:blue;"&gt;true&lt;/span&gt;));&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Save the XML data back to the Process Xml-Field&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="font-family:Consolas;font-size:9.5pt;mso-ansi-language:EN-ZA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; K2.ProcessInstance.XmlFiels[&lt;span style="color:#a31515;"&gt;&amp;quot;myInfoPathForm&amp;quot;&lt;/span&gt;].Value = xDoc.ToString();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;Hopefully this blog gave you some insight into using XLinq with XML data within a K2 Process and in general, as well as to provide you with some handy XLinq techniques.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-ZA" style="color:#1f497d;mso-ansi-language:EN-ZA;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;strong&gt;Blog by Eugene Jones.&amp;nbsp; Technical Consultant&lt;/strong&gt;&lt;/span&gt;&lt;/span&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=42698" width="1" height="1"&gt;</description></item><item><title>How to Write a Generic K2 Helper Class</title><link>http://k2underground.com/blogs/k2/archive/2012/05/21/how-to-write-a-generic-k2-helper-class.aspx</link><pubDate>Mon, 21 May 2012 17:18:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:42609</guid><dc:creator>chrisg</dc:creator><slash:comments>0</slash:comments><description>&lt;h3&gt;&lt;a name="_Toc316050052"&gt;1. External Assemblies&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;When there is a need to use custom code it can be placed in an external assembly that is deployed to the GAC. This is especially advisable when the code can be reused in multiple events and / or processes.&lt;/p&gt;
&lt;h4&gt;&lt;a name="_Toc316050053"&gt;1.1. GAC Deployment&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;To deploy a custom assembly to the GAC is must be signed with a Strong Name Key and placed in the GAC with GACUTIL.exe on both the developer&amp;rsquo;s machine as well as all K2 server(s) in the target environment(s).&lt;/p&gt;
&lt;h5&gt;&lt;a name="_Toc316050054"&gt;1.1.1. Strong Name Key&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;In Visual Studio 2010 the project containing the custom assembly can be configured for signing in the Project Properties screen, signing tab. On this tab check &amp;ldquo;Sign the Assembly&amp;rdquo; and specify the Strong Name Key (*.snk) by either browsing to an existing file or creating a new key.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7651.clip_5F00_image001_5F00_6A2C8767.jpg"&gt;&lt;img height="283" width="457" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8712.clip_5F00_image001_5F00_thumb_5F00_4860AED6.jpg" alt="clip_image001" border="0" title="clip_image001" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h5&gt;&lt;a name="_Toc316050055"&gt;1.1.2. Deploy To GAC with Post Build Event&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;To automatically copy the file to the development machine GAC on build a post build event can be specified in the Project Properties screen, Build Events tab. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0218.clip_5F00_image002_5F00_67A355A9.jpg"&gt;&lt;img height="284" width="452" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2474.clip_5F00_image002_5F00_thumb_5F00_25BC705B.jpg" alt="clip_image002" border="0" title="clip_image002" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The complete command line is as follows: &lt;/p&gt;
&lt;p&gt;&amp;quot;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\GacUtil.exe&amp;quot; /i &amp;quot;$(TargetPath)&amp;quot;&lt;/p&gt;
&lt;p&gt;Note the use of the Visual Studio Macro, &amp;ldquo;TargetPath&amp;rdquo; which starts begins with the &amp;lsquo;$&amp;rsquo;. This provides the target path for the assembly when it is built that will be deployed to the GAC. &lt;/p&gt;
&lt;p&gt;If you are using .NET Framework 4.0 you will need to use the GacUtil located at C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\GacUtil.exe as Microsoft has created a separate GAC and utilities for Framework 4.0 since the CLR was updated in 4.0 release. For more information on this please reference: &lt;a href="http://www.davidyardy.com/blog/post/2011/03/02/NET-4-New-GAC-LocationsGacUtil.aspx"&gt;http://www.davidyardy.com/blog/post/2011/03/02/NET-4-New-GAC-LocationsGacUtil.aspx&lt;/a&gt; &amp;amp; &lt;a href="http://blogs.msdn.com/b/mjeelani/archive/2010/06/07/top-2-things-you-should-know-about-the-global-assembly-cache-gac-in-net-4-0.aspx"&gt;http://blogs.msdn.com/b/mjeelani/archive/2010/06/07/top-2-things-you-should-know-about-the-global-assembly-cache-gac-in-net-4-0.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Similar approaches using batch files can be used to deploy DLLs to the K2 Servers.&lt;/p&gt;
&lt;h5&gt;&lt;a name="_Toc316050056"&gt;1.1.3. Caching by K2 BlackPearl Server Service&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;The K2 BlackPearl Server Service has a caching mechanism that may be caching the GAC&amp;rsquo;d dll, which will prevent K2 server from immediately detecting and loading the updated DLL. In order to ensure the updated assembly is loaded immediately it is necessary to restart the K2 BlackPearl Windows Service. &lt;/p&gt;
&lt;h5&gt;&lt;a name="_Toc316050057"&gt;1.1.4. In-Flight Processes&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;Sometimes when an external assembly is updated there will be new / modified functionality to support changes / extensions to existing processes which already have instances running on the server. To prevent negatively impacting these processes it is recommended that existing public interfaces not be broken and that implementations do not change in such a way that would cause these in-flight instances to go into an error state. To facilitate this it is better to add new methods or interfaces to the assembly depending on the scope of the change. This allows the in-flight processes to finish completed effectively against the same code base while allowing new process versions to start using the new code immediately. &lt;/p&gt;
&lt;h4&gt;&lt;a name="_Toc316050058"&gt;1.2. K2 Server Event Context&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;It is possible to use the K2 Server Event Context within the external assembly by passing in the appropriate Context object. In the custom assembly it will be necessary to reference KO.dll as shown below.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5504.clip_5F00_image003_5F00_72EC69E6.jpg"&gt;&lt;img height="239" width="459" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0218.clip_5F00_image003_5F00_thumb_5F00_1CEC680F.jpg" alt="clip_image003" border="0" title="clip_image003" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note: If browsing to the DLL makes sure you use the one in &amp;ldquo;C:\Program Files (x86)\K2 blackpearl\Bin&amp;rdquo; folder. Using another copy that belongs to the K2 Service could cause issues when the K2 installation is upgraded to a newer build. &lt;/p&gt;
&lt;p&gt;Which once referenced will be displayed in the project as follows:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2474.clip_5F00_image005_5F00_7BF8F567.jpg"&gt;&lt;img height="245" width="325" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0726.clip_5F00_image005_5F00_thumb_5F00_17314E69.jpg" alt="clip_image005" border="0" title="clip_image005" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once referenced this can be utilized as shown in the method below when uses the K2 Server Event Context to access the string table and return the Mail Server connection information.&lt;/p&gt;
&lt;p&gt;public static string&lt;/p&gt;
&lt;p&gt;GetMailServerFromStringTable(SourceCode.KO.ServerEventContext K2Context)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;
&lt;p&gt;return K2Context.StringTable[&amp;quot;Mail Server&amp;quot;];&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;The calling code in the K2 process shown in the next section will pass in the appropriate context object that this method requires. &lt;/p&gt;
&lt;h4&gt;&lt;a name="_Toc316050059"&gt;1.3. Consuming an External Assembly from a K2 Process&lt;/a&gt;&lt;/h4&gt;
&lt;h5&gt;&lt;a name="_Toc316050060"&gt;1.3.1. Reference External Assembly&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;To use an external assembly in a .NET process it must first be referenced by click on the Process References button in the upper right hand corner of the K2 Design Canvas in Visual Studio (shown below).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2055.clip_5F00_image007_5F00_5A994FCB.jpg"&gt;&lt;img height="105" width="322" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2352.clip_5F00_image007_5F00_thumb_5F00_15ECB58A.jpg" alt="clip_image007" border="0" title="clip_image007" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the resulting dialog box (shown below) click Add.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0702.clip_5F00_image009_5F00_554A691A.jpg"&gt;&lt;img height="292" width="321" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6406.clip_5F00_image009_5F00_thumb_5F00_53999D46.jpg" alt="clip_image009" border="0" title="clip_image009" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Locate the assembly that was GAC deployed, click it to make sure it is highlighted and then click the select button, such that is shows up in the Selected Items pane (Shown Below) and then click OK.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5187.clip_5F00_image011_5F00_2BF3211C.jpg"&gt;&lt;img height="255" width="326" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3441.clip_5F00_image011_5F00_thumb_5F00_4AC994FA.jpg" alt="clip_image011" border="0" title="clip_image011" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The assembly should now show up in the Process References dialog. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1781.clip_5F00_image013_5F00_3C1EE915.jpg"&gt;&lt;img height="306" width="336" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1881.clip_5F00_image013_5F00_thumb_5F00_342746B3.jpg" alt="clip_image013" border="0" title="clip_image013" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Click Finish&lt;/p&gt;
&lt;h5&gt;&lt;a name="_Toc316050061"&gt;1.3.2. Calling the Custom Assembly&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;To call a method in the external assembly drag a &amp;ldquo;Default Server Event (Code)&amp;rdquo; event onto the appropriate activity.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6574.clip_5F00_image015_5F00_3A6E1D41.jpg"&gt;&lt;img height="34" width="251" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4428.clip_5F00_image015_5F00_thumb_5F00_7318C74E.jpg" alt="clip_image015" border="0" title="clip_image015" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once the event is on the canvas, double click and specify a descriptive name, &amp;ldquo;Call GAC&amp;#39;d DLL&amp;rdquo; in this example. Right click on this event and select View Code &amp;agrave; Event Item as shown below.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0702.clip_5F00_image017_5F00_3995B757.jpg"&gt;&lt;img height="204" width="329" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0211.clip_5F00_image017_5F00_thumb_5F00_37E4EB83.jpg" alt="clip_image017" border="0" title="clip_image017" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This will bring up the code for the empty Main method that initially defines this event. To call the custom assembly, which in this case returns a string and expects the K2 Server Event Context we can add the following code.&lt;/p&gt;
&lt;p&gt;public void Main(Project_4d6283f2d66a432e9cef761881dd7432.&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EventItemContext_37d8f16b33344710ac50bd16a9c4e9d9 K2)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; K2.ProcessInstance.DataFields[&amp;quot;GAC Output2&amp;quot;].Value = &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GAC_Test.Email.GetMailServerFromStringTable(K2.GetServerContext()); &lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Note that the K2 object passed to the Main method is not a type that is easily consumed at design time as such we call the GetServerContext Method to get the more easily used &amp;ldquo;ServerEventContext&amp;rdquo; object, which contains the most commonly needed properties or methods. If additional data is needed is not available from this object simple create additional input parameters of the needed type.&lt;/p&gt;
&lt;p&gt;Blog written by Jon Coign&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=42609" width="1" height="1"&gt;</description></item><item><title>Integrating K2 Client Events with Dynamics CRM 2011 using K2 Services</title><link>http://k2underground.com/blogs/k2/archive/2012/05/10/integrating-k2-client-events-with-dynamics-crm-2011-using-k2-services.aspx</link><pubDate>Thu, 10 May 2012 20:18:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:42531</guid><dc:creator>anders98</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This article will show how to use a Dynamics CRM 2011 form in a K2 client event to action tasks during a K2 process. The article uses only out of the box K2 components, Dynamics CRM 2011 customizations and some relatively simple JavaScript.&lt;/p&gt;
&lt;p&gt;This article assumes that you have knowledge of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Customizing Dynamics CRM 2011&lt;/li&gt;
&lt;li&gt;JavaScript &amp;amp; JQuery&lt;/li&gt;
&lt;li&gt;K2 Process Design&lt;/li&gt;
&lt;li&gt;K2 Development &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Scenario&lt;/h2&gt;
&lt;p&gt;In this example we are going build a simple lead review and acceptance process however the techniques are applicable to any K2 and Dynamics CRM 2011 solution.&lt;/p&gt;
&lt;h2&gt;K2 Services&lt;/h2&gt;
&lt;p&gt;To quote the K2 documentation,&lt;/p&gt;
&lt;p&gt;&lt;i&gt;The K2 Services provide out of the box web service functionality for a portion of the SourceCode.Workflow.Client namespace via common Web service endpoints, such as RESTful web services (REST &amp;ndash; Representational State Transfer), Windows Communication Foundation (WCF) and legacy SOAP (WS). Developers familiar with the SourceCode.Workflow.Client APIs will be able to quickly start using the REST, WCF or WS endpoints in their applications.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;In this article we&amp;rsquo;ll be using the REST services to retrieve and action K2 worklist items via the Dynamics CRM 2011 form. &lt;/p&gt;
&lt;p&gt;It is not the intent of this article to provide a deep dive into K2 Services. The K2 Developer documentation goes into considerable detail about both their configuration and their usage which I strongly encourage you to read.&lt;/p&gt;
&lt;p&gt;It is however important that these services be configured correctly to ensure they are callable from our CRM form. &lt;/p&gt;
&lt;p&gt;Validate that the services are configured correctly by navigating to the service in a browser. Modify the URI based upon your configuration.&lt;/p&gt;
&lt;p&gt;This will return a XML representation of the current user&amp;rsquo;s K2 worklist.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dlx.denallix.com:81/K2Services/REST.svc/Worklist/Items"&gt;http://dlx.denallix.com:81/K2Services/REST.svc/Worklist/Items&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Customize Dynamics CRM 2011 &amp;ndash; Part 1&lt;/h2&gt;
&lt;p&gt;With the K2 Services configured we can begin modifying Dynamics CRM.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;NOTE:&lt;/b&gt; During the course of this article we will be using unmanaged solutions or direct customizations. &lt;/p&gt;
&lt;p&gt;We are going to be using JQuery in our form customization so if JQuery is not part of your CRM 2011 environment download it from &lt;a href="http://jquery.com/"&gt;http://jquery.com/&lt;/a&gt; . At the time of writing this article the current version of JQuery is 1.7.2.&lt;/p&gt;
&lt;p&gt;In Dynamics CRM 2011 go to the Settings &amp;ndash;&amp;gt;Customizations &amp;ndash;&amp;gt; Customize the System&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1832.img1_5F00_0D48618E.png"&gt;&lt;img height="295" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5483.img1_5F00_thumb_5F00_5A785B19.png" alt="img1" border="0" title="img1" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Add a new &lt;b&gt;Web Resource&lt;/b&gt; for JQuery 1.7.2 and publish the customization.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8787.img2_5F00_7DC54FBE.png"&gt;&lt;img height="346" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2821.img2_5F00_thumb_5F00_3D23034F.png" alt="img2" border="0" title="img2" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Add another Web Resource for the code from the Appendix - K2.Demo.CRM.LeadDemo.js.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3021.img3_5F00_38404F93.png"&gt;&lt;img height="348" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7120.img3_5F00_thumb_5F00_62AC80B0.png" alt="img3" border="0" title="img3" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;ll explain the content of this code during the course of the article but the first thing we need to do is make a small modification to the code. Edit the web resource.&lt;/p&gt;
&lt;p&gt;Modify the first line so that the K2WFSERVICESBASEURI variable represents your environment&amp;rsquo;s configuration.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1832.img4_5F00_48D84A81.png"&gt;&lt;img height="219" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8284.img4_5F00_thumb_5F00_2F704747.png" alt="img4" border="0" title="img4" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In &lt;b&gt;Customize the System&lt;/b&gt; navigate to the Lead entity&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7230.img5_5F00_07C9CB1D.png"&gt;&lt;img height="182" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4087.img5_5F00_thumb_5F00_6DF594ED.png" alt="img5" border="0" title="img5" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Under &lt;b&gt;Fields&lt;/b&gt; add a new field. This field will be used to display the actions for a K2 client event.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Display Name: K2 Actions&lt;/li&gt;
&lt;li&gt;Requirement Level: No Constraint&lt;/li&gt;
&lt;li&gt;Name: [prefix]k2actions&lt;/li&gt;
&lt;li&gt;Searchable: No&lt;/li&gt;
&lt;li&gt;Field Security: Disable&lt;/li&gt;
&lt;li&gt;Auditing: Disable&lt;/li&gt;
&lt;li&gt;Type: Option Set&lt;/li&gt;
&lt;li&gt;Options: 
&lt;ul&gt;
&lt;li&gt;Label: Not Applicable&lt;/li&gt;
&lt;li&gt;Value: 100,000,000&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7230.img6_5F00_7846B94D.png"&gt;&lt;img height="317" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8206.img6_5F00_thumb_5F00_1EA89C99.png" alt="img6" border="0" title="img6" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The options will be dynamically set when the form is opened in the context of a K2 process.&lt;/p&gt;
&lt;p&gt;With the field created let&amp;rsquo;s go and modify the Lead entity form.&lt;/p&gt;
&lt;p&gt;Add a new Tab under the existing Details tab. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7230.img7_5F00_24EF7327.png"&gt;&lt;img height="180" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2821.img7_5F00_thumb_5F00_123A7970.png" alt="img7" border="0" title="img7" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Set the tab with the following properties including disabling Visibility by default.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7217.img8_5F00_038FCD8B.png"&gt;&lt;img height="333" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7536.img8_5F00_thumb_5F00_351B3B20.png" alt="img8" border="0" title="img8" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Add the K2 Actions field to the newly created tab. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5557.img9_5F00_694F6466.png"&gt;&lt;img height="110" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3021.img9_5F00_thumb_5F00_08FE3E2F.png" alt="img9" border="0" title="img9" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;On the ribbon select Form Properties &lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0842.img10_5F00_6876FE7C.png"&gt;&lt;img height="73" width="59" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4087.img10_5F00_thumb_5F00_5A38858C.png" alt="img10" border="0" title="img10" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Go to the Parameters tab. Add a new parameter called k2_sn of type SafeString. For security reasons Dynamics CRM doesn&amp;rsquo;t allow you arbitrarily include values in the query string so you must first define a parameter if you wish to do this. This parameter will be used later when designing our K2 process and will hold the serial number of a given user&amp;rsquo;s worklist item.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7217.img11_5F00_6EBDD50A.png"&gt;&lt;img height="360" width="354" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4174.img11_5F00_thumb_5F00_59601FA2.png" alt="img11" border="0" title="img11" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Under the Events tab add the JQuery and K2.Demo.CRM.DemoLead web resource that we added previously.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3414.img12_5F00_2DAF55A6.png"&gt;&lt;img height="217" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2018.img12_5F00_thumb_5F00_0D2815F4.png" alt="img12" border="0" title="img12" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the Event Handlers section add a method for OnLoad&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Library: new_K2.CRM.Demo.LeadDemo&lt;/li&gt;
&lt;li&gt;Function: K2OnPageLoad&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3414.img13_5F00_0C4FB00A.png"&gt;&lt;img height="190" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5732.img13_5F00_thumb_5F00_56D6EDE4.png" alt="img13" border="0" title="img13" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the Event Handlers section add a method for OnSave&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Library: new_K2.CRM.Demo.LeadDemo&lt;/li&gt;
&lt;li&gt;Function: K2OnPageSave&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5141.img14_5F00_2406E770.png"&gt;&lt;img height="184" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6153.img14_5F00_thumb_5F00_2E580BD0.png" alt="img14" border="0" title="img14" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;K2OnPageLoad&lt;/h3&gt;
&lt;p&gt;The K2OnPageLoad method fires when the page loads and does two things.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It retrieves the value of the k2_sn parameter in the query string&lt;/li&gt;
&lt;li&gt;If it finds a value, the K2 serial number, it will;&lt;ol&gt;
&lt;li&gt;Make a call to the K2 Services to retrieve the worklist item&lt;/li&gt;
&lt;li&gt;Populate the K2 Actions option set with the available actions for the worklist item&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;Show the K2 tab on the form that to this point has been hidden&lt;/h3&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;K2OnPageSave&lt;/h3&gt;
&lt;p&gt;The K2OnPageSave method fires when the user clicks the Save or Save and Close button on the form. On this event the method;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Checks if the K2 Actions option set has a value and that value is not the default &amp;lsquo;Not Applicable&amp;rsquo; value&lt;/li&gt;
&lt;li&gt;If an action is selected the worklist item is completed via a call to K2 Services&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Dynamics CRM 2011 Forms URL&lt;/h2&gt;
&lt;p&gt;In order to send the user to the right CRM form when they open the item from their K2 worklist we need to construct the appropriate URL. &lt;/p&gt;
&lt;p&gt;Open a Lead in CRM. On the ribbon select the Copy a Link button.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7230.img15_5F00_492431DC.png"&gt;&lt;img height="76" width="100" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7536.img15_5F00_thumb_5F00_1ACAAC2F.png" alt="img15" border="0" title="img15" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Open Notepad and paste the link&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7217.img16_5F00_133F3CC2.png"&gt;&lt;img height="76" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2821.img16_5F00_thumb_5F00_19861350.png" alt="img16" border="0" title="img16" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Keep this URL on hand as we are going to use this URL later in the article.&lt;/p&gt;
&lt;h2&gt;Building the Process&lt;/h2&gt;
&lt;p&gt;In this section we are going to focus on adding the Client Event to the K2 process and not building the complete process.&lt;/p&gt;
&lt;p&gt;Drag the Default Client Event onto the design canvas.&lt;/p&gt;
&lt;p&gt;In the Default Client Event wizard add an Event name.&lt;/p&gt;
&lt;p&gt;In defining the Task Item URL we could use data fields or environment library settings to avoid hard coding the URL and provide flexibility in moving the process across environments or support multiple CRM organizations but for the sake of clarity in the article we are going to set the literal value.&lt;/p&gt;
&lt;p&gt;The Task Item URL will look like the following.&lt;/p&gt;
&lt;p&gt;http://crm.denallix.com/Denallix/main.aspx?etc=4&amp;amp;extraqs=k2_sn%3d&lt;b&gt;&lt;span style="background-color:#9bbb59;"&gt;PROCESS INSTANCE ID&lt;/span&gt;&lt;/b&gt;_&lt;b&gt;&lt;span style="background-color:#9bbb59;"&gt;ACTIVITY DESTINATION INSTANCE ID&lt;/span&gt;&lt;/b&gt;&amp;amp;id=%7b&lt;b&gt;&lt;span style="background-color:#9bbb59;"&gt;CRM ENTITY ID DATA FIELD&lt;/span&gt;&lt;/b&gt;%7d&amp;amp;pagetype=entityrecord&lt;/p&gt;
&lt;p&gt;To break down the URL&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://crm.denallix.com/Denallix/main.aspx?etc=4&amp;amp;extraqs"&gt;http://crm.denallix.com/Denallix/main.aspx?etc=4&amp;amp;extraqs&lt;/a&gt;= - relates directly your CRM implementation. A good candidate for defining as an environment library configuration field&lt;/li&gt;
&lt;li&gt;k2_sn%3d &amp;ndash; the parameter we added when customizing the CRM Lead form. %3d is a URL encoded equals sign&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span style="background-color:#9bbb59;"&gt;PROCESS INSTANCE ID&lt;/span&gt;&lt;/b&gt;_&lt;b&gt;&lt;span style="background-color:#9bbb59;"&gt;ACTIVITY DESTINATION INSTANCE ID&lt;/span&gt;&lt;/b&gt; &amp;ndash; construct the serial number from the Context Browser. An underscore separates Process Instance ID and Activity Destination Instance ID&lt;/li&gt;
&lt;li&gt;&amp;amp;id=%7b - separates end of the serial number and the start of the ID that represents the CRM entity instance you will open. %7d is a URL encoded opening curly bracket {&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span style="background-color:#9bbb59;"&gt;CRM ENTITY ID DATA FIELD&lt;/span&gt;&lt;/b&gt; &amp;ndash; the process needs to know what CRM entity instance to open. In our example we are assuming you have the process has a data field that holds the GUID of our Lead instance&lt;/li&gt;
&lt;li&gt;%7d&amp;amp;pagetype=entityrecord &amp;ndash; we complete the URL with the remaining elements. %7d is a URL encoded closing curly bracket }&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6644.img17_5F00_6AC05AAD.png"&gt;&lt;img height="452" width="254" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3007.img17_5F00_thumb_5F00_1EF483F4.png" alt="img17" border="0" title="img17" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ensure that you uncheck the Append serial number to URL checkbox.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1351.img18_5F00_6FC2985C.png"&gt;&lt;img height="301" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1832.img18_5F00_thumb_5F00_16247BA8.png" alt="img18" border="0" title="img18" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can configure the rest of the Default Client Event wizard as per normal.&lt;/p&gt;
&lt;p&gt;Build out the remaining elements of the K2 process.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4174.img19_5F00_55822F38.png"&gt;&lt;img height="290" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4075.img19_5F00_thumb_5F00_14DFE2C9.png" alt="img19" border="0" title="img19" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Testing our Process&lt;/h2&gt;
&lt;p&gt;Having started out example process the destination users will see a new item in their K2 Worklist&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6237.img20_5F00_4D1E59E1.png"&gt;&lt;img height="76" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0777.img20_5F00_thumb_5F00_7A9F79A4.png" alt="img20" border="0" title="img20" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Upon clicking on the worklist item the Dynamics CRM Lead form will open with the corresponding actions populated in the K2 Actions option set.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0842.img21_5F00_132F16F5.png"&gt;&lt;img height="192" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3414.img21_5F00_thumb_5F00_2B528150.png" alt="img21" border="0" title="img21" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;This article has shown how to leverage the native Dynamics CRM 2011 forms for K2 process client events and can be applied across any entity in CRM. &lt;/p&gt;
&lt;p&gt;In truth this is only the start of what is possible. For example, adding the K2 View Flow to the form could be achieved with minimal additional effort.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Appendix &amp;ndash; K2.Demo.CRM.LeadDemo.js&lt;/h2&gt;
&lt;p&gt;var K2WFSERVICESBASEURI = &amp;#39;http://dlx.denallix.com:81/K2Services/&amp;#39;; var DEFAULTOPTIONSETVALUE = &amp;#39;Not Applicable&amp;#39;; var K2SN = &amp;#39;&amp;#39;; /***** Load Methods *****/ function K2OnPageLoad() {
&lt;blockquote&gt;// get k2_sn parameter from page url &lt;/blockquote&gt;
&lt;blockquote&gt;var extra = new Querystring(getExtraQS()); &lt;/blockquote&gt;
&lt;blockquote&gt;var sn = &amp;quot;&amp;quot;; &lt;/blockquote&gt;
&lt;blockquote&gt;sn = extra.get(&amp;quot;k2_sn&amp;quot;, &amp;quot;&amp;quot;); &lt;/blockquote&gt;
&lt;blockquote&gt;if (sn != undefined &amp;amp;&amp;amp; sn != &amp;quot;&amp;quot;) { &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; K2SN = sn; &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; getK2WorklistBySN(K2SN); &lt;/blockquote&gt;
&lt;blockquote&gt;} &lt;/blockquote&gt;
} function getK2WorklistBySN(SN) {
&lt;blockquote&gt;$.ajax({ &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url: K2WFSERVICESBASEURI + &amp;#39;REST.svc/Worklist/Items(&amp;#39; + SN + &amp;#39;)?piDataField=true&amp;amp;actXmlField=true&amp;amp;$format=json&amp;#39;, &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; method: &amp;#39;GET&amp;#39;, &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contentType: &amp;quot;application/json; charset=utf-8&amp;quot;, &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataType: &amp;quot;JSON&amp;quot;, &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; async: true, &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; beforeSend: function (XMLHttpRequest) { &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XMLHttpRequest.setRequestHeader(&amp;quot;Accept&amp;quot;, &amp;quot;application/json&amp;quot;); &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; crossDomain: false, &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; error: errorWorklist, &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; success: handlegetK2WorklistBySN &lt;/blockquote&gt;
&lt;blockquote&gt;}); &lt;/blockquote&gt;
} &amp;nbsp; // handles the return of worklist details from getK2WorklistBySN function handlegetK2WorklistBySN(data) {
&lt;blockquote&gt;if (data.Code == &amp;quot;-1&amp;quot;) { &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(&amp;quot;The assign K2 task is currently being worked on by another user&amp;quot;); &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return; &lt;/blockquote&gt;
&lt;blockquote&gt;} &lt;/blockquote&gt;
&lt;blockquote&gt;if (data.Actions.length &amp;gt; 0) { &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // populate K2 Actions option set &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var actions = Xrm.Page.ui.controls.get(&amp;quot;new_k2actions&amp;quot;); &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // clear existing options &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; actions.clearOptions(); &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //var len = data.Actions.length; &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // add an option to the K2 Actions Option Set for each action &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i = 0; i &amp;lt; data.Actions.length; i++) { &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var actionoption = {}; &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; actionoption.value = data.Actions[i].Name; &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; actionoption.text = data.Actions[i].Name; &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; actions.addOption(actionoption); &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // show K2 tab on form &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Xrm.Page.ui.tabs.get(&amp;quot;tab_K2&amp;quot;).setVisible(true); &lt;/blockquote&gt;
&lt;blockquote&gt;} &lt;/blockquote&gt;
} /***** Save Methods *****/ function K2OnPageSave() {
&lt;blockquote&gt;// if page in edit more &lt;/blockquote&gt;
&lt;blockquote&gt;if (Xrm.Page.ui.getFormType() == 2) { &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // check if K2 Actions has a value or is not &amp;#39;Not Applicable&amp;#39; &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // get selected value from k2actions &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var selectedK2Action = $(&amp;quot;#new_k2actions option:selected&amp;quot;).text(); &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (selectedK2Action != null &amp;amp;&amp;amp; selectedK2Action != &amp;quot;&amp;quot; &amp;amp;&amp;amp; selectedK2Action != DEFAULTOPTIONSETVALUE) { &lt;/blockquote&gt;
&lt;blockquote&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; actionK2WorklistItem(K2SN, selectedK2Action); &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/blockquote&gt;
&lt;blockquote&gt;} &lt;/blockquote&gt;
} // actions worklist item with selected action function actionK2WorklistItem(SN, k2Action) {
&lt;blockquote&gt;$.ajax({ &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url: K2WFSERVICESBASEURI + &amp;#39;REST.svc/Worklist/Items(&amp;#39; + SN + &amp;#39;)/Actions(&amp;#39; + k2Action + &amp;#39;)/Execute?$format=json&amp;#39;, &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; method: &amp;#39;GET&amp;#39;, &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contentType: &amp;quot;application/json; charset=utf-8&amp;quot;, &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataType: &amp;quot;JSON&amp;quot;, &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; async: true, &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; beforeSend: function (XMLHttpRequest) { &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XMLHttpRequest.setRequestHeader(&amp;quot;Accept&amp;quot;, &amp;quot;application/json&amp;quot;); &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; crossDomain: false, &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; error: errorWorklist &lt;/blockquote&gt;
&lt;blockquote&gt;}); &lt;/blockquote&gt;
} /***** Utility Methods *****/ // handles error if returned by getK2WorklistBySN function errorWorklist(data) {
&lt;blockquote&gt;alert(data.status + &amp;quot; - &amp;quot; + data.statusText); &lt;/blockquote&gt;
} function getSNParameter() { //var qs = new Querystring(getQueryString());
&lt;blockquote&gt;var extra = new Querystring(getExtraQS()); &lt;/blockquote&gt;
&lt;blockquote&gt;var sn = &amp;quot;&amp;quot;; &lt;/blockquote&gt;
&lt;blockquote&gt;sn = extra.get(&amp;quot;k2_sn&amp;quot;, &amp;quot;&amp;quot;); &lt;/blockquote&gt;
&lt;blockquote&gt;if (sn != &amp;quot;&amp;quot;) { &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; K2SN = sn; &lt;/blockquote&gt;
&lt;blockquote&gt;} &lt;/blockquote&gt;
} &amp;nbsp; function getExtraQS() {
&lt;blockquote&gt;var qs = &amp;quot;&amp;quot;; &lt;/blockquote&gt;
&lt;blockquote&gt;if (parent.location != null) { &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qs = parent.location.search.substring(1, parent.location.search.length); &lt;/blockquote&gt;
&lt;blockquote&gt;} else { &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qs = location.search.substring(1, location.search.length); &lt;/blockquote&gt;
&lt;blockquote&gt;} &lt;/blockquote&gt;
&lt;blockquote&gt;var qs1 = new Querystring(qs); &lt;/blockquote&gt;
&lt;blockquote&gt;var extraqs = removeGUIDBrackets(qs1.get(&amp;quot;extraqs&amp;quot;, &amp;quot;&amp;quot;)); &lt;/blockquote&gt;
&lt;blockquote&gt;return extraqs; &lt;/blockquote&gt;
} &amp;nbsp; function removeGUIDBrackets(g) {
&lt;blockquote&gt;var u = g; &lt;/blockquote&gt;
&lt;blockquote&gt;u = g.replace(&amp;quot;{&amp;quot;, &amp;quot;&amp;quot;); &lt;/blockquote&gt;
&lt;blockquote&gt;return u.replace(&amp;quot;}&amp;quot;, &amp;quot;&amp;quot;); } &lt;/blockquote&gt;
function Querystring(qs) {
&lt;blockquote&gt;var querystring = &amp;quot;&amp;quot;; &lt;/blockquote&gt;
&lt;blockquote&gt;if (qs != null &amp;amp;&amp;amp; qs != &amp;quot;&amp;quot;) { &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; querystring = qs; &lt;/blockquote&gt;
&lt;blockquote&gt;} &lt;/blockquote&gt;
&lt;blockquote&gt;else { &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; querystring = location.search.substring(1, location.search.length); &lt;/blockquote&gt;
&lt;blockquote&gt;} &lt;/blockquote&gt;
&lt;blockquote&gt;var args = querystring.split(&amp;#39;&amp;amp;&amp;#39;); &lt;/blockquote&gt;
&lt;blockquote&gt;for (var i = 0; i &amp;lt; args.length; i++) { &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var pair = args[i].split(&amp;#39;=&amp;#39;); &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; temp = unescape(pair[0]).split(&amp;#39;+&amp;#39;); &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name = temp.join(&amp;#39; &amp;#39;); &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; temp = unescape(pair[1]).split(&amp;#39;+&amp;#39;); &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value = temp.join(&amp;#39; &amp;#39;); &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this[name] = value; &lt;/blockquote&gt;
&lt;blockquote&gt;} &lt;/blockquote&gt;
&lt;blockquote&gt;this.get = Querystring_get; &lt;/blockquote&gt;
} &amp;nbsp; function Querystring_get(strKey, strDefault) {
&lt;blockquote&gt;var value = this[strKey]; &lt;/blockquote&gt;
&lt;blockquote&gt;if (value == null) { &lt;/blockquote&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value = strDefault; &lt;/blockquote&gt;
&lt;blockquote&gt;} &lt;/blockquote&gt;
&lt;blockquote&gt;return value; &lt;/blockquote&gt;
}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=42531" width="1" height="1"&gt;</description></item><item><title>K2 SmartActions</title><link>http://k2underground.com/blogs/k2/archive/2012/05/09/k2-smartactions.aspx</link><pubDate>Wed, 09 May 2012 18:15:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:42503</guid><dc:creator>chrisg</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&amp;nbsp;&lt;span style="font-family:Cambria;"&gt;&lt;span style="color:#365f91;font-size:14pt;"&gt;Overview&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;In this post we will cover the mail-based interaction capabilities of the K2 BPM Platform, a technology we call K2 SmartActions.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;We&amp;rsquo;ll start by diving into the details around SmartActions then progress to demonstrating how SmartActions can be built into Task Messages, how those messages can be customized and then conclude with how to apply the K2 SmartAction functionality to existing K2 Process Definitions.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h1 style="line-height:16pt;list-style-type:disc;margin:24pt 0in 0pt;"&gt;&lt;span style="font-family:Cambria;"&gt;&lt;span style="color:#365f91;font-size:14pt;"&gt;What is SmartActions anyway?&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;K2 SmartActions is a technology that allows for Process participants that receive email Task Notifications to interact with the Workflow Task and the underlying K2 Process via email messages between the user and the K2 Process Server.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;The goal of this technology is to allow mobile users or user that live within email clients (Outlook, Mail, etc.) the same functionality as users that either interact with K2 Tasks via the K2 Task Worklist or via the associated Task form directly.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;To accomplish this, we have provided the ability to automatically embed both Task-specific Actions (things like the Approve, Deny, Confer that you&amp;rsquo;re already building into your Tasks today) along with the standard Redirect, Delegate and Sleep actions that are natively exposed on our K2 Worklist.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h1 style="line-height:16pt;list-style-type:disc;margin:24pt 0in 0pt;"&gt;&lt;span style="font-family:Cambria;"&gt;&lt;span style="color:#365f91;font-size:14pt;"&gt;A practical example&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;In our example, we&amp;rsquo;re going to show the experience of Holly who is a Hiring Manager within the fictitious Denallix organization that has been assigned a task to build out a New Hire Checklist as part of the Employee Onboarding exercise for a new member of her team, Bob.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;In the &amp;ldquo;olden days&amp;rdquo;, Holly would receive a Task notification that could contain data from the Process as well as a link to open the Task form and ultimately Action the task.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Holly could also visit her K2 Worklist to see the Task, Actions available for that Task, and additionally be provided the ability to put the task to Sleep as well as Redirect or Delegate the task.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;With the introduction of K2 SmartActions this functionality has all be combined into a single email notification that Holly can now work from within Microsoft Outlook, via her mobile phone or anywhere else she can received and reply to email messages.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="page-break-after:avoid;line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4251.image_5F00_71DE00F9.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8865.image_5F00_thumb_5F00_50EA8E52.png" width="594" height="319" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;Within the Task notification message we can see that Holly is presented with the following pieces of useful information:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoListParagraphCxSpFirst"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;Task details such as the new hire&amp;rsquo;s Name, the type of new hire and the employee&amp;rsquo;s target start date.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;All these details are useful for being able to make a decision about the Task without having to open the Task form associated to it&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;A link to the Task form in case Holly does want to open the Worklist item directly&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 10pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoListParagraphCxSpLast"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;Information on how to complete the Task via either custom or standard Actions&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;Now that Holly has a SmartAction-enabled Task message what can she do with it?&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;For starters she could get some additional information about that task by simply replying to the message with the word &amp;lsquo;Help&amp;rsquo;.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Behind the scenes, K2 is monitoring an email inbox for incoming messages and is configured to pick out certain keywords in the response portion of the email and perform work based upon those words (but more about that later).&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="page-break-after:avoid;line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8880.image_5F00_2224D5B0.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7384.image_5F00_thumb_5F00_59F719D3.png" width="702" height="301" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;In this second email we see that additional Action information is provided:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoListParagraphCxSpFirst"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;For the configured Actions, we include the Action name as well as any additional Action description text (when the Action was built within the K2 Designer)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 10pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoListParagraphCxSpLast"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;For the standard Actions, we include more a more verbose example of what the standard Action does and how to utilize that Action&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;By parsing through incoming email messages, K2 can now act against these messages to accomplish a few different things:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoListParagraphCxSpFirst"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span style="font-size:11pt;"&gt;Action the task on behalf of the Task owner&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:11pt;"&gt; &amp;ndash; once the K2 SmartAction service locates the name of the action in a response, the Task will be auctioned.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;In our example with Holly if she replied back to the email with the word &amp;lsquo;Completed&amp;rsquo; in the body of the message the Task would be actioned Completed.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span style="font-size:11pt;"&gt;Redirect the task to another user&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:11pt;"&gt; &amp;ndash; by replying back with either the word Redirect or Delegate and with the target user(s) name or destination account either in the message body or within the CC line of the email then K2 will Redirect or Delegate that Task to the target user specified.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 10pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoListParagraphCxSpLast"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span style="font-size:11pt;"&gt;Putting the task to Sleep&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:11pt;"&gt; &amp;ndash; by replying back with the word Sleep and either a date and time or simply a number of hours the task will be put to Sleep and removed from the users Worklist until that Sleep period has expired.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h1 style="line-height:16pt;list-style-type:disc;margin:24pt 0in 0pt;"&gt;&lt;span style="font-family:Cambria;"&gt;&lt;span style="color:#365f91;font-size:14pt;"&gt;Behind the magic&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;There are several different components within the overall K2 SmartActions technology that work in conjunction to accomplish the same fidelity of experience in email as from within the K2 Worklist: &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l0 level1 lfo2;" class="MsoListParagraphCxSpFirst"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;Integration with the mail server&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l0 level1 lfo2;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;Enabling Actions to be SmartAction-enabled &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l0 level1 lfo2;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;Design of the Task message &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l0 level1 lfo2;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;Configuring SmartAction Synonyms &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 10pt 0.5in;mso-list:l0 level1 lfo2;" class="MsoListParagraphCxSpLast"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;Customization of response templates&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 style="line-height:15pt;list-style-type:disc;margin:10pt 0in 0pt;"&gt;&lt;span style="font-family:Cambria;"&gt;&lt;span style="color:#4f81bd;font-size:13pt;"&gt;Mail server integration&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;Upon installation of K2, the installer will ask if K2 SmartActions should be configured and, if so, the location of the mail server and the account used to broker this connection.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Sitting underneath K2 SmartActions is an email inbox monitoring service that listens for incoming mail messages and then attempts to parse the message contents looking for certain keywords and an associated K2 Task serial number to correlate against an active K2 Task.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;NOTE: All mail messages received by this mail box will be parsed in a similar fashion so we recommend not utilizing a shared mailbox for this very reason.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 style="line-height:15pt;list-style-type:disc;margin:10pt 0in 0pt;"&gt;&lt;span style="font-family:Cambria;"&gt;&lt;span style="color:#4f81bd;font-size:13pt;"&gt;Enabling Actions to be SmartActions-enabled&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;The K2 BPM Platform allows for the Process Designer to configure which Actions within a Task are accessible via SmartActions by managing the accessibility of that Action within the Task wizard.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;When configuring Actions for a given Task you&amp;rsquo;ll see that same Actions wizard as before:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2021.image_5F00_5193447C.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4744.image_5F00_thumb_5F00_0C7A7746.png" width="525" height="356" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;With the introduction of K2 SmartActions the ability to Action a Work Item is now configurable within the Task Wizard by editing the Action:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0044.image_5F00_2F5B38F6.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8880.image_5F00_thumb_5F00_158702C7.png" width="496" height="248" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="mso-no-proof:yes;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;By enabling the &amp;ldquo;Make the action available&amp;hellip;&amp;rdquo; checkbox, the Action for this Task is now accessible in the&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;following locations:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l0 level1 lfo2;" class="MsoListParagraphCxSpFirst"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;The K2 Worklist (within SharePoint, within the K2 Workspace, etc.)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 10pt 0.5in;mso-list:l0 level1 lfo2;" class="MsoListParagraphCxSpLast"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;As a SmartAction within a Task Notification email&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;By disabling this check box, not only will the Action not appear in the K2 Worklist for that given Item, it also won&amp;rsquo;t be in the body of a SmartAction-enabled Task Notification.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 style="line-height:15pt;list-style-type:disc;margin:10pt 0in 0pt;"&gt;&lt;span style="font-family:Cambria;"&gt;&lt;span style="color:#4f81bd;font-size:13pt;"&gt;Task notification design&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;By default, when a user Task is designed within K2 the option is presented to the Process Designer to send a Task notification message to the Task recipient(s).&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;If K2 SmartActions is enabled the message will include some different components than prior version of K2 Task notification messages.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0447.image_5F00_09851293.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1033.image_5F00_thumb_5F00_3A381A3E.png" width="525" height="436" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;First of these new parts is the requirement of the Worklist Item Serial Number &amp;ndash; when allowing the K2 wizard to build the Task message automatically, the Serial Number is automatically embedded at the bottom of the email message in text that most users wouldn&amp;rsquo;t ever notice.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;In our example this information is located at the bottom of the message; while there isn&amp;rsquo;t a hard and fast rule where this Serial Number needs to be, it does have to be present for the K2 SmartAction parser to correlate any email responses to a specific Task. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;Next is the addition of the Worklist Item Instance node within the Context Browser &amp;ndash; items within this&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;node are specific to the Task and provide an easy way to quickly build out a Task message that&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;provides a great deal of information to&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;the Assignee.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4274.image_5F00_38F3815F.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3755.image_5F00_thumb_5F00_18000EB8.png" width="271" height="338" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoListParagraphCxSpFirst"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span style="font-size:11pt;"&gt;Configured Actions/Configured Actions with Descriptions&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:11pt;"&gt; &amp;ndash; these are the Actions built by the Process Designer. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span style="font-size:11pt;"&gt;Standard Actions/Standard Actions with Descriptions&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:11pt;"&gt; &amp;ndash; these are the native K2 Actions (Sleep, Redirect, Delegate)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 10pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoListParagraphCxSpLast"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span style="font-size:11pt;"&gt;Participant name&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:11pt;"&gt; &amp;ndash; this is the name of the Task assignee (i.e. &amp;lsquo;Holly Anderson&amp;rsquo; in our example above)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 style="line-height:15pt;list-style-type:disc;margin:10pt 0in 0pt;"&gt;&lt;span style="font-family:Cambria;"&gt;&lt;span style="color:#4f81bd;font-size:13pt;"&gt;Configuring SmartAction Synonyms &lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;A goal of the SmartActions technology aims to allow Task Assignees to respond to Task notification emails and ultimately action Tasks as quickly and easily as possible. To that end, there is also a concept of SmartAction Synonyms which allows for users to use other words/symbols to respond to Task Actions.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;For instance, one standard SmartAction response to get more information about a Task is to reply with the word &amp;lsquo;Help&amp;rsquo;.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;By default, additional SmartActions for Synonyms are provided natively for Help:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoListParagraphCxSpFirst"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 10pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoListParagraphCxSpLast"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;H&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;If an email comes back with either of these in the body, the SmartActions parser will interrogate the Synonyms list, match up the Synonym and then proceed if forward with the Help response.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;To see a list of the default SmartAction Synonyms, navigate to the K2HostServer.config file on your K2 Process Server and look for the Configuration &amp;gt; Message Bus &amp;gt; SmartActions &amp;gt; Synonyms:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;The Standard Actions section provides the ability to apply synonyms for the out of the box Actions:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7382.image_5F00_5DA498D6.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6712.image_5F00_thumb_5F00_27BFA3BC.png" width="398" height="395" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;SmartAction Synonyms can be added to or removed from this configuration file and will be internalized once the K2 Process Server starts back up.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;For instance, let&amp;rsquo;s say that you wanted to provide multi-language support within the context of SmartActions by allowing users to respond to the Help action in German &amp;ndash; the result would be something like this:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4274.image_5F00_0D7F3A98.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1018.image_5F00_thumb_5F00_6CF7FAE5.png" width="194" height="74" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;There is also a section for Configured Actions that can be modified as well:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5722.image_5F00_2C55AE76.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1031.image_5F00_thumb_5F00_329C8504.png" width="424" height="179" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 style="line-height:15pt;list-style-type:disc;margin:10pt 0in 0pt;"&gt;&lt;span style="font-family:Cambria;"&gt;&lt;span style="color:#4f81bd;font-size:13pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;h2 style="line-height:15pt;list-style-type:disc;margin:10pt 0in 0pt;"&gt;&lt;span style="font-family:Cambria;"&gt;&lt;span style="color:#4f81bd;font-size:13pt;"&gt;Customization of response templates&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;The final piece to the SmartActions puzzle is the standard response templates that come with the K2 Platform &amp;ndash; these are used to send messages back from the K2 SmartActions mailbox to users when they respond to K2 Task Notification emails.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;The configuration of these templates is also stored within the K2HostServer.config file, in the SmartActions &amp;gt; Messages node:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0447.image_5F00_18C84ED5.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6403.image_5F00_thumb_5F00_57B9CF70.png" width="530" height="168" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="font-size:11pt;"&gt;Each node points to a different message template that exists on disk and is used by the K2 Process Server engine to generate mail messages.&lt;/span&gt;&lt;span style="mso-spacerun:yes;"&gt;&lt;span style="font-size:11pt;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;Let&amp;rsquo;s take a closer look at one of these templates &amp;ndash; if you navigate to the Templates directory on your K2 Process Server (something like C:\Program Files (x86)\K2 blackpearl\Host Server\Bin\Templates\Messages) then you should see something like the following:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3582.image_5F00_7DAF7FC6.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6403.image_5F00_thumb_5F00_1C19C0B0.png" width="362" height="338" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;Opening up the associated file for the Help message (SmartActions.Help) should look like this:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4667.image_5F00_21F46449.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7701.image_5F00_thumb_5F00_454158EE.png" width="528" height="142" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;We can clearly see that the K2 SmartActions process will use this template and supplement values enclosed in brackets at runtime with values from the associated Task.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;You may consider changing the content of these files &amp;ndash; this would be analogous to changing the standard mail template used for all K2 Mail Events; while this isn&amp;rsquo;t un-supported, do bear in mind the following:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoListParagraphCxSpFirst"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;These templates are&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;used for ALL Processes/SmartActions so every SmartAction response for the type changed would incorporate these changes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;These templates &lt;i style="mso-bidi-font-style:normal;"&gt;may be&lt;/i&gt; updated during future releases and any customized changes overwritten&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 10pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoListParagraphCxSpLast"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:calibri;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;"&gt;&lt;span style="mso-list:ignore;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:11pt;"&gt;Not including required message part placeholders (the bits between the brackets) could result in undesirable consequences&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h1 style="line-height:16pt;list-style-type:disc;margin:24pt 0in 0pt;"&gt;&lt;span style="font-family:Cambria;"&gt;&lt;span style="color:#365f91;font-size:14pt;"&gt;Applying SmartActions to current Processes&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;If you were using K2 before SmartActions was released you may have read this blog post and got excited about getting even more value out of the K2 Platform via SmartActions &amp;ndash; which is great!&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;One thing to note, simply updating your K2 environment with the latest version won&amp;rsquo;t automatically start sending out SmartAction Task Notifications &amp;ndash; you still need to update your Process definitions and configured those Task Notification emails.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Simply re-running through configuring a Task should update the mail template with the required bits for SmartActions to work but this is also a good opportunity to take advantage of some of the additional Worklist Item context or further customize the email notification with a fancier look and feel. Also, you&amp;rsquo;ll need to verify that the Actions you want surfaced within a notification have been enabled to be actioned without opening the item &amp;ndash; again, this isn&amp;rsquo;t done by default to protect the integrity of the Process but it&amp;rsquo;s easily modified.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h1 style="line-height:16pt;list-style-type:disc;margin:24pt 0in 0pt;"&gt;&lt;span style="font-family:Cambria;"&gt;&lt;span style="color:#365f91;font-size:14pt;"&gt;Wrapping up&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;Within this post you&amp;rsquo;ve read what K2 SmartActions are, how to apply them to a new or current Process and how to customize the native, out-of-the-box functionality of the feature.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;We think it&amp;rsquo;s a very useful feature and we&amp;rsquo;re glad to continue providing innovation and fantastic features on top of the K2 BPM Platform for you.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="color:#000000;font-size:11pt;"&gt;&amp;nbsp;Blog Post by Jason Trent&lt;/span&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=42503" width="1" height="1"&gt;</description></item><item><title>K2 and SSIS</title><link>http://k2underground.com/blogs/k2/archive/2012/05/07/k2-ssis.aspx</link><pubDate>Mon, 07 May 2012 15:39:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:42475</guid><dc:creator>chrisg</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;K2 integrates with SQL Server Reporting Services in a number of ways which gives OOTB monitoring and reporting capabilities to tracking workflows and providing some business intelligence. Through the use of a special component, many of these reports are supported by SmartObjects and the means to obtain datasets from them that are consumable to SSRS. This component is the ADO.Net Data Provider for Smart Objects, and can also be used in another Microsoft BI product called SQL Server Integration Services (SSIS).&lt;/p&gt;
&lt;p&gt;Part of the power of SmartObjects is the ability to deliver near to real time extractions of data from disparate data sources through a single SmartObject method call. This piece of BI is sometimes referred to as EII (Enterprise Information Integration). It is moving data from the original source and presenting directly to a user interface. This type of data does not allow for analysis in deeper manners, such as slice and dice, aggregations, cross tabulations, and data mining, &lt;/p&gt;
&lt;p&gt;Data that is to be analysed is often collected and stored in data warehouses, and even further, pushed into OLAP repositories. A SmartObject does not do this directly. They should not even attempt to be used in this way. ETL (Extract-Transform-Load) tools deliver mechanisms to populate data warehouses for additional crunching. SSIS is a premier tool for doing so, and there is piece of ETL that SmartObjects may support with the correct strategic use -- that is merely the extraction piece of ETL. The same ADO.Net Data Provider for Smart Objects works in SSIS as it works in SSRS. It can deliver datasets to Data Flow Sources in a SSIS package.&lt;/p&gt;
&lt;h3&gt;&lt;a name="_Toc317695130"&gt;1. How TO USE K2 Data Provider in SSIS&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;SSRS and SSIS have their designers hosted as Business Intelligence Development Studio (BIDS). This will typically be found on a development machine &amp;ndash; as BIDS ships with SQL Server and install with the SQL Client Tools. If this development machine has also installed the K2 Development Tools, then the ADO.Net Data Provider is installed and found for use in the BIDs tool.&lt;/p&gt;
&lt;p&gt;But the data provider must be installed on SSIS server where it is intended to be used as all data providers for SSIS must be installed.&lt;/p&gt;
&lt;p&gt;I will borrow some of the very same steps to installing this data provider manually on SSRS server as the same for installing it on a SSIS Server (to understand the difference of this service engines, see the documentation in SQL Server).&lt;/p&gt;
&lt;p&gt;WARNING: Having manually installed the data provider, when you upgrade K2 to a newer version, you will probably have to update the data provider assemblies on the SSIS server too.&lt;/p&gt;
&lt;p&gt;First, copy some assemblies from the K2 host server. Find these in the K2 install directory (by default something like C:\Program Files\K2 BlackPearl\Bin):&lt;/p&gt;
&lt;p&gt;- SourceCode.Data.SmartObjectsClient.dll &lt;br /&gt;- SourceCode.Categories.Client.dll &lt;br /&gt;- SourceCode.HostClientAPI.dll (Please see 64-bit note below!) &lt;br /&gt;- SourceCode.SmartObjects.Client.dll &lt;br /&gt;- SourceCode.SmartObjects.Management.dll &lt;/p&gt;
&lt;p&gt;Note for 64-bit operating systems: The SourceCode.HostClientAPI.dll is compiled to target a specific CPU platform. If you are running a 64-bit operating system in your SSRS environment, you must copy the correct HostClientAPI.dll file from the Global Assembly Cache (GAC) off the K2 server. It will be located in a directory like:&lt;/p&gt;
&lt;p&gt;&lt;i&gt;C:\Windows\Assembly\[GAC_64\AMD_64]\SourceCode.HostClientAPI\[4.0.0.0_16a2c5aaaa1b130d]&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;If you copy the wrong HostClientAPI.dll, you will get an error like &amp;#39;attempted to load a program with an incorrect format&amp;#39;.&lt;/p&gt;
&lt;p&gt;Next, register these assemblies to the GAC of the SSIS server. It is best to use the gacutil.exe utility. If it not installed on the target server, download the windows 7 SDK from Microsoft in order to get it. Find the Windows 7 SDK installer from here: &lt;/p&gt;
&lt;p&gt;&lt;i&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&amp;amp;displaylang=en&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Next, open the SDK command prompt or a windows command prompt (NOTE: use the &amp;#39;Run as Administrator&amp;#39; option to launch the command line) and execute as follows:&lt;/p&gt;
&lt;p&gt;- gacutil -i SourceCode.Data.SmartObjectsClient.dll &lt;br /&gt;- gacutil -i SourceCode.Categories.Client.dll &lt;br /&gt;- gacutil -i SourceCode.HostClientAPI.dll &lt;br /&gt;- gacutil -i SourceCode.SmartObjects.Client.dll &lt;br /&gt;- gacutil -i SourceCode.SmartObjects.Management.dll &lt;/p&gt;
&lt;p&gt;Now configure the ADO.NET Data Provider for SSIS. (Make sure you follow the right path ofor your platform, such as Framework64 paths).&lt;/p&gt;
&lt;p&gt;&lt;i&gt;C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\CONFIG\machine.config.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Edit the Machine.Config with the assembly references as follows. Scroll down to the bottom of the section &amp;lt;/configSections&amp;gt; and enter:&lt;/p&gt;
&lt;p&gt;&amp;lt;configSections&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;hellip; &lt;br /&gt;&amp;lt;section name=&amp;quot;SourceCode.Data.SmartObjectsClient&amp;quot; &lt;br /&gt;type=&amp;quot;System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/configSections&amp;gt;&lt;/p&gt;
&lt;p&gt;Next, scroll down to the bottom of the section &amp;lt;/DbProviderFactories&amp;gt; and enter:&lt;/p&gt;
&lt;p&gt;&amp;lt;DbProviderFactories&amp;gt;&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;lt;add name=&amp;quot;K2 SmartObjects Data Provider&amp;quot;&lt;/p&gt;
&lt;p&gt;type=&amp;quot;SourceCode.Data.SmartObjectsClient.SOClientFactory, SourceCode.Data.SmartObjectsClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d&amp;quot;&lt;/p&gt;
&lt;p&gt;description=&amp;quot;.NET Framework Data Provider for K2 SmartObjects&amp;quot; invariant=&amp;quot;SourceCode.Data.SmartObjectsClient&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/DbProviderFactories&amp;gt;&lt;/p&gt;
&lt;p&gt;Close and save the file, and reboot the SSIS Server&lt;/p&gt;
&lt;p&gt;This will make the data provider available for production, and you will be able to see it in Visual Studio 2010 when looking at the Data Connection Wizard. But there is more to do to make the provider available in BIDS.&lt;/p&gt;
&lt;p&gt;I recommend that you use development environments where you will have installed the K2 Client Tools and then you will have what you need for BIDS as well. But you only need to do the above, and &lt;b&gt;must do the above to have the Smart Object data provider available for a SSIS Server to call the K2 SmartObject Server.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Confirm that the data provider is in place by checking here in Visual Studio 2010, using the Server Explorer. Open a new connection dialog.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6153.image_5F00_5C54AE2F.png"&gt;&lt;img height="502" width="446" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4075.image_5F00_thumb_5F00_33D5CC1B.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then click the change button and see that the data provider is listed:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8304.image_5F00_19293002.png"&gt;&lt;img height="234" width="401" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5148.image_5F00_thumb_5F00_4395611F.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a name="_Toc317695131"&gt;2. How TO Configure a Connection Manager in SSIS&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To use the ADO.Net Data Provider for Smart Objects in SSIS, open BIDS and start or open an Integration Services project.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6138.image_5F00_5E61872B.png"&gt;&lt;img height="483" width="427" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3581.image_5F00_thumb_5F00_5D892141.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You may create a data source here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1263.image_5F00_628B5EF0.png"&gt;&lt;img height="285" width="434" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8284.image_5F00_thumb_5F00_7B1AFC40.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You may also create a Connection Manager directly here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1348.image_5F00_19F1701F.png"&gt;&lt;img height="86" width="520" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7215.image_5F00_thumb_5F00_19853D2A.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the Connection Manager dialog, select the Provider drop down control and select:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6646.image_5F00_71DEC0FF.png"&gt;&lt;img height="481" width="461" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2437.image_5F00_thumb_5F00_580A8AD0.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Enter the port number and K2Server name:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7128.image_5F00_4FA6B579.png"&gt;&lt;img height="474" width="460" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1447.image_5F00_thumb_5F00_40FC0994.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;An ellipse button is available on the Connection property, SmartObjects:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2821.image_5F00_5FD27D72.png"&gt;&lt;img height="101" width="490" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6131.image_5F00_thumb_5F00_0D539D36.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You list the Smart Objects fromt hat server that you wish to be part of the query to made made against it.&lt;/p&gt;
&lt;p&gt;Select one or more as if selecting tables, where there is a known relationship between them.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2402.image_5F00_0C0F0457.png"&gt;&lt;img height="357" width="494" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2437.image_5F00_thumb_5F00_7D645871.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Having done so, the property now appears as:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3581.image_5F00_033EFC0B.png"&gt;&lt;img height="104" width="606" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2844.image_5F00_thumb_5F00_17C44B89.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Click on the test button to ensure the connection goes through (consider the contact of yo0u0r designer and how the session is authenticated.&lt;/p&gt;
&lt;p&gt;The Data Source (Connection Manager) wizard is complete by giving it a name. Use a name that conveys the server, the SmartObject usage and the name of the SmartObjects.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1447.image_5F00_09199FA4.png"&gt;&lt;img height="449" width="510" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6644.image_5F00_thumb_5F00_7A6EF3BE.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here is the Data Source:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3404.image_5F00_1945679D.png"&gt;&lt;img height="75" width="440" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2437.image_5F00_thumb_5F00_18D934A8.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When creating a connection manager, it will be of the type ADO.Net Connection:&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;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2018.image_5F00_6D286AAB.png"&gt;&lt;img height="325" width="261" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8787.image_5F00_thumb_5F00_2C861E3C.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4075.image_5F00_5DA558DC.png"&gt;&lt;img height="261" width="395" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0755.image_5F00_thumb_5F00_2A691F73.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Save the Connection Manager with a name as suggested.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6644.image_5F00_149F3716.png"&gt;&lt;img height="152" width="527" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2844.image_5F00_thumb_5F00_0FBC835A.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;With a Connection Manager in place, it may be used as a Data Flow Source. The only access mode is ADO Query (which appears in this designer dialog as SQL command).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2402.image_5F00_1A0DA7BA.png"&gt;&lt;img height="172" width="195" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4087.image_5F00_thumb_5F00_608A97C2.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;
&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;
&lt;h3&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3005.image_5F00_2DBA914E.png"&gt;&lt;img height="223" width="244" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4062.image_5F00_thumb_5F00_17F0A8F1.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;
&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;
&lt;h3&gt;&lt;a name="_Toc317695132"&gt;3. &lt;/a&gt;How TO Best use ADO.NET SOURCE EDITOR (ADO Queries)&lt;/h3&gt;
&lt;p&gt;The ADO.Net Data Provider for Smart Objects puts an interface on the SmartObject Server data access framework. However, generally, SmartObjects are not intended to query and move tens of thousands of rows of data. It becomes very important that a WHERE clause is part of the query against the data pulled by a SmartObject though its framework up through the data provider ultimately to its consumer. In fact you may to extract data in blocks of rows if the result set would be excessive of 20,000 plus.&lt;/p&gt;
&lt;p&gt;Many functions that work in T-SQL will work in the ADO Query. Find the columns to enter from the Smart Object Service Tester, and specify those in WHERE clauses, etc.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/1348.image_5F00_4C24D237.png"&gt;&lt;img height="421" width="430" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6131.image_5F00_thumb_5F00_7CD7D9E2.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Blog post By Jeff Belnap Technical Consultant&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=42475" width="1" height="1"&gt;</description></item><item><title>Understanding how K2 Project References are used</title><link>http://k2underground.com/blogs/k2/archive/2012/05/02/understanding-how-k2-project-references-are-used.aspx</link><pubDate>Wed, 02 May 2012 17:36:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:42451</guid><dc:creator>chrisg</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When adding an external reference (.NET assembly, Web, Service Reference etc.) to a K2 process, there is often a need to make modifications to the external component which requires that you update the reference in the K2 process. To do this you must remove and re-add the reference via the Process References dialog in the K2 Designer for Visual Studio or K2 Studio, then redeploy the process. See the &lt;a href="http://help.k2.com/en/KB001278.aspx"&gt;Managing K2 Process References&lt;/a&gt; KB article for additional details.&lt;/p&gt;
&lt;p&gt;This inevitably leads to the question of &amp;ldquo;Which version the referenced component will my K2 process instances use?&amp;rdquo; The answer of course is &amp;ldquo;It depends&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;When you add a reference to a K2 process and use the &lt;i&gt;Copy Local&lt;/i&gt; option:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/5481.clip_5F00_image002_5F00_7D209D4A.png"&gt;&lt;img height="319" width="353" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0513.clip_5F00_image002_5F00_thumb_5F00_502B3A6F.png" alt="clip_image002" border="0" title="clip_image002" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The assembly will be copied to the &lt;i&gt;bin&lt;/i&gt; directory of the K2 Project and will get deployed to the K2Server database when you deploy the process. When you start a new instance of the process, the referenced assembly associated with the version of the process definition on which the instance was started will be used.&lt;/p&gt;
&lt;p&gt;To illustrate how this works, the first time you start a process instance after the K2 service has been restarted, a temporary working folder will get created (one per process definition) and the assemblies associated with the version of the process definition on the which the instance was started will be extracted to a temporary folder at runtime. The temporary folders always reside in the \K2 blackpearl\Host Server\bin\Work directory. In this example you can see that BCExternalAssembly.dll resides in the temporary \Proc30 folder since the &lt;i&gt;Copy Local&lt;/i&gt; checkbox was checked when the reference was added to the process:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6153.clip_5F00_image003_5F00_1A464555.png"&gt;&lt;img height="172" width="387" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6557.clip_5F00_image003_5F00_thumb_5F00_475B3223.png" alt="clip_image003" border="0" title="clip_image003" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When you need to maintain specific versions of an external reference that are associated with specific versions of a process definition, &lt;i&gt;Copy Local&lt;/i&gt; should be used.&lt;/p&gt;
&lt;p&gt;What if you don&amp;rsquo;t check the &lt;i&gt;Copy Local&lt;/i&gt; checkbox?&lt;/p&gt;
&lt;p&gt;If you don&amp;rsquo;t use the &lt;i&gt;Copy Local&lt;/i&gt; option, the referenced component will not get copied to the bin directory of the K2 project and will not get deployed to K2. In this case you must manually copy the assembly to the GAC or the \K2 blackpearl\Host Server\bin directory on all of the K2 server(s). Any time the assembly is updated you will need to update it on the K2 server(s) and restart the K2 service.&lt;/p&gt;
&lt;p&gt;If you have existing versions of a process definition that include a local copy of a referenced component and you deploy a new version of the referenced component to the GAC or \K2 blackpearl\Host Server\bin folder, the component deployed to the GAC or bin directory will get used for all versions of the process definition &lt;b&gt;after&lt;/b&gt; the K2 service has been restarted. If a \K2 blackpearl\Host Server\bin\Work\Procxx temporary directory already exists for a particular version of the process the &amp;ldquo;local copy&amp;rdquo; of the component will continue to be used until the K2 Service is restarted.&lt;/p&gt;
&lt;p&gt;On startup of the K2 service all of the temporary folders under the \Work folder will be deleted and external references for &lt;b&gt;all&lt;/b&gt; versions of a process definition be loaded in the following order of precedence:&lt;/p&gt;
&lt;p&gt;1. Global Assembly Cache&lt;/p&gt;
&lt;p&gt;2. \K2 blackpearl\Host Server\bin directory&lt;/p&gt;
&lt;p&gt;3. \K2 blackpearl\Host Server\bin\Work\Procxxx directory&lt;/p&gt;
&lt;p&gt;For any version of a process definition with references where &lt;i&gt;Copy Local&lt;/i&gt; was used, the referenced components will always get extracted to the temporary folder on the K2 server, but the above order of precedence still applies. In other words, don&amp;rsquo;t assume that because you see a referenced component in the temporary folders on the K2 server that the process definition is using it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=42451" width="1" height="1"&gt;</description></item><item><title>Storing the multiple user accounts from InfoPath to SharePoint</title><link>http://k2underground.com/blogs/k2/archive/2012/04/23/storing-the-multiple-user-accounts-from-infopath-to-sharepoint.aspx</link><pubDate>Mon, 23 Apr 2012 18:32:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:42379</guid><dc:creator>chrisg</dc:creator><slash:comments>0</slash:comments><description>&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;This is a post about storing the data from an InfoPath Contact Selector control into SharePoint, in a proper way without coding. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;It is very useful that when you have a K2 workflow with an InfoPath form, you want to store or synchronize the form data with a SharePoint item. I ran into an issue with saving multiple user accounts from a Contact Selector control. All accounts entered in this InfoPath control must be saved with the corresponding SharePoint item. When the user submits the form K2 must update the metadata of the SharePoint item.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;For example: imagine that your InfoPath form contains a Contact Selector in which multiple user accounts may be added, like in the screenshot below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3252.clip_5F00_image002_5F00_51C05F05.png"&gt;&lt;span style="font-size:x-small;"&gt;&lt;img height="53" width="485" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7065.clip_5F00_image002_5F00_thumb_5F00_7ED54BD3.png" alt="clip_image002" border="0" title="clip_image002" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;You want to store the user accounts (Bremen, Onderwater, Schepers) with the SharePoint list item, like in the screenshot below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4010.clip_5F00_image003_5F00_572ECFA9.png"&gt;&lt;span style="font-size:x-small;"&gt;&lt;img height="57" width="500" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7450.clip_5F00_image003_5F00_thumb_5F00_6FBE6CF9.png" alt="clip_image003" border="0" title="clip_image003" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;By default, it looks like this is not possible but I have found something that can do the trick. And the best thing: no coding is needed!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;In you are familiar with the Contact Selector you know that InfoPath has the following fields in the main data source (a Person group that contains the nodes DisplayName, AccountId, AccountType). If you do not know how to configure the Contact Selector, please read the following page: &lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms558892.aspx"&gt;&lt;span style="font-size:x-small;"&gt;http://msdn.microsoft.com/en-us/library/ms558892.aspx&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0181.clip_5F00_image005_5F00_40818599.png"&gt;&lt;span style="font-size:x-small;"&gt;&lt;img height="169" width="223" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6355.clip_5F00_image005_5F00_thumb_5F00_46C85C27.png" alt="clip_image005" border="0" title="clip_image005" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;In SharePoint you need to create a column to store the user accounts. In my example I name this column &amp;#39;Experts&amp;#39;. Please note that you need to switch on the &amp;#39;Allow multiple selections&amp;#39; option.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0412.clip_5F00_image007_5F00_1802A385.png"&gt;&lt;span style="font-size:x-small;"&gt;&lt;img height="174" width="244" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8507.clip_5F00_image007_5F00_thumb_5F00_0EC66844.png" alt="clip_image007" border="0" title="clip_image007" style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;Now you go to your K2 workflow and you create two activities (at this point the magic happens).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8422.clip_5F00_image009_5F00_150D3ED2.png"&gt;&lt;span style="font-size:x-small;"&gt;&lt;img height="244" width="232" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/0576.clip_5F00_image009_5F00_thumb_5F00_33E3B2B0.png" alt="clip_image009" border="0" title="clip_image009" style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;For the first activity, &amp;#39;Extract experts&amp;#39;, plan the Destination Users according the options below:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;- Run this wizard in Advanced Mode&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;- Plan per destination - All at once&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;- Create a slot for each destination&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;- Resolve all roles and groups to users&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;- Add a destination set with the AccountId node of the InfoPath Contact Selector&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/2742.clip_5F00_image011_5F00_2BCDD6D8.png"&gt;&lt;span style="font-size:x-small;"&gt;&lt;img height="274" width="495" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4478.clip_5F00_image011_5F00_thumb_5F00_7B575261.png" alt="clip_image011" border="0" title="clip_image011" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;Create a data field of the type String. In my example I name this field &amp;#39;Experts&amp;#39;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;Add a Data Event to the first activity. This Data Event fills the data field &amp;#39;Experts&amp;#39; with all user accounts in the Contact Selector.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4314.clip_5F00_image013_5F00_67C9F2C0.png"&gt;&lt;span style="font-size:x-small;"&gt;&lt;img height="335" width="531" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/7853.clip_5F00_image013_5F00_thumb_5F00_45FE1A2F.png" alt="clip_image013" border="0" title="clip_image013" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt;r.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;To do this you will need the following formula:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8105.clip_5F00_image015_5F00_64D48E0D.png"&gt;&lt;span style="font-size:x-small;"&gt;&lt;img height="263" width="490" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/8105.clip_5F00_image015_5F00_thumb_5F00_62B78F44.png" alt="clip_image015" border="0" title="clip_image015" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;In the second activity, &amp;#39;Save experts&amp;#39;, add a SharePoint List Items event. Configure this event to save the Data Field Experts to the SharePoint Experts column. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6153.clip_5F00_image017_5F00_5ADC4EAC.png"&gt;&lt;span style="font-size:x-small;"&gt;&lt;img height="86" width="430" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/3757.clip_5F00_image017_5F00_thumb_5F00_0BFB894D.png" alt="clip_image017" border="0" title="clip_image017" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;As you probably have noticed, the first activity loops through all InfoPath AccountId nodes and appends them to the Experts data field. The second activity just stores the value of this data field in the SharePoint metadata column. Easy like that!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span style="font-size:x-small;"&gt;This was a guest post written by Jordy van Bremen from &lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a target="_blank" href="http://www.opendocs.nl/"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span style="font-size:x-small;"&gt;Opendocs&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&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=42379" width="1" height="1"&gt;</description></item><item><title>Updating an InfoPath Form after a Client Event</title><link>http://k2underground.com/blogs/k2/archive/2012/04/16/updating-an-infopath-form-after-a-client-event.aspx</link><pubDate>Mon, 16 Apr 2012 15:05:35 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:42286</guid><dc:creator>JohanL</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;From within a K2 Process the fields from an InfoPath form can be updated by accessing the InfoPath XML Field from the K2 Object Browser.&lt;/p&gt;  &lt;p&gt;When trying to do this from within an activity containing an InfoPath client event, you will find that your changes are not being persisted to the InfoPath form when the activity completes. This happens because each destination user gets their own copy of the InfoPath XML which they interact with at an Activity Instance level. When the activity completes, the XML is copied back to the Process-level XML field. When you have a data event in the same activity as an InfoPath Client Event, use the Activity-level XML field values when trying to read/write to the InfoPath form. This ensures that when the activity completes, your changes are persisted to the InfoPath form when the next person opens their InfoPath form.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/4848.image_5F00_009C6BD8.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/k2.metablogapi/6012.image_5F00_thumb_5F00_564C7255.png" width="436" height="282" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You only need to do this on any event after a InfoPath Client Event, just before an InfoPath Client Event or in an activity without any InfoPath Client Events you should continue using the Process XML field.&lt;/p&gt;  &lt;p&gt;Happy Designing!&lt;/p&gt;  &lt;p&gt;JohanL&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=42286" width="1" height="1"&gt;</description><category domain="http://k2underground.com/blogs/k2/archive/tags/Process+Design/default.aspx">Process Design</category><category domain="http://k2underground.com/blogs/k2/archive/tags/InfoPath/default.aspx">InfoPath</category><category domain="http://k2underground.com/blogs/k2/archive/tags/Data+Event/default.aspx">Data Event</category></item><item><title>Talking Workflow with Virgil Carroll</title><link>http://k2underground.com/blogs/chrisg/archive/2012/03/12/talking-workflow-with-virgil-carroll.aspx</link><pubDate>Mon, 12 Mar 2012 14:48:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:41964</guid><dc:creator>chrisg</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Our latest podcast on talking workflow we are luck enough to have Virgial Carroll join us.&amp;nbsp; Virgil is regularly out there speaking and evangilizing the beneftis of SharePoint and this week sits down with us to talk about workflow and business processes. Virgil runs High Monkey consulting &lt;a href="http://www.highmonkey.com/"&gt;http://www.highmonkey.com/&lt;/a&gt; and can be found on twitter at &lt;a href="http://twitter.com/vcmonkey"&gt;http://twitter.com/vcmonkey&lt;/a&gt;&amp;nbsp; or you can read his blog here &lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;a href="http://monkeyblog.highmonkey.com"&gt;&lt;span style="color:#0000ff;"&gt;http://monkeyblog.highmonkey.com&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&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=41964" width="1" height="1"&gt;</description><enclosure url="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.00.04.19.64/Virgil-Final.mp3" length="26181051" type="audio/mpeg" /><itunes:author>chrisg</itunes:author><itunes:subtitle>Talking Workflow with Virgil Carroll</itunes:subtitle><itunes:keywords>Workflow,SharePoint</itunes:keywords><itunes:explicit>no</itunes:explicit><category domain="http://k2underground.com/blogs/chrisg/archive/tags/Workflow/default.aspx">Workflow</category><category domain="http://k2underground.com/blogs/chrisg/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Talking workflow with Tim Knechtel</title><link>http://k2underground.com/blogs/chrisg/archive/2012/02/28/tallin-workflow-with-tim-knechtel.aspx</link><pubDate>Tue, 28 Feb 2012 17:24:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:41897</guid><dc:creator>chrisg</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;In this edition of Talking workflow we are joined by Tim Knechtel.&amp;nbsp;Tim is an Insider and&amp;nbsp;Principal Technologist with &lt;a target="_blank" href="http://www.caprivisolutions.com/"&gt;Caprivi Solutions&lt;/a&gt;&amp;nbsp; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://k2underground.com/aggbug.aspx?PostID=41897" width="1" height="1"&gt;</description><enclosure url="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.00.04.18.97/tim-knechtel-final.mp3" length="14746939" type="audio/mpeg" /><itunes:author>chrisg</itunes:author><itunes:subtitle>Talking workflow with Tim Knechtel</itunes:subtitle><itunes:keywords /><itunes:explicit>no</itunes:explicit></item><item><title>Talkin workflow with Ruben D'arco</title><link>http://k2underground.com/blogs/chrisg/archive/2012/02/13/talkin-workflow-with-ruben-d-arco.aspx</link><pubDate>Mon, 13 Feb 2012 20:32:00 GMT</pubDate><guid isPermaLink="false">1c9bda6b-c6e6-4e79-8d32-b70ad0011ef7:41821</guid><dc:creator>chrisg</dc:creator><slash:comments>0</slash:comments><description>&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;This week in talkin workflow we are talking with Ruben D&amp;#39;arco.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Ruben is a former insider and most recently started working for our&amp;nbsp;K2 Northern Europe&amp;nbsp;Distributorship.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;In Ruben&amp;#39;s diverse experience he has gained some very good insight into workflow and the use of K2 overall.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;This podcast is definitely worth a listen.&amp;nbsp; You can find Ruben on twitter at &lt;a href="http://twitter.com/_cyclops"&gt;http://twitter.com/_cyclops&lt;/a&gt;_ or on his blog at &lt;a href="http://cyclops.nettrends.nl/blog/"&gt;http://cyclops.nettrends.nl/blog/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;span style="font-family:Calibri;font-size:small;"&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=41821" width="1" height="1"&gt;</description><enclosure url="http://k2underground.com/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.00.04.18.21/Ruben-Final.mp3" length="12785912" type="audio/mpeg" /><itunes:author>chrisg</itunes:author><itunes:subtitle>Talkin workflow with Ruben D'arco</itunes:subtitle><itunes:keywords /><itunes:explicit>no</itunes:explicit></item></channel></rss>