<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Custom TypeDescriptors and WF Activities</title>
	<atom:link href="http://winterdom.com/2006/10/customtypedescriptorsandwfactivities/feed" rel="self" type="application/rss+xml" />
	<link>http://winterdom.com/2006/10/customtypedescriptorsandwfactivities</link>
	<description>by dæmons be driven</description>
	<lastBuildDate>Tue, 16 Mar 2010 06:33:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: 0xDEADBEEF</title>
		<link>http://winterdom.com/2006/10/customtypedescriptorsandwfactivities/comment-page-1#comment-550</link>
		<dc:creator>0xDEADBEEF</dc:creator>
		<pubDate>Wed, 06 Dec 2006 08:32:22 +0000</pubDate>
		<guid isPermaLink="false">http://winterdom.com/2006/10/customtypedescriptorsandwfactivities#comment-550</guid>
		<description>Hi Tomas,
I&#039;ve been working on the exact same thing for a few days now.  I&#039;m REALLY interested in doing this.  I&#039;ve taken the same approach and I&#039;m almost done.  Unfortunately, I&#039;ve come across a show stopper that you might be able to figure out.  I&#039;ve got a custom activity called DataLinkActivity that contains a List&lt;DataUrl&gt; list.  Other activities want to bind their own properties to items in the List&lt;DataUrl&gt;.  Things work great at design time because I&#039;ve written my own custom bind dialog.  And I can create a workflow runtime instance because I&#039;ve set the ValidateOnCreate parameter to false (WorkflowRuntimeSection setting).
But at runtime, when an activity tries to retrieve the dynamic DataUrl it&#039;s property is bound to the return value is false.  Unfortunately, it&#039;s because the WF runtime uses standard reflection and to resolve the MemberInfo that the ActivityBind.Path refers to.  ActivityBind.GetRuntimeValue calls ActivityBind.InternalGetRuntimeValue that calls ActivityBind.GetMemberInfo that calls MemberBind.GetMemberInfo that calls PathWalker.TryWalkPropertyPath  (courtesy of Lutz Roeders reflector).  And the TryWalkPropertyPath fails because the function can&#039;t resolve where the class member is that the dynamic property refers to.  So the only way that you can actually bind to a property and have it return a value at runtime is if it corresponds to a member defined in some c# file - which really sucks!!!  I could bind to an actual property that is the List&lt;DataUrl&gt; rather than an individual item in the list but then I don&#039;t know how to actually resolve which item in the list is wanted.
If you find a way to be able to bind to dynamically bind to properties that don&#039;t exist in a custom activities class definition, please let me know.
</description>
		<content:encoded><![CDATA[<p>Hi Tomas,<br />
I&#8217;ve been working on the exact same thing for a few days now.  I&#8217;m REALLY interested in doing this.  I&#8217;ve taken the same approach and I&#8217;m almost done.  Unfortunately, I&#8217;ve come across a show stopper that you might be able to figure out.  I&#8217;ve got a custom activity called DataLinkActivity that contains a List&lt;DataUrl&gt; list.  Other activities want to bind their own properties to items in the List&lt;DataUrl&gt;.  Things work great at design time because I&#8217;ve written my own custom bind dialog.  And I can create a workflow runtime instance because I&#8217;ve set the ValidateOnCreate parameter to false (WorkflowRuntimeSection setting).<br />
But at runtime, when an activity tries to retrieve the dynamic DataUrl it&#8217;s property is bound to the return value is false.  Unfortunately, it&#8217;s because the WF runtime uses standard reflection and to resolve the MemberInfo that the ActivityBind.Path refers to.  ActivityBind.GetRuntimeValue calls ActivityBind.InternalGetRuntimeValue that calls ActivityBind.GetMemberInfo that calls MemberBind.GetMemberInfo that calls PathWalker.TryWalkPropertyPath  (courtesy of Lutz Roeders reflector).  And the TryWalkPropertyPath fails because the function can&#8217;t resolve where the class member is that the dynamic property refers to.  So the only way that you can actually bind to a property and have it return a value at runtime is if it corresponds to a member defined in some c# file &#8211; which really sucks!!!  I could bind to an actual property that is the List&lt;DataUrl&gt; rather than an individual item in the list but then I don&#8217;t know how to actually resolve which item in the list is wanted.<br />
If you find a way to be able to bind to dynamically bind to properties that don&#8217;t exist in a custom activities class definition, please let me know.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
