<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>SharePoint Work</title>
	<atom:link href="http://ntorrent.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ntorrent.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Fri, 07 Oct 2011 12:03:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ntorrent.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>SharePoint Work</title>
		<link>http://ntorrent.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ntorrent.wordpress.com/osd.xml" title="SharePoint Work" />
	<atom:link rel='hub' href='http://ntorrent.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Monitoring your SharePoint Application</title>
		<link>http://ntorrent.wordpress.com/2011/10/06/monitoring-your-sharepoint-application/</link>
		<comments>http://ntorrent.wordpress.com/2011/10/06/monitoring-your-sharepoint-application/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 21:34:00 +0000</pubDate>
		<dc:creator>ntorrent</dc:creator>
				<category><![CDATA[Non classé]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://ntorrent.wordpress.com/?p=180</guid>
		<description><![CDATA[Problem How can we monitor efficiently our farm? How can we monitor a farm as a global entity? What is the simplest approach? How can we receive alerts when things are going wrong? Solutions There are 3 different ways to monitor your SharePoint farm servers: Using the Windows Event Views Using the SharePoint ULS (Unified [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ntorrent.wordpress.com&amp;blog=3486788&amp;post=180&amp;subd=ntorrent&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h4>Problem</h4>
<p>How can we monitor efficiently our farm? How can we monitor a farm as a global entity? What is the simplest approach? How can we receive alerts when things are going wrong?</p>
<h4>Solutions</h4>
<p>There are 3 different ways to monitor your SharePoint farm servers:</p>
<ol>
<li>Using the Windows Event Views </li>
<li>Using the SharePoint ULS (Unified Logging Service) logs </li>
<li>The new SPS 2010 Health Center </li>
</ol>
<p>Solution 1: Windows Event Viewers</p>
<ul>
<li>Advantages: This is a robust solution that is used other the places; Most of the time in large companies you have dedicated tools in place to monitor these information (see: <a href="http://www.microsoft.com/en-us/server-cloud/system-center/operations-manager.aspx" target="_blank">SCOM</a>; <a href="http://www.monitortools.com/eventlog/" target="_blank">Monitor</a>;…); Easy to log event from your application </li>
<li>Disadvantages: This requires additional tools to monitor the event and therefore is more complex to manage; No out of the box global farm vision except by using third party tools </li>
</ul>
<p>Solution 2: ULS</p>
<ul>
<li>Advantages: Easy to log event from your application; Free third party tool to read the content; Out of the box SharePoint solution </li>
<li>Disadvantages: No out of the box global farm vision except by using third party tools </li>
</ul>
<p>Solution 3: Health Center</p>
<ul>
<li>Advantages: Out of the box feature; Global to the farm </li>
<li>Disadvantages: Not really easy to extend; More dedicated to the farm health and not our application </li>
</ul>
<h4>My solution</h4>
<p>I have decided to use the ULS solution as I had a short dead line. The idea was to receive a email every time something wrong happen on the application and on on one of the front end server.</p>
<p>Step 1: Access the logs on each farm server.</p>
<p>The solution was simple, just ask the farm administrator to share the logs folders by giving read access to a specific service account</p>
<p>Step 2: Write a simple console application that analyze the logs on each frond end server, consolidate the results and send it by email.</p>
<p><a href="https://skydrive.live.com/embedicon.aspx/WordPress/LogsMonitoring.zip?cid=727fafcfc60443c9&amp;sc=documents">https://skydrive.live.com/embedicon.aspx/WordPress/LogsMonitoring.zip?cid=727fafcfc60443c9&amp;sc=documents</a></p>
<p>Step 3: Create a scheduled task.</p>
<p>At the end, you will receive a mail with the logs attached:</p>
<p><img style="margin:0 5px;" src="https://blufiles.storage.live.com/y1pMaCmPqlSnEtAbMRTKE415pqoc0qXrq-AtSplRI3KsimjoAUc1PELq3678wF_Wn9RNtbIYcANiPOfzOLIs6NTgA/10-5-2011%203-27-37%20PM.jpg?psid=" width="415" height="103" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ntorrent.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ntorrent.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ntorrent.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ntorrent.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ntorrent.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ntorrent.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ntorrent.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ntorrent.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ntorrent.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ntorrent.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ntorrent.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ntorrent.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ntorrent.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ntorrent.wordpress.com/180/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ntorrent.wordpress.com&amp;blog=3486788&amp;post=180&amp;subd=ntorrent&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ntorrent.wordpress.com/2011/10/06/monitoring-your-sharepoint-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/390dda86b35831df95bd5113a5da8c20?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ntorrent</media:title>
		</media:content>

		<media:content url="https://blufiles.storage.live.com/y1pMaCmPqlSnEtAbMRTKE415pqoc0qXrq-AtSplRI3KsimjoAUc1PELq3678wF_Wn9RNtbIYcANiPOfzOLIs6NTgA/10-5-2011%203-27-37%20PM.jpg?psid=" medium="image" />
	</item>
		<item>
		<title>Monitoring your SharePoint Application</title>
		<link>http://ntorrent.wordpress.com/2011/10/06/monitoring-your-sharepoint-application-2/</link>
		<comments>http://ntorrent.wordpress.com/2011/10/06/monitoring-your-sharepoint-application-2/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 10:51:13 +0000</pubDate>
		<dc:creator>ntorrent</dc:creator>
				<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">https://ntorrent.wordpress.com/2011/10/06/monitoring-your-sharepoint-application-2/</guid>
		<description><![CDATA[Problem How can we monitor efficiently our farm? How can we monitor a farm as a global entity? What is the simplest approach? How can we receive alerts when things are going wrong? Solutions There are 3 different ways to monitor your SharePoint farm servers: Using the Windows Event Views Using the SharePoint ULS (Unified [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ntorrent.wordpress.com&amp;blog=3486788&amp;post=192&amp;subd=ntorrent&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h4>Problem</h4>
<p>How can we monitor efficiently our farm? How can we monitor a farm as a global entity? What is the simplest approach? How can we receive alerts when things are going wrong?</p>
<h4>Solutions</h4>
<p>There are 3 different ways to monitor your SharePoint farm servers:</p>
<ol>
<li>Using the Windows Event Views </li>
<li>Using the SharePoint ULS (Unified Logging Service) logs </li>
<li>The new SPS 2010 Health Center </li>
</ol>
<p>Solution 1: Windows Event Viewers</p>
<ul>
<li>Advantages: This is a robust solution that is used other the places; Most of the time in large companies you have dedicated tools in place to monitor these information (see: <a href="http://www.microsoft.com/en-us/server-cloud/system-center/operations-manager.aspx" target="_blank">SCOM</a>; <a href="http://www.monitortools.com/eventlog/" target="_blank">Monitor</a>;…); Easy to log event from your application </li>
<li>Disadvantages: This requires additional tools to monitor the event and therefore is more complex to manage; No out of the box global farm vision except by using third party tools </li>
</ul>
<p>Solution 2: ULS</p>
<ul>
<li>Advantages: Easy to log event from your application; Free third party tool to read the content; Out of the box SharePoint solution </li>
<li>Disadvantages: No out of the box global farm vision except by using third party tools </li>
</ul>
<p>Solution 3: Health Center</p>
<ul>
<li>Advantages: Out of the box feature; Global to the farm </li>
<li>Disadvantages: Not really easy to extend; More dedicated to the farm health and not our application </li>
</ul>
<h4>My solution</h4>
<p>I have decided to use the ULS solution and I had a short dead line. The idea was to receive a email every time something wrong happen on the application and on on one of the front end server.</p>
<p>Step 1: Access the logs on each farm server.</p>
<p>The solution was simple, just ask the farm administrator to share the logs folders by giving read access to a specific service account</p>
<p>Step 2: Write a simple console application that analyze the logs on each frond end server, consolidate the results and send it by email.</p>
<p><a href="https://0ob54g.blu.livefilestore.com/y1peP8cm2azS9UT5FPaW0zkKWG7wgvz48Qc-ImnkbOeslDzNV9CTurNCqDABJV5wthQ2s6N-ms2FOHqiZNG-JvvOsFEBrROselM/LogsMonitoring.zip?download&amp;psid=1" target="_blank">Project File</a></p>
<p>Step 3: Create a scheduled task.</p>
<p>At the end, you will receive a mail with the logs attached:</p>
<p><a href="http://ntorrent.files.wordpress.com/2011/10/10-5-2011-3-27-37-pm2.jpg"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;margin:0 5px;" title="10-5-2011 3-27-37 PM" border="0" alt="10-5-2011 3-27-37 PM" src="http://ntorrent.files.wordpress.com/2011/10/10-5-2011-3-27-37-pm_thumb.jpg?w=244&#038;h=63" width="244" height="63" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ntorrent.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ntorrent.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ntorrent.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ntorrent.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ntorrent.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ntorrent.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ntorrent.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ntorrent.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ntorrent.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ntorrent.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ntorrent.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ntorrent.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ntorrent.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ntorrent.wordpress.com/192/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ntorrent.wordpress.com&amp;blog=3486788&amp;post=192&amp;subd=ntorrent&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ntorrent.wordpress.com/2011/10/06/monitoring-your-sharepoint-application-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/390dda86b35831df95bd5113a5da8c20?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ntorrent</media:title>
		</media:content>

		<media:content url="http://ntorrent.files.wordpress.com/2011/10/10-5-2011-3-27-37-pm_thumb.jpg" medium="image">
			<media:title type="html">10-5-2011 3-27-37 PM</media:title>
		</media:content>
	</item>
		<item>
		<title>SharePoint 2010 Workflow</title>
		<link>http://ntorrent.wordpress.com/2010/01/15/sharepoint-2010-workflow/</link>
		<comments>http://ntorrent.wordpress.com/2010/01/15/sharepoint-2010-workflow/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 13:54:16 +0000</pubDate>
		<dc:creator>ntorrent</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://ntorrent.wordpress.com/2010/01/15/sharepoint-2010-workflow/</guid>
		<description><![CDATA[This articles describes the process to create a workflow from the beginning to the end: Create the global Workflow with Visio 2010 Import and customize it within SharePoint Designer 2010 Add some advanced logics with Visual Studio 2010 Display the Workflow current state with Visio 2010 The goal is to create requests and copy travel [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ntorrent.wordpress.com&amp;blog=3486788&amp;post=114&amp;subd=ntorrent&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This articles describes the process to create a workflow from the beginning to the end:</p>
<ol>
<li>Create the global Workflow with Visio 2010 </li>
<li>Import and customize it within SharePoint Designer 2010 </li>
<li>Add some advanced logics with Visual Studio 2010 </li>
<li>Display the Workflow current state with Visio 2010 </li>
</ol>
<p>The goal is to create requests and copy travel request to a new list called “Travel requests”.</p>
<h5></h5>
<h5>Create the requirements lists    </p>
</h5>
<p>Video 1: Lists creation</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:887c24cf-0775-422a-9af5-89039eb8365b" class="wlWriterSmartContent">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='455' height='286' src='http://www.youtube.com/embed/0NW1z3L8p48?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></div>
</p></div>
<h5>&#160;</h5>
<h5>Step 1: Create the workflow with Visio    <br /></h5>
<p>Remark: The workflow is simple and is just used to demonstrate the new capabilities.</p>
<p>Video 1: Create the workflow</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:2948a631-0e39-42ad-b11b-747d41091bd2" class="wlWriterSmartContent">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='455' height='286' src='http://www.youtube.com/embed/M61j2qyHQhM?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></div>
</p></div>
<p>Video 2: Export the workflow</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:c9421b34-d0a7-4ce8-b769-ebc3f92be8e8" class="wlWriterSmartContent">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='455' height='286' src='http://www.youtube.com/embed/LIFQ-twUHrg?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></div>
</p></div>
<h5>&#160;</h5>
<h5>&#160;</h5>
<h5>Step 2: Import and update the workflow in SharePoint Designer    </p>
</h5>
<p>For this example, the workflow is attached directly to the “Requests” list.</p>
<p>Video 1: Import the Visio created workflow</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:1799b419-67b8-4adc-ba03-46b54890089d" class="wlWriterSmartContent">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='455' height='286' src='http://www.youtube.com/embed/BWbZ8rTJmas?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></div>
</p></div>
<p>Video 2: Update the logic</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:6be7d901-5895-46b6-84ac-5543d28eb283" class="wlWriterSmartContent">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='455' height='286' src='http://www.youtube.com/embed/pI6Z1cToyiU?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></div>
</p></div>
<h5>Test the workflow</h5>
<p>&#160;</p>
<p>Create some requests and see if the logic works.</p>
<p>Video1: Testing the workflow</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:5c8cd7ee-70cf-40b3-a5da-fc731e7ca102" class="wlWriterSmartContent">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='455' height='286' src='http://www.youtube.com/embed/LmM_J5pX_bg?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></div>
</p></div>
<p>&#160;</p>
<h5>Update the workflow logic</h5>
<p>The goal is to upgrade the logic by adding a new task step and retrofit the modification to Visio.</p>
<p>Video 1: Updating the logic inside SharePoint Designer</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:95cf6eff-3686-40c6-8e65-748079393427" class="wlWriterSmartContent">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='455' height='286' src='http://www.youtube.com/embed/4v8biMslw58?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></div>
</p></div>
<p>&#160;</p>
<p>Video 2: Exporting the modification to Visio</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:37dc4e59-eb0c-42b1-9301-2f2ea3d8404e" class="wlWriterSmartContent">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='455' height='286' src='http://www.youtube.com/embed/YXylZg7f-bc?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></div>
</p></div>
<h5>Visio visualization    </p>
</h5>
<p>SharePoint Enterprise allows visualizing the workflow status in real time.</p>
<p>Video 1: Activate the Visio Service at the farm level</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:fe1998a6-e3f0-437a-88ac-69d2779e3a6e" class="wlWriterSmartContent">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='455' height='286' src='http://www.youtube.com/embed/YHYrEfM8z4k?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></div>
</p></div>
<p>&#160;</p>
<p>Video 2: activate the Visio service on the site collection level</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:f4d5c097-2e84-474c-9ecb-0c9f8088b8bb" class="wlWriterSmartContent">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='455' height='286' src='http://www.youtube.com/embed/cbP2AQPpLL8?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></div>
</p></div>
<p>&#160;</p>
<p>Video 3: Activate it on the workflow level</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:15e60c69-2c0e-4b2c-89e1-9dd5661b3bc3" class="wlWriterSmartContent">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='455' height='286' src='http://www.youtube.com/embed/pewXi-1nKs4?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></div>
</p></div>
<p>&#160;</p>
<p>Video 4: Test if it works</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:4292028f-4cd2-4597-9fe2-35da0460b847" class="wlWriterSmartContent">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='455' height='286' src='http://www.youtube.com/embed/r0wmlzBzbTo?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></div>
</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ntorrent.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ntorrent.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ntorrent.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ntorrent.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ntorrent.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ntorrent.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ntorrent.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ntorrent.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ntorrent.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ntorrent.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ntorrent.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ntorrent.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ntorrent.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ntorrent.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ntorrent.wordpress.com&amp;blog=3486788&amp;post=114&amp;subd=ntorrent&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ntorrent.wordpress.com/2010/01/15/sharepoint-2010-workflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/390dda86b35831df95bd5113a5da8c20?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ntorrent</media:title>
		</media:content>
	</item>
		<item>
		<title>SharePoint &#8211; Parallel Approval within State Machine</title>
		<link>http://ntorrent.wordpress.com/2008/04/21/sharepoint-parallel-approval-within-state-machine/</link>
		<comments>http://ntorrent.wordpress.com/2008/04/21/sharepoint-parallel-approval-within-state-machine/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 14:39:02 +0000</pubDate>
		<dc:creator>ntorrent</dc:creator>
				<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://ntorrent.wordpress.com/?p=53</guid>
		<description><![CDATA[How can we easily create a parallel approval within a state machine. The goal is to create several tasks inside a state and wait their completion before jumping to another state. In this sample we work on 2 tasks but this can be easily extended to multiple one. Usually when using state machine with SharePoint, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ntorrent.wordpress.com&amp;blog=3486788&amp;post=53&amp;subd=ntorrent&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>How can we easily create a parallel approval within a state machine.</p>
<p>The goal is to create several tasks inside a state and wait their completion before jumping to another state.</p>
<p>In this sample we work on 2 tasks but this can be easily extended to multiple one.</p>
<p>Usually when using state machine with SharePoint, we do the following steps inside the state:</p>
<ol>
<li>Create the state initialization activity: Creating the task</p>
<p><a href="http://ntorrent.files.wordpress.com/2008/04/image8.png" target="_blank"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="244" alt="image" src="http://ntorrent.files.wordpress.com/2008/04/image-thumb8.png?w=199&#038;h=244" width="199" border="0"></a> </li>
<li>Create the state event driven activity: Waiting the task update
<p><a href="http://ntorrent.files.wordpress.com/2008/04/image9.png" target="_blank"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="244" alt="image" src="http://ntorrent.files.wordpress.com/2008/04/image-thumb9.png?w=208&#038;h=244" width="208" border="0"></a> </li>
<li>Create the state finalization activity: Completing or deleting the task
<p><a href="http://ntorrent.files.wordpress.com/2008/04/image10.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="244" alt="image" src="http://ntorrent.files.wordpress.com/2008/04/image-thumb10.png?w=196&#038;h=244" width="196" border="0"></a> </li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>We need to change these steps as following:</p>
<ol>
<li>Create the state initialization activity: Creating both tasks</p>
<p><a href="http://ntorrent.files.wordpress.com/2008/04/image12.png" target="_blank"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="244" alt="image" src="http://ntorrent.files.wordpress.com/2008/04/image-thumb11.png?w=165&#038;h=244" width="165" border="0"></a> </li>
<li>Create one state event driven activity for the first task: Waiting the first task update
<p>See the explanation below</li>
<li>Create on state event driven activity for the second task: Waiting the second task update
<p>See the explanation below</li>
</ol>
<p><strong><u>The event driven activity</u></strong></p>
<p>Both of the event driven activities have the same template:</p>
<p><a href="http://ntorrent.files.wordpress.com/2008/04/image13.png" target="_blank"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="244" alt="image" src="http://ntorrent.files.wordpress.com/2008/04/image-thumb12.png?w=191&#038;h=244" width="191" border="0"></a> </p>
<p>The trick is to use boolean (or Dictionary) to save the state of the process. When the first task is completed, a boolean is used to mark it as completed:</p>
<div>
<div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;border-style:none;padding:0;">
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, 'Courier New', courier, monospace;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   1:</span> <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">void</span> onTaskChangedTU2_Invoked(<span style="color:#0000ff;">object</span> sender, ExternalDataEventArgs e)</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   2:</span> {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, 'Courier New', courier, monospace;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   3:</span>     IsTU2AlreadyApproved = <span style="color:#0000ff;">true</span>;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   4:</span> }</pre>
</div>
</div>
<p>&nbsp;</p>
<p>The same logic is used for the second task. On the branch condition, we test if all the task have been completed:</p>
<p>&nbsp;</p>
<div>
<div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;border-style:none;padding:0;">
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, 'Courier New', courier, monospace;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   1:</span> <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">void</span> AllTaskCompleted(<span style="color:#0000ff;">object</span> sender, ConditionalEventArgs e)</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   2:</span> {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, 'Courier New', courier, monospace;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   3:</span>     <span style="color:#008000;">//If all other tasks completed then</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   4:</span>     e.Result = <span style="color:#0000ff;">true</span>;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, 'Courier New', courier, monospace;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   5:</span>     <span style="color:#008000;">//Else</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   6:</span>     e.Result = <span style="color:#0000ff;">false</span>;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, 'Courier New', courier, monospace;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   7:</span> }</pre>
</div>
</div>
<p>&nbsp;</p>
<p>If all the other task have been completed then we jump to the new state and if not we stay at the same state.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ntorrent.wordpress.com/53/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ntorrent.wordpress.com/53/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ntorrent.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ntorrent.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ntorrent.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ntorrent.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ntorrent.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ntorrent.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ntorrent.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ntorrent.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ntorrent.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ntorrent.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ntorrent.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ntorrent.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ntorrent.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ntorrent.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ntorrent.wordpress.com&amp;blog=3486788&amp;post=53&amp;subd=ntorrent&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ntorrent.wordpress.com/2008/04/21/sharepoint-parallel-approval-within-state-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/390dda86b35831df95bd5113a5da8c20?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ntorrent</media:title>
		</media:content>

		<media:content url="http://ntorrent.files.wordpress.com/2008/04/image-thumb8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ntorrent.files.wordpress.com/2008/04/image-thumb9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ntorrent.files.wordpress.com/2008/04/image-thumb10.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ntorrent.files.wordpress.com/2008/04/image-thumb11.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ntorrent.files.wordpress.com/2008/04/image-thumb12.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>MOSS 2007 &#8211; Workflow &#8211; InfoPath Form Associated</title>
		<link>http://ntorrent.wordpress.com/2008/04/15/moss-2007-workflow-infopath-form-associated/</link>
		<comments>http://ntorrent.wordpress.com/2008/04/15/moss-2007-workflow-infopath-form-associated/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 14:44:04 +0000</pubDate>
		<dc:creator>ntorrent</dc:creator>
				<category><![CDATA[InfoPath]]></category>
		<category><![CDATA[SharePoint 2007]]></category>

		<guid isPermaLink="false">http://ntorrent.wordpress.com/?p=14</guid>
		<description><![CDATA[It&#8217;s pretty simple to create a SharePoint workflow using Visual Studio and InfoPath (for the forms). Take as a sample the &#8220;approval&#8221; one provided with MOSS. When a task is created by the workflow, it&#8217;s stored in the associate task list. When we click on it, it&#8217;s redirect to the &#8220;WrkTaskIP.aspx&#8221; that displays the task [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ntorrent.wordpress.com&amp;blog=3486788&amp;post=14&amp;subd=ntorrent&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s pretty simple to create a SharePoint workflow using Visual Studio and InfoPath (for the forms). Take as a sample the &#8220;approval&#8221; one provided with MOSS.</p>
<p>When a task is created by the workflow, it&#8217;s stored in the associate task list. When we click on it, it&#8217;s redirect to the &#8220;WrkTaskIP.aspx&#8221; that displays the task form. This page used the &#8220;XmlFormView&#8221; to display the associated task form:</p>
<p><a href="http://ntorrent.files.wordpress.com/2008/04/image11.png" target="_blank"><img style="border-width:0;" height="149" alt="image" src="http://ntorrent.files.wordpress.com/2008/04/image11-thumb.png?w=244&#038;h=149" width="244" border="0"></a></p>
<p>Remark: All these steps are not addressed in this post.</p>
<p>A document library storing Infopath Forms is associated to the workflow. On the site library advanced settings, the &#8220;Display as Web page&#8221; functionality is activated.</p>
<p>Settings:</p>
<p><a href="http://ntorrent.files.wordpress.com/2008/04/image15.png" target="_blank"><img style="border-width:0;" height="34" alt="image" src="http://ntorrent.files.wordpress.com/2008/04/image15-thumb.png?w=244&#038;h=34" width="244" border="0"></a></p>
<p>Opened form:</p>
<p><a href="http://ntorrent.files.wordpress.com/2008/04/image7.png" target="_blank"><img style="border-width:0;" height="36" alt="image" src="http://ntorrent.files.wordpress.com/2008/04/image-thumb7.png?w=244&#038;h=36" width="244" border="0"></a></p>
<p>That means the InfoPath forms are opened inside the web explorer using the &#8220;Forms Service&#8221;. Imagine that the workflow has been started and one task has been created. When clicking on the task link, the &#8220;WrkTaskIP.aspx&#8221; is displayed for the approval process. On this page, a link to the targeted document exists:</p>
<p><a href="http://ntorrent.files.wordpress.com/2008/04/image3.png" target="_blank"><img style="border-width:0;" height="102" alt="image" src="http://ntorrent.files.wordpress.com/2008/04/image-thumb3.png?w=244&#038;h=102" width="244" border="0"></a></p>
<p>When clicking on this link, we expect to see the form opened by the browser. It&#8217;s not the case and it&#8217;s a simple link to the document. The InfoPath client application is started instead of the browser:</p>
<p><a href="http://ntorrent.files.wordpress.com/2008/04/image25.png" target="_blank"><img style="border-width:0;" height="60" alt="image" src="http://ntorrent.files.wordpress.com/2008/04/image25-thumb.png?w=244&#038;h=60" width="244" border="0"></a></p>
<p><strong><span style="text-decoration:underline;"><span style="font-size:small;">Issue</span></span></strong></p>
<p>This is the <strong>issue</strong>. This page doesn&#8217;t look at the source library settings in order to update the link and displays as expected a URL like:</p>
<p>http://vpcmoss/_layouts/WrkTaskIP.aspx?List=b3983e69%2D71c0%2D4348%2Db22b%2D5ae09f686b29&amp;ID=1</p>
<p><strong><span style="text-decoration:underline;"><span style="font-size:small;">Solution</span></span></strong></p>
<p>No it&#8217;s time to find a solution. The first reflex is use our favorite search engine. The result is that there are not so many answer. Maybe there is another solution existing on the web but anyway, this post shows a global approach on &#8220;<strong><em>how find solution on SharePoint</em></strong>&#8220;.</p>
<p><strong><span style="text-decoration:underline;">Step 1</span></strong></p>
<p>First we need to understand how is working the &#8220;WrkTaskIP.aspx&#8221; page to build this link. Start by opening this page to look at the HTML and page directive.</p>
<div style="border-right:gray 1px solid;border-top:gray 1px solid;font-size:8pt;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;margin:20px 0 10px;padding:4px;">
<div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;border-style:none;padding:0;"><span style="color:#606060;">1:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">tr</span><span style="color:#0000ff;">&gt;</span></div>
<p><span style="color:#606060;">2:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">td</span> <span style="color:#ff0000;">width</span><span style="color:#0000ff;">=&#8221;10&#8243;</span> <span style="color:#ff0000;">valign</span><span style="color:#0000ff;">=&#8221;center&#8221;</span> <span style="color:#ff0000;">style</span><span style="color:#0000ff;">=&#8221;padding: 4px;&#8221;</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">3:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">img</span> <span style="color:#ff0000;">IMG</span> <span style="color:#ff0000;">SRC</span><span style="color:#0000ff;">=&#8221;/_layouts/images/Workflows.gif&#8221;</span> <span style="color:#ff0000;">alt</span>=&lt;%<span style="color:#ff0000;">SPHttpUtility</span>.<span style="color:#ff0000;">AddQuote</span>(<span style="color:#ff0000;">SPHttpUtility</span>.<span style="color:#ff0000;">HtmlEncode</span> (<span style="color:#ff0000;">GetLocString</span>(<span style="color:#0000ff;">&#8220;WrkTask_PageTitle&#8221;</span>)),<span style="color:#ff0000;">Response</span>.<span style="color:#ff0000;">Output</span>);%&gt;<span style="color:#0000ff;">/&gt;</span></p>
<p><span style="color:#606060;">4:</span> <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">td</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">5:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">td</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">6:</span> <span style="background-color:#ffff00;">&lt;%</span> <span style="color:#606060;">1:</span> SPHttpUtility.NoEncode(m_pageDescription,Response.Output);</p>
<p><span style="background-color:#ffff00;">%&gt;</span></p>
<p><span style="color:#606060;">7:</span> <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">td</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">8:</span> <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">tr</span><span style="color:#0000ff;">&gt;</span></p>
</div>
<p>The HTML generated for the document link is stored in the &#8220;m_pageDescription&#8221; field (sooooooo lovely <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ).</p>
<p><strong><span style="text-decoration:underline;">Step 2</span></strong></p>
<p>Next step, discover how the HTML data is generated. As many people said, Reflector is our friend. We looked at the aspx page directive to find the associated class:</p>
<blockquote><p>&lt;%@ Page Language=&#8221;C#&#8221; Inherits=&#8221;<strong><em>Microsoft.Office.Workflow.WrkTaskIPPage</em></strong>&#8220;</p>
</blockquote>
<p>We open Reflector and look at this class. All the code is in the &#8220;OnLoad&#8221; method.</p>
<p>Reflector view:</p>
<p><a href="http://ntorrent.files.wordpress.com/2008/04/image30.png" target="_blank"><img style="border-width:0;" height="151" alt="image" src="http://ntorrent.files.wordpress.com/2008/04/image30-thumb.png?w=244&#038;h=151" width="244" border="0"></a></p>
<p>The HTML link building:</p>
<p><a href="http://ntorrent.files.wordpress.com/2008/04/image35.png" target="_blank"><img style="border-width:0;" height="152" alt="image" src="http://ntorrent.files.wordpress.com/2008/04/image35-thumb.png?w=244&#038;h=152" width="244" border="0"></a></p>
<p><strong><span style="text-decoration:underline;">Step 3</span></strong></p>
<p>We just have to create a copy of the &#8220;WrkTaskIP.aspx&#8221; page, update the code. We can use the code below:</p>
<div style="border-right:gray 1px solid;border-top:gray 1px solid;font-size:8pt;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;margin:20px 0 10px;padding:4px;">
<div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;border-style:none;padding:0;"><span style="color:#606060;">1:</span> <span style="color:#0000ff;">string</span> linkHTML;</div>
<p><span style="color:#606060;">2:</span>&nbsp;</p>
<p><span style="color:#606060;">3:</span> <span style="color:#0000ff;">try</span></p>
<p><span style="color:#606060;">4:</span> {</p>
<p><span style="color:#606060;">5:</span> <span style="color:#008000;">// Get SPListItem source</span></p>
<p><span style="color:#606060;">6:</span> <span style="color:#0000ff;">using</span> (SPWeb web = SPContext.Current.Web)</p>
<p><span style="color:#606060;">7:</span> {</p>
<p><span style="color:#606060;">8:</span> SPList taskList = web.Lists[<span style="color:#0000ff;">new</span> Guid(Request[<span style="color:#006080;">"List"</span>])];</p>
<p><span style="color:#606060;">9:</span> SPListItem item = taskList.GetItemById(<span style="color:#0000ff;">int</span>.Parse(Request[<span style="color:#006080;">"ID"</span>]));</p>
<p><span style="color:#606060;">10:</span></p>
<p><span style="color:#606060;">11:</span> Guid workflowGuid = <span style="color:#0000ff;">new</span> Guid((<span style="color:#0000ff;">string</span>)item[SPBuiltInFieldId.WorkflowInstanceID]);</p>
<p><span style="color:#606060;">12:</span></p>
<p><span style="color:#606060;">13:</span> SPWorkflow workflow = <span style="color:#0000ff;">new</span> SPWorkflow(web, workflowGuid);</p>
<p><span style="color:#606060;">14:</span></p>
<p><span style="color:#606060;">15:</span> SPListItem sourceItem = workflow.ParentItem;</p>
<p><span style="color:#606060;">16:</span></p>
<p><span style="color:#606060;">17:</span> <span style="color:#008000;">//Build HTML Link header</span></p>
<p><span style="color:#606060;">18:</span> <span style="color:#0000ff;">if</span> (sourceItem == <span style="color:#0000ff;">null</span>)</p>
<p><span style="color:#606060;">19:</span> {</p>
<p><span style="color:#606060;">20:</span> linkHTML = <span style="color:#006080;">&#8220;No item associated&#8221;</span>;</p>
<p><span style="color:#606060;">21:</span> }</p>
<p><span style="color:#606060;">22:</span> <span style="color:#0000ff;">else</span></p>
<p><span style="color:#606060;">23:</span> {</p>
<p><span style="color:#606060;">24:</span> StringBuilder tmp = <span style="color:#0000ff;">new</span> StringBuilder();</p>
<p><span style="color:#606060;">25:</span> tmp.Append(<span style="color:#006080;">&#8220;This workflow task applies to &#8220;</span>);</p>
<p><span style="color:#606060;">26:</span> tmp.Append(<span style="color:#006080;">&#8220;&lt;a href=\&#8221;"</span>);</p>
<p><span style="color:#606060;">27:</span></p>
<p><span style="color:#606060;">28:</span> <span style="color:#008000;">// Build href</span></p>
<p><span style="color:#606060;">29:</span> <span style="color:#0000ff;">string</span> href = <span style="color:#0000ff;">string</span>.Format(<span style="color:#006080;">&#8220;{0}/_layouts/FormServer.aspx?XmlLocation=/{1}&amp;Options=DisableSave&amp;DefaultItemOpen=1&#8243;</span>,</p>
<p><span style="color:#606060;">30:</span> web.Url, sourceItem.Url);</p>
<p><span style="color:#606060;">31:</span></p>
<p><span style="color:#606060;">32:</span> tmp.Append(href);</p>
<p><span style="color:#606060;">33:</span> tmp.Append(<span style="color:#006080;">&#8220;\&#8221;&gt;&#8221;</span>);</p>
<p><span style="color:#606060;">34:</span></p>
<p><span style="color:#606060;">35:</span> tmp.Append(sourceItem.Title);</p>
<p><span style="color:#606060;">36:</span> tmp.Append(<span style="color:#006080;">&#8220;&lt;/a&gt;&#8221;</span>);</p>
<p><span style="color:#606060;">37:</span></p>
<p><span style="color:#606060;">38:</span> linkHTML = tmp.ToString();</p>
<p><span style="color:#606060;">39:</span> }</p>
<p><span style="color:#606060;">40:</span> }</p>
<p><span style="color:#606060;">41:</span> }</p>
<p><span style="color:#606060;">42:</span> <span style="color:#0000ff;">catch</span> (Exception ex)</p>
<p><span style="color:#606060;">43:</span> {</p>
<p><span style="color:#606060;">44:</span> linkHTML = <span style="color:#006080;">&#8220;Error when retrieving item source&#8221;</span>;</p>
<p><span style="color:#606060;">45:</span> }</p>
<p><span style="color:#606060;">46:</span> <span style="color:#008000;">// Update page</span></p>
<p><span style="color:#606060;">47:</span> m_pageDescription = linkHTML;</p>
<p><span style="color:#606060;">48:</span></p>
</div>
<p><strong><span style="text-decoration:underline;">Step 4</span></strong></p>
<p>We need to replace the &#8220;WrkTaskIP.aspx&#8221; by the created one when clicking on the task. This can easily be done using a &#8220;ContentType&#8221; and by updating the xml workflow file.</p>
<p>New updated task &#8220;ContentType&#8221;:</p>
<div style="border-right:gray 1px solid;border-top:gray 1px solid;font-size:8pt;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;margin:20px 0 10px;padding:4px;">
<div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;border-style:none;padding:0;"><span style="color:#606060;">1:</span> <span style="color:#0000ff;">&lt;?</span><span style="color:#800000;">xml</span> <span style="color:#ff0000;">version</span><span style="color:#0000ff;">=&#8221;1.0&#8243;</span> <span style="color:#ff0000;">encoding</span><span style="color:#0000ff;">=&#8221;utf-8&#8243;</span> ?<span style="color:#0000ff;">&gt;</span></div>
<p><span style="color:#606060;">2:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">Elements</span> <span style="color:#ff0000;">xmlns</span><span style="color:#0000ff;">=&#8221;http://schemas.microsoft.com/sharepoint/&#8221;</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">3:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">ContentType</span> <span style="color:#ff0000;">ID</span><span style="color:#0000ff;">=&#8221;0x01080100C9C9515DE4E24001905074F980F93151&#8243;</span></p>
<p><span style="color:#606060;">4:</span> <span style="color:#ff0000;">Name</span><span style="color:#0000ff;">=&#8221;WorkflowTaskIP2 ContentType&#8221;</span></p>
<p><span style="color:#606060;">5:</span> <span style="color:#ff0000;">Description</span><span style="color:#0000ff;">=&#8221;OHCHR ContenType associates to the task Workflow&#8221;</span></p>
<p><span style="color:#606060;">6:</span> <span style="color:#ff0000;">Group</span><span style="color:#0000ff;">=&#8221;_Hidden&#8221;</span></p>
<p><span style="color:#606060;">7:</span> <span style="color:#ff0000;">Hidden</span><span style="color:#0000ff;">=&#8221;TRUE&#8221;</span></p>
<p><span style="color:#606060;">8:</span> <span style="color:#ff0000;">Version</span><span style="color:#0000ff;">=&#8221;0&#8243;</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">9:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">FieldRefs</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">10:</span> <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">FieldRefs</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">11:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">XmlDocuments</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">12:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">XmlDocument</span> <span style="color:#ff0000;">NamespaceURI</span><span style="color:#0000ff;">=&#8221;http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url&#8221;</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">13:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">FormUrls</span> <span style="color:#ff0000;">xmlns</span><span style="color:#0000ff;">=&#8221;http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url&#8221;</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">14:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">Display</span><span style="color:#0000ff;">&gt;</span>_layouts/WrkTaskIP2.aspx<span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">Display</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">15:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">Edit</span><span style="color:#0000ff;">&gt;</span>_layouts/WrkTaskIP2.aspx<span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">Edit</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">16:</span> <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">FormUrls</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">17:</span> <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">XmlDocument</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">18:</span> <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">XmlDocuments</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">19:</span> <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">ContentType</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">20:</span> <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">Elements</span><span style="color:#0000ff;">&gt;</span></p>
</div>
<p>Update the workflow configuration file by updating the &#8220;TaskListContentTypeId&#8221; id.</p>
<div style="border-right:gray 1px solid;border-top:gray 1px solid;font-size:8pt;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;margin:20px 0 10px;padding:4px;">
<div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;border-style:none;padding:0;"><span style="color:#606060;">1:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">Workflow</span></div>
<p><span style="color:#606060;">2:</span> <span style="color:#ff0000;">Name</span><span style="color:#0000ff;">=&#8221;WorkflowFeature&#8221;</span></p>
<p><span style="color:#606060;">3:</span> <span style="color:#ff0000;">Description</span><span style="color:#0000ff;">=&#8221;"</span></p>
<p><span style="color:#606060;">4:</span> <span style="color:#ff0000;">Id</span><span style="color:#0000ff;">=&#8221;71b980d7-69d8-4f86-8702-d472e9b00660&#8243;</span></p>
<p><span style="color:#606060;">5:</span> <span style="color:#ff0000;">CodeBesideClass</span><span style="color:#0000ff;">=&#8221;[Your class]&#8220;</span></p>
<p><span style="color:#606060;">6:</span> <span style="color:#ff0000;">CodeBesideAssembly</span><span style="color:#0000ff;">=&#8221;[Your assembly], Version=1.0.0.0, Culture=neutral, PublicKeyToken=68985c29fbcd9e0e&#8221;</span></p>
<p><span style="color:#606060;">7:</span> <span style="color:#ff0000;">TaskListContentTypeId</span><span style="color:#0000ff;">=&#8221;0x01080100C9C9515DE4E24001905074F980F93151&#8243;</span></p>
<p><span style="color:#606060;">8:</span> <span style="color:#ff0000;">AssociationUrl</span><span style="color:#0000ff;">=&#8221;_layouts/CstWrkflIP.aspx&#8221;</span></p>
<p><span style="color:#606060;">9:</span> <span style="color:#ff0000;">InstantiationUrl</span><span style="color:#0000ff;">=&#8221;_layouts/IniWrkflIP.aspx&#8221;</span></p>
<p><span style="color:#606060;">10:</span> <span style="color:#ff0000;">ModificationUrl</span><span style="color:#0000ff;">=&#8221;_layouts/ModWrkflIP.aspx&#8221;</span></p>
<p><span style="color:#606060;">11:</span> <span style="color:#ff0000;">StatusUrl</span><span style="color:#0000ff;">=&#8221;_layouts/WrkStat.aspx&#8221;</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">12:</span></p>
<p><span style="color:#606060;">13:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">Categories</span><span style="color:#0000ff;">/&gt;</span></p>
<p><span style="color:#606060;">14:</span> <span style="color:#008000;">&lt;!&#8211; Tags to specify InfoPath forms for the workflow; delete tags for forms that you do not have &#8211;&gt;</span></p>
<p><span style="color:#606060;">15:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">MetaData</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">16:</span> <span style="color:#008000;">&lt;!&#8211; &lt;Association_FormURN&gt;associationFormURN&lt;/Association_FormURN&gt;</span></p>
<p><span style="color:#606060;">17:</span> <span style="color:#008000;">&lt;Instantiation_FormURN&gt;instantiationFormURN&lt;/Instantiation_FormURN&gt;</span></p>
<p><span style="color:#606060;">18:</span> <span style="color:#008000;">&lt;Task0_FormURN&gt;taskFormURN&lt;/Task0_FormURN&gt; </span></p>
<p><span style="color:#606060;">19:</span></p>
<p><span style="color:#606060;">20:</span> <span style="color:#008000;">&lt;Modification_GUID_FormURN&gt;modificationURN&lt;/Modification_GUID_FormURN&gt;</span></p>
<p><span style="color:#606060;">21:</span> <span style="color:#008000;">&lt;Modification_GUID_Name&gt;Name of Modification&lt;/Modification_GUID_Name&gt;</span></p>
<p><span style="color:#606060;">22:</span> <span style="color:#008000;">&#8211;&gt;</span></p>
<p><span style="color:#606060;">23:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">AssociateOnActivation</span><span style="color:#0000ff;">&gt;</span>false<span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">AssociateOnActivation</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">24:</span> <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">MetaData</span><span style="color:#0000ff;">&gt;</span></p>
<p><span style="color:#606060;">25:</span> <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">Workflow</span><span style="color:#0000ff;">&gt;</span></p>
</div>
<p><strong><span style="text-decoration:underline;">Step 5</span></strong></p>
<p>The last step is to encapsulate these modifications using a solution (wsp file) that will:</p>
<ul>
<li>Deploy your CententType feature
<li>Deploy your Workflow feature
<li>Copy the assembly to the GAC
<li>Copy the updated layout page </li>
</ul>
<p>And that&#8217;s done !!!</p>
<p>To conclude on this post, when you need to develop something on SharePoint:</p>
<ul>
<li>looked at the existing SharePoint code
<li>use and reuse Reflector </li>
</ul>
<p><strong><span style="text-decoration:underline;">Update: 05/03/2008</span></strong></p>
<p>You can find below a link to the feature (part of the complete feature).</p>
<p><a href="http://cid-da4214b0e3b15058.skydrive.live.com/self.aspx/SharePoint%20Work/DemoFeature.zip" target="_blank">DemoFeature</a></p>
<p>&nbsp;</p>
<p>Hope that it&#8217;s not so bad for a first post <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ntorrent.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ntorrent.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ntorrent.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ntorrent.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ntorrent.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ntorrent.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ntorrent.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ntorrent.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ntorrent.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ntorrent.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ntorrent.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ntorrent.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ntorrent.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ntorrent.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ntorrent.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ntorrent.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ntorrent.wordpress.com&amp;blog=3486788&amp;post=14&amp;subd=ntorrent&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ntorrent.wordpress.com/2008/04/15/moss-2007-workflow-infopath-form-associated/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/390dda86b35831df95bd5113a5da8c20?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ntorrent</media:title>
		</media:content>

		<media:content url="http://ntorrent.files.wordpress.com/2008/04/image11-thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ntorrent.files.wordpress.com/2008/04/image15-thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ntorrent.files.wordpress.com/2008/04/image-thumb7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ntorrent.files.wordpress.com/2008/04/image-thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ntorrent.files.wordpress.com/2008/04/image25-thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ntorrent.files.wordpress.com/2008/04/image30-thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ntorrent.files.wordpress.com/2008/04/image35-thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>
