<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Pure XOML workflows and a custom root activity</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2007/11/26/pure-xoml-workflows-and-a-custom-root-activity.aspx</link><description>Last week during my Workflow Foundation presentation I was asked a question about using a custom root activity with pure XOML workflows. This is always a bit of a drag to get working, especially because you need to do two things, one for the designer</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>re: Pure XOML workflows and a custom root activity</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2007/11/26/pure-xoml-workflows-and-a-custom-root-activity.aspx#1692957</link><pubDate>Fri, 22 May 2009 18:26:33 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1692957</guid><dc:creator>Erdnando</dc:creator><description>&lt;p&gt;Hi. &amp;nbsp;one question, &amp;nbsp;what &amp;nbsp;about the execute_code of an activity?, &lt;/p&gt;
&lt;p&gt;is possible to add its equivalent in the xoml and rules files?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1692957" width="1" height="1"&gt;</description></item><item><title>re: Pure XOML workflows and a custom root activity</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2007/11/26/pure-xoml-workflows-and-a-custom-root-activity.aspx#1682352</link><pubDate>Sat, 28 Mar 2009 10:14:13 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1682352</guid><dc:creator>Maurice</dc:creator><description>&lt;p&gt;The sample you can find here (&lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/ms741708.aspx"&gt;msdn.microsoft.com/.../ms741708.aspx&lt;/a&gt;) shows how to do so. Unfortunately rehosting the designer is quite involved so there is no real easy awnser.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1682352" width="1" height="1"&gt;</description></item><item><title>Can not resolved custom activity type</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2007/11/26/pure-xoml-workflows-and-a-custom-root-activity.aspx#1682281</link><pubDate>Sat, 28 Mar 2009 04:27:56 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1682281</guid><dc:creator>Manjula</dc:creator><description>&lt;p&gt;I&amp;#39;m developing a workflow designer and currently I can create state based and sequencial workflows with custom activities using that and save them to a SQL database as XOML. But when I tried to load previously created ( by my designer) workflow models which uses custom activities to the workflow designer, it says my custom activity type could not be resolved. Workflows without any custom activity can be load easily without any error. This error occurred in &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_designSurface.BeginLoad(wfLoader);&lt;/p&gt;
&lt;p&gt;method. I also printed all the types currently in TypeProvider of wfLoader and it had all the required activities. Can you give me some help to resolve this problem as quickly as possible? I only have two days to complete and demonstrate the project :(&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1682281" width="1" height="1"&gt;</description></item><item><title>re: Pure XOML workflows and a custom root activity</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2007/11/26/pure-xoml-workflows-and-a-custom-root-activity.aspx#1677861</link><pubDate>Fri, 13 Mar 2009 09:14:14 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1677861</guid><dc:creator>Ritu</dc:creator><description>&lt;p&gt;Thanks a lot....this solved the issue&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1677861" width="1" height="1"&gt;</description></item><item><title>re: Pure XOML workflows and a custom root activity</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2007/11/26/pure-xoml-workflows-and-a-custom-root-activity.aspx#1669866</link><pubDate>Sat, 07 Feb 2009 20:09:49 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1669866</guid><dc:creator>Saleena</dc:creator><description>&lt;p&gt;Thanks anywayz, I was able to resolve the issue. It was due to the Publictoken being null. I created a strong name and signed the assembly. and used the generated public token in the xoml file , installed the assembly into the GAC. After all this I was able to run the xoml workflow as well as monitor the it. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1669866" width="1" height="1"&gt;</description></item><item><title>re: Pure XOML workflows and a custom root activity</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2007/11/26/pure-xoml-workflows-and-a-custom-root-activity.aspx#1669859</link><pubDate>Sat, 07 Feb 2009 19:06:27 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1669859</guid><dc:creator>Saleena</dc:creator><description>&lt;p&gt;hi, Iam trying &amp;nbsp;a similar example. I am able to run the xoml workflows, but when I try to monitor them using hte Workflow Monitor, I get an exception &amp;quot;+		e	{&amp;quot;Could not load type &amp;#39;ProcessDocWorkflowLibrary.BaseWorkFlow&amp;#39; from assembly &amp;#39;ProcessDocWorkflowLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null&amp;#39;.&amp;quot;:&amp;quot;ProcessDocWorkflowLibrary.BaseWorkFlow&amp;quot;}	System.Exception {System.TypeLoadException}&lt;/p&gt;
&lt;p&gt;Can you please suggest me where I am making a mistake.&lt;/p&gt;
&lt;p&gt;The BaseWOrkflow resides in the ProcessDocWorkflowLibrary (xoml + code). The rest of the workflows derive from this base workflow and are xoml only.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1669859" width="1" height="1"&gt;</description></item><item><title>re: Pure XOML workflows and a custom root activity</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2007/11/26/pure-xoml-workflows-and-a-custom-root-activity.aspx#1655459</link><pubDate>Mon, 01 Dec 2008 06:22:37 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1655459</guid><dc:creator>splendour</dc:creator><description>&lt;p&gt;Thank you very much. I thought this problem for a long time~~~&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1655459" width="1" height="1"&gt;</description></item><item><title>re: Pure XOML workflows and a custom root activity</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2007/11/26/pure-xoml-workflows-and-a-custom-root-activity.aspx#1653341</link><pubDate>Fri, 07 Nov 2008 04:07:43 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1653341</guid><dc:creator>ryan</dc:creator><description>&lt;p&gt;I got problem for loading dll.&lt;/p&gt;
&lt;p&gt;Error: &amp;quot;CreateInstance failed for type &amp;#39;ActivitiesLibrary.BaseWorkflow&amp;#39;. Exception has been thrown by the target of an invocation. &amp;quot;&lt;/p&gt;
&lt;p&gt;my solution has two project: one is &amp;quot;consoleProject&amp;quot; which contains one No-code(pure xoml) workflow(wf.xoml) and program.cs .&lt;/p&gt;
&lt;p&gt;one is &amp;quot;ActivitiesLibrary&amp;quot; which contains one custom activity and one BaseWorkflow(custom root activity:contains the class BaseWorkflow that is derived from SequentialWorkflowActivity and is the base class we want to use for our wf.xoml. )&lt;/p&gt;
&lt;p&gt;So consoleProject needs to get .dll generated by ActivitiesLibrary. the thing is it only works when i Manually add the reference to &amp;nbsp;consoleProject. if I delete the reference and use &amp;nbsp;addAssemblyReference to get the path. it wont work.&lt;/p&gt;
&lt;p&gt;Here is the codes:&lt;/p&gt;
&lt;p&gt;the baseWorkflow classe in &amp;quot;ActivitiesLibrary&amp;quot;&lt;/p&gt;
&lt;p&gt;namespace ActivitiesLibrary&lt;/p&gt;
&lt;p&gt;{ &lt;/p&gt;
&lt;p&gt;public sealed partial class BaseWorkflow : SequentialWorkflowActivity &lt;/p&gt;
&lt;p&gt;{ &lt;/p&gt;
&lt;p&gt;// The actual code &lt;/p&gt;
&lt;p&gt;} &lt;/p&gt;
&lt;p&gt;} &lt;/p&gt;
&lt;p&gt;the xml file of wf.xoml in &amp;quot;consoleProject&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;lt;ns0:BaseWorkflow x:Name=&amp;quot;wf&amp;quot; xmlns=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://schemas.microsoft.com/winfx/2006/xaml/workflow&amp;quot;"&gt;schemas.microsoft.com/.../workflow&amp;quot;&lt;/a&gt; xmlns:x=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;"&gt;schemas.microsoft.com/.../xaml&amp;quot;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;xmlns:ns0=&amp;quot;clr-namespace:ActivitiesLibrary;Assembly=ActivitiesLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;!-- Add the remainder of the workflow here. --&amp;gt; &lt;/p&gt;
&lt;p&gt;&amp;lt;/ns0:BaseWorkflow&amp;gt;&lt;/p&gt;
&lt;p&gt;Program.cs&lt;/p&gt;
&lt;p&gt;TypeProvider typeProvider = new TypeProvider(WorkflowRuntime); &lt;/p&gt;
&lt;p&gt;typeProvider.AddAssemblyReference(@&amp;quot;F:\Activities.dll&amp;quot;); &lt;/p&gt;
&lt;p&gt;workflowRuntime.AddService(typeProvider); &lt;/p&gt;
&lt;p&gt;try &lt;/p&gt;
&lt;p&gt;{ &lt;/p&gt;
&lt;p&gt;XmlReader reader = XmlReader.Create(&amp;quot;wf.xoml&amp;quot;); &lt;/p&gt;
&lt;p&gt;WorkflowInstance instance = workflowRuntime.CreateWorkflow(reader, null, null); &lt;/p&gt;
&lt;p&gt;instance.Start(); &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1653341" width="1" height="1"&gt;</description></item><item><title>re: Pure XOML workflows and a custom root activity</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2007/11/26/pure-xoml-workflows-and-a-custom-root-activity.aspx#1652473</link><pubDate>Thu, 30 Oct 2008 08:22:53 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1652473</guid><dc:creator>fadi</dc:creator><description>&lt;p&gt;I&amp;#39;m facing the same problem but when trying to load the designer in a re-hosted designer environment, Do you have any info about that? thanks&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1652473" width="1" height="1"&gt;</description></item><item><title>Exploring Workflow Foundation Part 2: Custom Activities - Code generation during compilation &amp;laquo; Hungry for Knowledge</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2007/11/26/pure-xoml-workflows-and-a-custom-root-activity.aspx#1642233</link><pubDate>Sat, 26 Jul 2008 14:03:11 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1642233</guid><dc:creator>Exploring Workflow Foundation Part 2: Custom Activities - Code generation during compilation « Hungry for Knowledge</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Exploring Workflow Foundation Part 2: Custom Activities - Code generation during compilation &amp;laquo; Hungry for Knowledge&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1642233" width="1" height="1"&gt;</description></item><item><title>re: Pure XOML workflows and a custom root activity</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2007/11/26/pure-xoml-workflows-and-a-custom-root-activity.aspx#1638981</link><pubDate>Tue, 01 Jul 2008 10:41:46 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1638981</guid><dc:creator>fgn</dc:creator><description>&lt;p&gt;Actualy sample code will be more helpfull..&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1638981" width="1" height="1"&gt;</description></item><item><title>Pure XOML workflows and a custom root activity</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2007/11/26/pure-xoml-workflows-and-a-custom-root-activity.aspx#1478536</link><pubDate>Thu, 24 Jan 2008 15:13:22 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1478536</guid><dc:creator>Mighell's Mobile Blog</dc:creator><description>&lt;p&gt;Che un Workflow possa essere definito attraverso una sintassi xml-like, &amp;#232; ormai cosa nota. Che questa&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1478536" width="1" height="1"&gt;</description></item><item><title>Pure XOML workflows and a custom root activity</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2007/11/26/pure-xoml-workflows-and-a-custom-root-activity.aspx#1478051</link><pubDate>Thu, 24 Jan 2008 14:05:39 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1478051</guid><dc:creator>{ The Smoking Code }</dc:creator><description>&lt;p&gt;Pure XOML workflows and a custom root activity&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1478051" width="1" height="1"&gt;</description></item><item><title>re: Pure XOML workflows and a custom root activity</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2007/11/26/pure-xoml-workflows-and-a-custom-root-activity.aspx#1393492</link><pubDate>Wed, 12 Dec 2007 09:50:07 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1393492</guid><dc:creator>andre</dc:creator><description>&lt;p&gt;thanks, exactly what I needed :)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1393492" width="1" height="1"&gt;</description></item></channel></rss>