﻿<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://developers.de/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>WF - Compile and execute an activity/workflow at runtime</title><link />http://developers.de/blogs/andreas_erben/archive/2007/08/04/wf-compile-an-activity-workflow-at-runtime.aspx<description>Sometimes you will have a situation where you want to compile (and execute) a workflow at runtime. This is relatively easy when your workflow is pure .XOML and derives from classes available through the TypeProvider that implement everything it needs</description><dc:language>en</dc:language><generator>CommunityServer 2008 SP1 (Build: 30619.63)</generator><item><title>re: WF - Compile and execute an activity/workflow at runtime</title><link />http://developers.de/blogs/andreas_erben/archive/2007/08/04/wf-compile-an-activity-workflow-at-runtime.aspx#2489<pubdate>Wed, 23 Jul 2008 15:35:56 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:2489</guid><dc:creator>Andreas Erben</dc:creator><description>&lt;p&gt;elyes85: feel free to find me in xing//openbc or linkedin. you are working on interesting stuff :)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=2489" width="1" height="1"&gt;</description></item><item><title>re: WF - Compile and execute an activity/workflow at runtime</title><link />http://developers.de/blogs/andreas_erben/archive/2007/08/04/wf-compile-an-activity-workflow-at-runtime.aspx#2488<pubdate>Wed, 23 Jul 2008 15:20:04 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:2488</guid><dc:creator>elyes85</dc:creator><description>&lt;p&gt;Hi Andreas Erben !!!&lt;/p&gt;
&lt;p&gt;Great greetings for you !!&lt;/p&gt;
&lt;p&gt;Finally ! I did it !!!&lt;/p&gt;
&lt;p&gt;You know what was the problem ?&lt;/p&gt;
&lt;p&gt;I am developing workflow designer with nop code so I am generating only xoml files, so when I tested your command the first time, I just missed the right namespace so it failed .&lt;/p&gt;
&lt;p&gt;But I get finally !&lt;/p&gt;
&lt;p&gt;Thanks for you !!!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=2488" width="1" height="1"&gt;</description></item><item><title>re: WF - Compile and execute an activity/workflow at runtime</title><link />http://developers.de/blogs/andreas_erben/archive/2007/08/04/wf-compile-an-activity-workflow-at-runtime.aspx#2486<pubdate>Wed, 23 Jul 2008 14:55:13 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:2486</guid><dc:creator>Andreas Erben</dc:creator><description>&lt;p&gt;elyes85: Please provide an email address so we can exchange this offline. I need to see your code to reproduce the problem. After that we can talk about the solution.&lt;/p&gt;
&lt;p&gt;You can post your address here, it will not be visible to the public because I need to &amp;quot;publish&amp;quot; the comment first and I will not do this with your email address.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=2486" width="1" height="1"&gt;</description></item><item><title>re: WF - Compile and execute an activity/workflow at runtime</title><link />http://developers.de/blogs/andreas_erben/archive/2007/08/04/wf-compile-an-activity-workflow-at-runtime.aspx#2484<pubdate>Wed, 23 Jul 2008 14:30:00 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:2484</guid><dc:creator>elyes85</dc:creator><description>&lt;p&gt;Oh !! this does not function !!!&lt;/p&gt;
&lt;p&gt;it can&amp;#39;t validate the loop activity &amp;quot;while&amp;quot; I think some thing miss !&lt;/p&gt;
&lt;p&gt;it displays this error :&lt;/p&gt;
&lt;p&gt;failure to validate &amp;quot;whileActivity1&amp;quot;: impossible to find &amp;quot;Condition1&amp;quot; &amp;nbsp;??&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t understand what happen, anyway, I executed all the instaructions that &amp;nbsp;you provided , Thanks for your support again!&lt;/p&gt;
&lt;p&gt;tell me what&amp;#39;s the problem &amp;nbsp;?&lt;/p&gt;
&lt;p&gt;Thanks !&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=2484" width="1" height="1"&gt;</description></item><item><title>re: WF - Compile and execute an activity/workflow at runtime</title><link />http://developers.de/blogs/andreas_erben/archive/2007/08/04/wf-compile-an-activity-workflow-at-runtime.aspx#2481<pubdate>Wed, 23 Jul 2008 12:55:42 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:2481</guid><dc:creator>Andreas Erben</dc:creator><description>&lt;p&gt;Hi to Algeria,&lt;/p&gt;
&lt;p&gt;I am not sure what the problems are... but&lt;/p&gt;
&lt;p&gt;did you try to set the CompilerOptions on the WorkflowCompilerParameters object?&lt;/p&gt;
&lt;p&gt;If you have a namespace for your project &amp;quot;DummyName&amp;quot; and your activity is called &amp;quot;OnTheFlyActivity&amp;quot; and your file is &amp;quot;MyCoolRules.rules&amp;quot;, then you would write&lt;/p&gt;
&lt;p&gt;it in the format:&lt;/p&gt;
&lt;p&gt;/resource:FileName[,Name]&lt;/p&gt;
&lt;p&gt;parameters.CompilerOptions = &amp;quot;/resource:MyCoolRules.rules,DummyName.OnTheFlyActivity.rules&amp;quot;&lt;/p&gt;
&lt;p&gt;Hope that helped.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=2481" width="1" height="1"&gt;</description></item><item><title>re: WF - Compile and execute an activity/workflow at runtime</title><link />http://developers.de/blogs/andreas_erben/archive/2007/08/04/wf-compile-an-activity-workflow-at-runtime.aspx#2477<pubdate>Wed, 23 Jul 2008 08:56:57 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:2477</guid><dc:creator>elyes85</dc:creator><description>&lt;p&gt;Thanks I did it !!&lt;/p&gt;
&lt;p&gt;I have a problem with rule file ???? &lt;/p&gt;
&lt;p&gt;How can I do ???&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Thank you !&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=2477" width="1" height="1"&gt;</description></item><item><title>re: WF - Compile and execute an activity/workflow at runtime</title><link />http://developers.de/blogs/andreas_erben/archive/2007/08/04/wf-compile-an-activity-workflow-at-runtime.aspx#2388<pubdate>Sat, 19 Jul 2008 16:43:32 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:2388</guid><dc:creator>Andreas Erben</dc:creator><description>&lt;p&gt;have you tried adding a .cs file with your AssemblyInfo to the sources to be compiled?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=2388" width="1" height="1"&gt;</description></item><item><title>re: WF - Compile and execute an activity/workflow at runtime</title><link />http://developers.de/blogs/andreas_erben/archive/2007/08/04/wf-compile-an-activity-workflow-at-runtime.aspx#2385<pubdate>Sat, 19 Jul 2008 15:12:46 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:2385</guid><dc:creator>elyes85</dc:creator><description>&lt;p&gt;thanks for your great article Andreas, I would like to know how to assign to the compiled assembly the Culture and Version and PublicKeyToken ....with the workflow designer, when I have only xoml file ????&lt;/p&gt;
&lt;p&gt;Please I need your help !&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=2385" width="1" height="1"&gt;</description></item><item><title>re: WF - Compile and execute an activity/workflow at runtime</title><link />http://developers.de/blogs/andreas_erben/archive/2007/08/04/wf-compile-an-activity-workflow-at-runtime.aspx#1851<pubdate>Mon, 31 Mar 2008 09:23:59 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:1851</guid><dc:creator>DL</dc:creator><description>&lt;p&gt;How about compiling a 3rd file... I also need rules for my workflow... so, i have 3 files (xoml, xoml.cs, rules)... what about the rules file? ... i guess it cant be as simple, just to add it to &amp;quot;String[] sources&amp;quot; :)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=1851" width="1" height="1"&gt;</description></item><item><title>re: WF - Compile and execute an activity/workflow at runtime</title><link />http://developers.de/blogs/andreas_erben/archive/2007/08/04/wf-compile-an-activity-workflow-at-runtime.aspx#1495<pubdate>Wed, 15 Aug 2007 09:12:55 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:1495</guid><dc:creator>tgrk</dc:creator><description>&lt;p&gt;Thanks Andreas, this was exacly what I am doing these days. It helped me a lot. &amp;nbsp;There is only a few resources for Xoml compilation. Great post!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=1495" width="1" height="1"&gt;</description></item></channel></rss>