<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.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>How to use custom ActivityCondition or filter which ActivityConditions are available</title><link>http://blogs.msdn.com/tomlake/archive/2006/10/19/how-to-use-custom-activitycondition-or-filter-which-activityconditions-are-available.aspx</link><description>If you have your own custom ActivityCondition you are only going to be able to use it with your custom activities, not out of the box activities like While or IfElseBranch. First start by creating your custom ActivityCondition like the following: [ DisplayName</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: How to use custom ActivityCondition or filter which ActivityConditions are available</title><link>http://blogs.msdn.com/tomlake/archive/2006/10/19/how-to-use-custom-activitycondition-or-filter-which-activityconditions-are-available.aspx#8963509</link><pubDate>Wed, 24 Sep 2008 14:30:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8963509</guid><dc:creator>Crypt</dc:creator><description>&lt;p&gt;Hi thanks for the tutorial!&lt;/p&gt;
&lt;p&gt;But I have one Problem:&lt;/p&gt;
&lt;p&gt;I want to bind CustomCondition so I create a depencyproperty:&lt;/p&gt;
&lt;p&gt;public static readonly DependencyProperty CustomConditionProperty = DependencyProperty.Register(&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;quot;CustomCondition&amp;quot;, typeof(string), typeof(CustomActivityCondition));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public string CustomCondition&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get { return (string)this.GetValue(CustomConditionProperty); }&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set{ this.SetValue(CustomConditionProperty, value); }&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;but I get always null&lt;/p&gt;
&lt;p&gt;Can you help me?&lt;/p&gt;
&lt;p&gt;Mail: sanny_nguyen@online.de&lt;/p&gt;
&lt;p&gt;Thank you :)&lt;/p&gt;
</description></item><item><title>re: How to use custom ActivityCondition or filter which ActivityConditions are available</title><link>http://blogs.msdn.com/tomlake/archive/2006/10/19/how-to-use-custom-activitycondition-or-filter-which-activityconditions-are-available.aspx#9141163</link><pubDate>Tue, 25 Nov 2008 11:28:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9141163</guid><dc:creator>alexboly</dc:creator><description>&lt;p&gt;&amp;quot;If you have your own custom ActivityCondition you are only going to be able to use it with your custom activities, not out of the box activities like While or IfElseBranch.&amp;quot;&lt;/p&gt;
&lt;p&gt;This is not completely true. Let's say you have a CustomCondition class that inherits RuleCondition. Then, you:&lt;/p&gt;
&lt;p&gt;- create a composed activity that contains IfElseBranch, While etc. activities&lt;/p&gt;
&lt;p&gt;- add to the custom activity a property that defines the custom rule&lt;/p&gt;
&lt;p&gt;- on setting the value of this property you set the rule on the IfElseBranch to an object of the CustomCondition type&lt;/p&gt;
&lt;p&gt;you will see in the designer that the type you use appears and is fully supported! In this case it will be read-only, because you cannot modify activities contained in a composed activity.&lt;/p&gt;
&lt;p&gt;The same effect can be created by writing a custom activity that can contain other activities and that attaches to them a DependencyProperty that when set changes the condition to a CustomCondition. You can edit it in the designer with this trick, but you always have to embed IfElse, While etc. activities in this container.&lt;/p&gt;
&lt;p&gt;All in all, this limitation is really stupid. Why can't you just write in the designer combo the type of the rule you want to use? (This is displayed when the rule is set to a custom type like above). Why would the designer disallow something that is allowed from the workflow engine? I would like to know who took that decision, so that I can say a few words to them.&lt;/p&gt;
&lt;p&gt;Anyway, I'm looking for a solution to avoid this limitation, because I really need custom rule engine support. So any ideas are welcome.&lt;/p&gt;
</description></item></channel></rss>