<?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/"
	>

<channel>
	<title>Edwin Vriethoff &#187; Tools</title>
	<atom:link href="http://edwin.vriethoff.net/category/tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://edwin.vriethoff.net</link>
	<description>Edwin Vriethoff</description>
	<lastBuildDate>Fri, 04 Jun 2010 06:16:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Unleash extra power to SharePoint 2007 Workflows</title>
		<link>http://edwin.vriethoff.net/2010/04/04/unleash-extra-power-to-sharepoint-2007-workflows/</link>
		<comments>http://edwin.vriethoff.net/2010/04/04/unleash-extra-power-to-sharepoint-2007-workflows/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 12:06:25 +0000</pubDate>
		<dc:creator>Edwin Vriethoff</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[action]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[sharepoint designer]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[webservice]]></category>
		<category><![CDATA[workflow]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xpath]]></category>

		<guid isPermaLink="false">http://edwin.vriethoff.net/?p=384</guid>
		<description><![CDATA[I&#8217;m very enthusiastic about the Nintex Workflow product. With Nintex Workflow it is possible to build very advanced workflows. The downside of course, is that that Nintex is a 3rd party product and therefore it isn&#8217;t available in all my projects. In that case I will have to rely on the normal SharePoint Designer Workflows.
The [...]]]></description>
			<content:encoded><![CDATA[<p><img title="unleash_power_to_sharepoint_workflows" src="http://edwin.vriethoff.net/wp-content/unleash_power_to_sharepoint_workflows.png" alt="unleash_power_to_sharepoint_workflows" width="140" height="105" align="right" />I&#8217;m very enthusiastic about the Nintex Workflow product. With Nintex Workflow it is possible to build very advanced workflows. The downside of course, is that that Nintex is a 3rd party product and therefore it isn&#8217;t available in all my projects. In that case I will have to rely on the normal SharePoint Designer Workflows.</p>
<p>The problem with normal workflow actions is that they are designed to work inside a single web. It is not possible, for example, to create a new list item in a different web. Creating list items in different webs is a very powerful feature, because it allows us to interact with different site areas and we might also want to initiate new workflows over there.</p>
<p>To overcome the short come of these standard workflow actions, we can use the SharePoint web services. But there is one major problem: SharePoint Designer Workflows don&#8217;t have a workflow action that allows you to call SharePoint web services.</p>
<p>Luckily I found a project at CodePlex which allows us to do just that. The <a href="http://ilovesharepoint.codeplex.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/ilovesharepoint.codeplex.com');" target="_blank">iLoveSharePoint</a> project contains a subproject with the name SharePoint Designer Actions V1.0. Download this expansion for SharePoint Designer and install it at your SharePoint farm.</p>
<p>Below I will provide a few demonstration steps that will use the following new SharePoint Designer Actions from <a href="http://ilovesharepoint.codeplex.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/ilovesharepoint.codeplex.com');" target="_blank">iLoveSharePoint</a>:</p>
<ul>
<li>Call a WebService</li>
<li>Query XML</li>
</ul>
<p>The “Call a WebService” action will allow us to communicate with the Microsoft SharePoint web services and provides us with an almost unlimited range of extra development possibilities. The small downside is that these actions are advanced and that it takes some time to configure them.</p>
<p><strong><span id="more-384"></span>Step 1: Create the required sites and lists</strong><br />
For this demo we have to prepare the SharePoint environment with 2 blank sites.</p>
<p>Create a site which will function as the parent site. Give it the name &#8220;Demo&#8221; and create a standard list with the name &#8220;SourceList&#8221;.</p>
<p>Continue with the creation of a second site. This site should be a sub site of the demo site. Give it the name &#8220;Sub Site&#8221;.  Add a new standard list with the name &#8220;TargetList&#8221; and also add an extra column with the name &#8220;Information&#8221;.</p>
<p>In my demo the urls are</p>
<ul>
<li>http://moss2007dev/Demo</li>
<li>http://moss2007dev/Demo/SubSite</li>
</ul>
<p><a href="http://edwin.vriethoff.net/wp-content/1_sites_and_lists.png"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="1_sites_and_lists" src="http://edwin.vriethoff.net/wp-content/1_sites_and_lists_thumb.png" border="0" alt="1_sites_and_lists" width="240" height="235" /></a></p>
<p><strong>Step 2: Use SharePoint Designer to create a new workflow </strong></p>
<p>Start SharePoint Designer and open the Demo site we just created.</p>
<p>From the file menu choose to create a new workflow.</p>
<p>Name our workflow &#8220;WebServiceDemo&#8221; and attach it to the &#8220;SourceList&#8221;.</p>
<p>Choose to start the workflow manually and when a new item is created.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/2_define_new_workflow.png"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="2_define_new_workflow" src="http://edwin.vriethoff.net/wp-content/2_define_new_workflow_thumb.png" border="0" alt="2_define_new_workflow" width="240" height="249" /></a></p>
<p><strong>Step 3: Create the first step</strong></p>
<p>We will now add our first step. During this first step we will call the lists.asmx web service and create a new item in the Sub site &#8220;TargetList&#8221; list.</p>
<p>Give a name to the first step like &#8220;Create an item in the Sub Site target list.&#8221;</p>
<p>SharePoint designer won’t be able to create an item in the &#8220;TargetList&#8221; because it is not located in the Demo site. To work around this issue we will use the SharePoint Web services.</p>
<p>Add a new action to the first step and search for the &#8220;Call a Web Service&#8221; action. This action should be available if you installed the <a href="http://ilovesharepoint.codeplex.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/ilovesharepoint.codeplex.com');" target="_blank">iLoveSharePoint</a> SharePoint Designer actions.</p>
<p>The &#8220;Call a Web Service&#8221; action accepts a few parameters:</p>
<ul>
<li><strong>Address</strong> &#8211; Url to the web services</li>
<li><strong>SOAP Version</strong> &#8211; Soap version to use</li>
<li><strong>SOAP Action</strong> &#8211; Redundant in our case</li>
<li><strong>Envelope</strong> &#8211; The XML message we&#8217;ll send to the web service</li>
<li><strong>Response</strong> &#8211; The XML message returned from the web service</li>
<li><strong>User</strong> – Username</li>
<li><strong>Password</strong> &#8211; Password for the specified user</li>
</ul>
<p>In all our web service calls we will not specify the SOAP Action and the User/Password combination. Without any provided credentials the web service will be executed using the service account.</p>
<p>I do also always specify the SOAP Version as 1.2.</p>
<p>Now let&#8217;s provide the parameters with some data:</p>
<p><strong>Address</strong><br />
http://moss2007dev/Demo/SubSite/_vti_bin/lists.asmx</p>
<p><strong>SOAP Version<br />
</strong>Soap 1.2</p>
<p><strong>Envelope<br />
</strong></p>
<div class="code">&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br />
&lt;soap12:Envelope xmlns:xsi=&#8221;http://www.w3.org/2001/XMLSchema-instance&#8221; xmlns:xsd=&#8221;http://www.w3.org/2001/XMLSchema&#8221; xmlns:soap12=&#8221;http://www.w3.org/2003/05/soap-envelope&#8221;&gt;<br />
&lt;soap12:Body&gt;<br />
&lt;UpdateListItems xmlns=&#8221;http://schemas.microsoft.com/sharepoint/soap/&#8221;&gt;<br />
&lt;listName&gt;TargetList&lt;/listName&gt;<br />
&lt;updates&gt;<br />
&lt;Batch&gt;<br />
&lt;Method ID=&#8221;1&#8243; Cmd=&#8221;New&#8221;&gt;<br />
&lt;Field Name=&#8221;ID&#8221;&gt;New&lt;/Field&gt;<br />
&lt;Field Name=&#8221;Title&#8221;&gt;Item created by Demo site&lt;/Field&gt;<br />
&lt;Field Name=&#8221;Information&#8221;&gt;[%SourceList:Title%]&lt;/Field&gt;<br />
&lt;/Method&gt;<br />
&lt;/Batch&gt;<br />
&lt;/updates&gt;<br />
&lt;/UpdateListItems&gt;<br />
&lt;/soap12:Body&gt;<br />
&lt;/soap12:Envelope&gt;</div>
<p><strong>Response</strong><br />
Store the response in a string variable called &#8220;WorkflowResponse&#8221;.</p>
<p>We have now completed the first step in our workflow and we should be able to create a list item in the &#8220;Sub Site&#8221; by adding a new item in the &#8220;SourceList&#8221; list located at the Demo site.</p>
<p>Save and publish the workflow.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/3_first_step_call_webservice.png"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="3_first_step_call_webservice" src="http://edwin.vriethoff.net/wp-content/3_first_step_call_webservice_thumb.png" border="0" alt="3_first_step_call_webservice" width="240" height="249" /></a></p>
<p><strong>Step 4: Check and run the workflow. </strong></p>
<p>Navigate to the Demo site and open the &#8220;SourceList&#8221; list. Create a new item and provide the value &#8220;Hello World&#8221; as Title, because every demo should include a &#8220;Hello World&#8221; example, right?</p>
<p>If everything works correctly the &#8220;SourceList&#8221; list should show a &#8220;WebServiceDemo&#8221; column with the value &#8220;Completed&#8221;.</p>
<p>Navigate to our &#8220;Sub Site&#8221; en open the &#8220;TargetList&#8221; list. Our new list item should be shown here!</p>
<p><a href="http://edwin.vriethoff.net/wp-content/4_item_created_by_webservices.png"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="4_item_created_by_webservices" src="http://edwin.vriethoff.net/wp-content/4_item_created_by_webservices_thumb.png" border="0" alt="4_item_created_by_webservices" width="240" height="191" /></a></p>
<p><strong>Step 5: Create a demo workflow in the &#8220;Sub Site&#8221; site </strong></p>
<p>An interesting scenario would be that we trigger a new workflow when an item is created in the &#8220;TargetList&#8221; list. To demonstrate this open the &#8220;Sub site&#8221; site in SharePoint designer and create a new workflow on the &#8220;TargetList&#8221; list.</p>
<p>Name the workflow &#8220;UpdateTitleField&#8221; and attach it to the &#8220;TargetList&#8221; list.</p>
<p>Choose to start the workflow manually and when a new item is created.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/5_new_workflow_update_title.png"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="5_new_workflow_update_title" src="http://edwin.vriethoff.net/wp-content/5_new_workflow_update_title_thumb.png" border="0" alt="5_new_workflow_update_title" width="240" height="249" /></a></p>
<p><strong>Step 6: Configure the first step to update the Title field </strong></p>
<p>Give a name to the first step like &#8220;Update the title field&#8221;.</p>
<p>Add a new action to the step and search for the &#8220;Set Field in Current Item&#8221; action.</p>
<p>Configure the action to update the &#8220;Title&#8221; field and set the value to &#8220;Updated by Workflow&#8221;.</p>
<p>Save the new workflow.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/6_update_the_title_field.png"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="6_update_the_title_field" src="http://edwin.vriethoff.net/wp-content/6_update_the_title_field_thumb.png" border="0" alt="6_update_the_title_field" width="240" height="249" /></a></p>
<p><strong>Step 7: Test the &#8220;UpdateTitleField&#8221; workflow </strong></p>
<p>Navigate to the &#8220;TargetList&#8221; list and open the item menu of our first created item.</p>
<p>Choose the option &#8220;Workflows&#8221;.</p>
<p>You will now see a screen with all available workflows. Click the &#8220;UpdateTitleField&#8221; workflow and start the workflow.</p>
<p>The workflow should complete and update the title field of the item.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/7_completed_update_title_workflow.png"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="7_completed_update_title_workflow" src="http://edwin.vriethoff.net/wp-content/7_completed_update_title_workflow_thumb.png" border="0" alt="7_completed_update_title_workflow" width="240" height="97" /></a></p>
<p><strong>Step 8: Test the complete flow </strong></p>
<p>We have now completed our flow:</p>
<ol>
<li>An item is manually created in the &#8220;SourceList&#8221; list</li>
<li>The &#8220;WebServiceDemo&#8221; workflow is triggered</li>
<li>An information list item is created via the web service call in the &#8220;TargetList&#8221; list</li>
<li>The &#8220;UpdateTitleField&#8221; workflow should be triggered</li>
<li>The title of the list item is updated</li>
</ol>
<p>So let&#8217;s start by creating the manual item at the Demo site. Now quickly navigate to the &#8220;Sub site&#8221; to see the result. But you’ll probably see that step 4 of our flow didn&#8217;t trigger! It didn&#8217;t work as it should.</p>
<p>If it did work correctly you are in luck because your AppPool identity was differently configured. In most cases the service account is not allowed to auto start workflows.</p>
<p>This behavior is explained by Microsoft in <a href="http://support.microsoft.com/kb/947284/en-us" onclick="javascript:pageTracker._trackPageview('/outbound/article/support.microsoft.com');" target="_blank">KB947284</a>:</p>
<p>&#8220;This behavior occurs because a security fix in Windows SharePoint Services 3.0 SP1 prevents declarative workflows from starting automatically under the system account.&#8221;</p>
<p><a href="http://edwin.vriethoff.net/wp-content/8_workflow_is_not_triggered.png"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="8_workflow_is_not_triggered" src="http://edwin.vriethoff.net/wp-content/8_workflow_is_not_triggered_thumb.png" border="0" alt="8_workflow_is_not_triggered" width="240" height="192" /></a></p>
<p><strong>Step 9: Collect the item url of the newly created item </strong></p>
<p>To overcome the auto start problem we can trigger the workflow with a web service call.</p>
<p>For this call we need the path of the new item and the templateID of the workflow. In this demo we will retrieve the templateID in the workflow, but once you know the templateId you can of course hardcode it in your web service call to minimize the system load.</p>
<p>Create a new step in the &#8220;WebServiceDemo&#8221; workflow and name it &#8220;Collect WF parameters&#8221;.</p>
<p>Add a new action. This time we will use the <a href="http://ilovesharepoint.codeplex.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/ilovesharepoint.codeplex.com');" target="_blank">iLoveSharepoint</a> &#8220;Query XML&#8221; action.</p>
<p>The &#8220;Query XML&#8221; action accepts 3 parameters:</p>
<ul>
<li><strong>XML Input</strong> &#8211; the XML to be processed</li>
<li><strong>XPath</strong> &#8211; The XPath query to run</li>
<li><strong>Result</strong> &#8211; The variable in which the result will be stored</li>
</ul>
<p>Let&#8217;s provide the parameters with some data:</p>
<p><strong>XML Input<br />
</strong>Variable: WorkflowResponse</p>
<p><strong>XPath</strong><br />
//@ows_EncodedAbsUrl</p>
<p><strong>Result<br />
</strong>Create a new string variable with the name &#8220;ItemUrl&#8221;</p>
<p>To be able to analyze any result, add a second action of the type &#8220;Log to History List&#8221;. This action will write given information into the workflow history list. Configure the action to log the variable &#8220;ItemUrl&#8221;.</p>
<p>Save the workflow with our latest changes.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/9_collect_item_url.png"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="9_collect_item_url" src="http://edwin.vriethoff.net/wp-content/9_collect_item_url_thumb.png" border="0" alt="9_collect_item_url" width="240" height="249" /></a></p>
<p><strong>Step 10: Run the workflow and see if the new item url is collected </strong></p>
<p>We will now check if the item url is logged in workflow history.</p>
<p>Navigate to the &#8220;SourceList&#8221; list and create a new item.</p>
<p>After submit wait until the workflow &#8220;WebServiceDemo&#8221; is completed and then click the completed link.</p>
<p>You will find the workflow history on this page and you should see the url of the new item.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/10_wf_history_listitem_url.png"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="10_wf_history_listitem_url" src="http://edwin.vriethoff.net/wp-content/10_wf_history_listitem_url_thumb.png" border="0" alt="10_wf_history_listitem_url" width="240" height="53" /></a></p>
<p><strong>Step 11: Collect the TemplateID of the workflow </strong></p>
<p>To retrieve the TemplateID of a workflow we can use workflow.asmx web service.</p>
<p>Open the “WebServiceDemo” again in SharePoint designer and load the &#8220;Collect WF parameters&#8221; step.</p>
<p>Add a new &#8220;Call a Web Service&#8221; action and provide the following parameters:</p>
<p><strong>Address</strong><br />
http://moss2007dev/Demo/SubSite/_vti_bin/workflow.asmx</p>
<p><strong>SOAP Version</strong><br />
Soap 1.2</p>
<p><strong>Envelope<br />
</strong></p>
<div class="code">&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br />
&lt;soap12:Envelope xmlns:xsi=&#8221;http://www.w3.org/2001/XMLSchema-instance&#8221; xmlns:xsd=&#8221;http://www.w3.org/2001/XMLSchema&#8221; xmlns:soap12=&#8221;http://www.w3.org/2003/05/soap-envelope&#8221;&gt;<br />
&lt;soap12:Body&gt;<br />
&lt;GetTemplatesForItem xmlns=&#8221;http://schemas.microsoft.com/sharepoint/soap/workflow/&#8221;&gt;<br />
&lt;item&gt;[%Variable: ItemUrl%]&lt;/item&gt;<br />
&lt;/GetTemplatesForItem&gt;<br />
&lt;/soap12:Body&gt;<br />
&lt;/soap12:Envelope&gt;</div>
<p><strong>Response</strong><br />
Store the response in the existing variable called &#8220;WorkflowResponse&#8221;.</p>
<p>To query the Workflow Template Id add a new &#8220;Query XML&#8221; action and use the following parameters:</p>
<p><strong>XML Input</strong><br />
Variable: WorkflowResponse</p>
<p><strong>XPath</strong><br />
//@TemplateId[1]</p>
<p><strong>Result</strong><br />
Create a new string variable with the name &#8220;WFTemplateID&#8221;.</p>
<p>Note that the workflow result is returning namespaces. Because of the namespaces it is quite difficult to do a full XPath query. The //@TemplateId XPath works but when you have more as 1 workflow on the list, play with the [index] option to find the correct templateID.</p>
<p>Finish the &#8220;Collect WF parameters&#8221; step by logging the &#8220;WFTemplateID&#8221; into the history list.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/11_wf_collect_template_id.png"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="11_wf_collect_template_id" src="http://edwin.vriethoff.net/wp-content/11_wf_collect_template_id_thumb.png" border="0" alt="11_wf_collect_template_id" width="240" height="249" /></a></p>
<p><strong>Step 12: Check the workflow history for the Workflow Template ID </strong></p>
<p>We will now check if the workflow TemplateID is logged in workflow history.</p>
<p>Navigate to the &#8220;SourceList&#8221; list and create a new item.</p>
<p>After submit wait until the workflow &#8220;WebServiceDemo&#8221; is completed and then click the completed link.</p>
<p>You will find the workflow history on this page and you should see the ID of the Workflow Template ID.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/12_WF_history_logged_WFtemplateID.png"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="12_WF_history_logged_WFtemplateID" src="http://edwin.vriethoff.net/wp-content/12_WF_history_logged_WFtemplateID_thumb.png" border="0" alt="12_WF_history_logged_WFtemplateID" width="240" height="53" /></a></p>
<p><strong>Step 13: Start the &#8220;UpdateTitleField&#8221; workflow via a web service call</strong></p>
<p>We now have all the information required to start the &#8220;UpdateTitleField&#8221; workflow on the automatically created items.</p>
<p>Open the &#8220;WebServiceDemo&#8221; workflow again in SharePoint designer and add a third step with the name &#8220;Start UpdateTitleField workflow&#8221;.</p>
<p>We only need to add a single workflow action here of the type &#8220;Call a Web Service&#8221;.</p>
<p>We configure the parameters to use the “StartWorkflow” action of the workflows.asmx web service:</p>
<p><strong>Address</strong><br />
http://moss2007dev/Demo/SubSite/_vti_bin/workflow.asmx</p>
<p><strong>SOAP Version</strong><br />
Soap 1.2</p>
<p><strong>Envelope</strong></p>
<div class="code">&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br />
&lt;soap12:Envelope xmlns:xsi=&#8221;http://www.w3.org/2001/XMLSchema-instance&#8221; xmlns:xsd=&#8221;http://www.w3.org/2001/XMLSchema&#8221; xmlns:soap12=&#8221;http://www.w3.org/2003/05/soap-envelope&#8221;&gt;<br />
&lt;soap12:Body&gt;<br />
&lt;StartWorkflow xmlns=&#8221;http://schemas.microsoft.com/sharepoint/soap/workflow/&#8221;&gt;<br />
&lt;item&gt;[%Variable: ItemUrl%]&lt;/item&gt;<br />
&lt;templateId&gt;[%Variable: WFTemplateID%]&lt;/templateId&gt;<br />
&lt;workflowParameters&gt;&lt;Data /&gt;&lt;/workflowParameters&gt;<br />
&lt;/StartWorkflow&gt;<br />
&lt;/soap12:Body&gt;<br />
&lt;/soap12:Envelope&gt;</div>
<p>Save the workflow when you are finished configuring the action.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/13_start_workflow_webservice_call.png"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="13_start_workflow_webservice_call" src="http://edwin.vriethoff.net/wp-content/13_start_workflow_webservice_call_thumb.png" border="0" alt="13_start_workflow_webservice_call" width="240" height="249" /></a></p>
<p><strong>Step 14: Run the final test</strong></p>
<p>We should now have really completed our flow.</p>
<ol>
<li>An list item is manually created in the &#8220;SourceList&#8221; list</li>
<li>The &#8220;WebServiceDemo&#8221; workflow is triggered</li>
<li>An information list item is created via the web service call in the &#8220;TargetList&#8221; list</li>
<li>The &#8220;UpdateTitleField&#8221; workflow should be triggered</li>
<li>The title of the list item is updated</li>
</ol>
<p>So let&#8217;s try it again. Navigate to the &#8220;SourceList&#8221; list and create a new item. Check if the &#8220;UpdateTitleField&#8221; workflow completes successfully and then navigate to the &#8220;Sub site&#8221; and the &#8220;TargetList&#8221; list to check the result.</p>
<p>If the configuration was successful you will now see that all the steps in our flow completed successfully!</p>
<p><a href="http://edwin.vriethoff.net/wp-content/14_complete_finished_workflows.png"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="14_complete_finished_workflows" src="http://edwin.vriethoff.net/wp-content/14_complete_finished_workflows_thumb.png" border="0" alt="14_complete_finished_workflows" width="240" height="211" /></a></p>
<p>This demonstration showed you how to</p>
<ul>
<li>Call web services from SharePoint designer</li>
<li>Extract xml values from the web service responses</li>
<li>Trigger a workflow via a web service call</li>
</ul>
<p>Thanks to the <a href="http://ilovesharepoint.codeplex.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/ilovesharepoint.codeplex.com');" target="_blank">iLoveSharePoint</a> SharePoint Designer Actions you have a lot of new workflow possibilities. Enjoy and be creative!</p>
]]></content:encoded>
			<wfw:commentRss>http://edwin.vriethoff.net/2010/04/04/unleash-extra-power-to-sharepoint-2007-workflows/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Audience compilation via the command line</title>
		<link>http://edwin.vriethoff.net/2009/05/13/audience-compilation-via-the-command-line/</link>
		<comments>http://edwin.vriethoff.net/2009/05/13/audience-compilation-via-the-command-line/#comments</comments>
		<pubDate>Wed, 13 May 2009 08:58:38 +0000</pubDate>
		<dc:creator>Edwin Vriethoff</dc:creator>
				<category><![CDATA[Errors]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[audience]]></category>
		<category><![CDATA[commandline]]></category>
		<category><![CDATA[compilation]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[guid]]></category>
		<category><![CDATA[job]]></category>
		<category><![CDATA[problem]]></category>

		<guid isPermaLink="false">http://edwin.vriethoff.net/?p=225</guid>
		<description><![CDATA[Last month I had to work a lot with audiences and of course my development environment had an annoying malfunction. The manage audience page (/_layouts/Audience_Main.aspx) contains a nice compilation link, but it didn&#8217;t work.
The only other option on the page is to schedule the compilation, but it can only be scheduled to run once a [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://edwin.vriethoff.net/wp-content/audience_compilation.jpg" alt="Audience compilation via the command line" title="Audience compilation via the command line" width="160" height="119" align="right" style="border: 1px solid #BAB9BF; margin-left: 5px;" />Last month I had to work a lot with audiences and of course my development environment had an annoying malfunction. The manage audience page (/_layouts/Audience_Main.aspx) contains a nice compilation link, but it didn&#8217;t work.</p>
<p>The only other option on the page is to schedule the compilation, but it can only be scheduled to run once a day. Not very useful during development.</p>
<p>After some digging I found the command line application to control the audience job and luckily it wasn&#8217;t very complicated to use. Just run the application to get some more information:</p>
<div class="code">
c:\Program Files\Microsoft Office Servers\12.0\Bin>audiencejob.exe<br />
AudienceJob.exe <Application Id> <Command> [Crawl Type] [Audience Name]<br />
        Application Id: Guid corresponding to Search application<br />
        Command: 1 = Start, 0 = Stop<br />
        Crawl Type: 1 = Full, 0 = Incremental (default = 1)<br />
        Audience Name: Specific audience to compile (default = all)</p>
<p>Application Id for SharedServicesProvider1: 23ec9668-ea04-4842-b9ba-8e39cfaeaa3d
</p></div>
<p>The best of it is that the application provides you the GUIDs of available Shared Service providers.</p>
<p>To start a new compilation from scratch for all the audiences, run the command with the given GUID and the two other parameters:</p>
<div class="code">
c:\Program Files\Microsoft Office Servers\12.0\Bin>audiencejob.exe 23ec9668-ea04-4842-b9ba-8e39cfaeaa3d 1 1
</div>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://edwin.vriethoff.net/2009/05/13/audience-compilation-via-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MigrateSPUsers: Sharepoint 2003 user account migration tool</title>
		<link>http://edwin.vriethoff.net/2008/01/30/migratespusers-sharepoint-2003-useraccount-migration-tool/</link>
		<comments>http://edwin.vriethoff.net/2008/01/30/migratespusers-sharepoint-2003-useraccount-migration-tool/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 08:10:04 +0000</pubDate>
		<dc:creator>Edwin Vriethoff</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[domain server]]></category>
		<category><![CDATA[migrate]]></category>
		<category><![CDATA[object model]]></category>
		<category><![CDATA[portal server]]></category>
		<category><![CDATA[sharepoint server]]></category>
		<category><![CDATA[users]]></category>

		<guid isPermaLink="false">http://edwin.vriethoff.net/2008/01/30/migratespusers-sharepoint-2003-useraccount-migration-tool/</guid>
		<description><![CDATA[At my current Sharepoint 2003 to 2007 migration project, we have to migrate Sharepoint 2003 users to a different domain server. On my world wide web search I bumped into an utility called &#8220;SPUserUtil&#8221; that was part of the &#8220;SharePoint Utility Suite&#8221;, but unfortunately the author decided to take the project offline and it is [...]]]></description>
			<content:encoded><![CDATA[<p>At my current Sharepoint 2003 to 2007 migration project, we have to migrate Sharepoint 2003 users to a different domain server. On my world wide web search I bumped into an utility called &#8220;<a href="http://blog.krichie.com/2007/02/02/just-because-the-sharepoint-utility-suite-is-dead-doesnt-mean-i-am-nor-those-needs-are/" onclick="javascript:pageTracker._trackPageview('/outbound/article/blog.krichie.com');" target="_blank">SPUserUtil</a>&#8221; that was part of the &#8220;SharePoint Utility Suite&#8221;, but unfortunately the author decided to take the project offline and it is no longer available.</p>
<p><a href="http://blogs.msdn.com/alexander_windel/archive/2006/03/23/559317.aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/blogs.msdn.com');" target="_blank">This blog post</a> from Alexander Windel provided enough information about the process of migrating Sharepoint users. For WSS sites you can use the &#8220;stsadm -o migrateuser&#8221; command, but this is not enough for a Sharepoint 2003 Portal Server. The problem is that you&#8217;ll also need to use code to call the function PortalAccountMigrationManager.MigrateAccount() in the object model. </p>
<p>Last evening I created a small Sharepoint user migration utility, to make our life a bit easier. It will run both commands for you and it will allow you to migrate a larger batch of Sharepoint users at once. </p>
<p><span id="more-106"></span><br />
<strong>Step 1)</strong><br />
Scan for users in your site collection to create the basic user xml file:<br />
<font style="color:green;">MigrateSPUsers.exe -detectusers http://mysitecollection -userfile users.xml</font></p>
<p><strong>Step 2)</strong><br />
Edit the user xml file. Remove users that should not be migrated or add missing users. Change the &#8220;NewLogin&#8221; nodes to include the new account information.</p>
<p><img src='http://edwin.vriethoff.net/wp-content/migrate_users_xml.png' alt='Migrate sharepoint users xml file' /></p>
<p><strong>Step 3)</strong><br />
Start the Sharepoint user migration by providing the tool the following parameters<br />
<font style="color:green;">MigrateSPUsers.exe -migrateusers -userfile users.xml</font><br />
or for a Sharepoint Portal Server use<br />
<font style="color:green;">MigrateSPUsers.exe -migrateusers -userfile users.xml -portal -ignoresidhistory</font></p>
<p><strong>Step 4)</strong><br />
Done! Check your Sharepoint site to see if all your users are correctly migrated.</p>
<p>Please note that you have to run this application at the Sharepoint server with enough user rights. The server should also contain the .Net2 runtimes. This utility is for use with Sharepoint 2003 only and it is for use on your own risk.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/migratespusersv10.zip" onclick="javascript:pageTracker._trackPageview('/downloadsedwin./wp-content/migratespusersv10.zip');" title='MigrateSPUsers version 1.0'>Click here to download MigrateSPUsers v1.0</a></p>
]]></content:encoded>
			<wfw:commentRss>http://edwin.vriethoff.net/2008/01/30/migratespusers-sharepoint-2003-useraccount-migration-tool/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

