index > Windows Workflow Foundation > Activity binding to a dynamic property.

Activity binding to a dynamic property.

I have seen custom activity examples where dynamic properties can bind to dependancy properties on other activities. Is there any way to create dynamic properties of potentially different types which will show up in the activity reference dialog and can be bound to from other activities? If not what alternative might be available?
Aaron Whitney
The dialog that allows you to bind dependency properties to other properties requires the target to be assignable from the source. If you have a custom activity that has property Foo that is typeof(Bar) when you launch the dialog to set the property you will only be able to select a variable of the workflow or property on another activity that IsAssignableFrom(Bar). Custom activity properties are displayed in the dialog just like the built in activities so I am not sure what you mean by "can be bound to from other activities".


MS Workflow SDE/T - This posting is provided "AS IS" with no warranties, and confers no rights.
Tom Lake

What I am looking for is dynamic output properties.

I am trying to create a custom activity for pulling values out of XML. A UI type editor dialog lets the user specify a number of xpaths each with a property name and datatype. After the xpaths are defined, a dynamic property is created in the property grid using PreFilterProperties for each xpath with the datatype specified in the dialog. When the activity is executed each property is set to the value obtained from running the associated xpath. What I would like is for other activities to be able to bind to the dynamic properties to pull the value.

The dynamic property examples create properties (usually reflected method parameters) on the fly in the designer which can bind to other activites. I would like to create ones which can be bound to.

I am using XAML only workflows and so cannot use code-behind and would like to avoid having to place 30 individual xpath activites to bind to 30 values pulled from XML. If I output the values to a string array then I will need 30 conversion activites instead which I also would like to avoid.

Any suggestions?

Thanks

Aaron Whitney

Something along these lines would be useful to me.

Have you had any success?

(I am also struggling along with XOML only workflows - seems we are limited at every step).




Michael
Blipwort

Binding directly to dynamic properties is not supported. It is recommended to issue an intermediate field or property. Select dynamic property, open activity bind dialog, select "Bind to a new member" tab. A new member on workflow level is generated. Now you can bind other activity properties to this new member.

Hope this helps




Ghenadie Plingau | SDET | WF | This is provided "AS IS" with no warranties, and confers no rights
ghenap
I have the same issue as 0xDEEDBEEF and Aaron. I would like to programatically create dynamic, typed properties on an activity and then bind to them from other activity properties using the activity bind dialog.
ImpureEvil

Does anyone know how to solve Aaaron's problem? I'm having the exact same issue.

I have a custom database activity that wants to expose 5~30 rows in a database table as DependencyProperties. Other custom activities will need to reuse the same database rows as DependencyProperties. (The database rows are converted into different object types that become DependencyProperties.)

I can generate an IExtenderProvider implementation class on the fly by generating a .cs file and compiling it but I'd really prefer not to have to dynamically generate a .cs source code file.

Does anyone out there know how to dynamically add DependencyProperties to an existing CustomActivity object on the fly?




0xDEADBEEF
0xDEADBEEF
reply 7

You can use google to search for other answers

 

More Articles

• workflow compiler with RuleconditionReference
• Link for Changes comparision from beta1 to beat2
• Unknown error in workflow1.xoml
• How to get the list of Running Instances?
• Can not debug project after installing framework 3.0 and extensio...
• Rules which reference Activity properties in XOML only workflows
• How can I query StateMachineWorkflowInstance before the WF idles
• How to expose the workflow status
• Please Answer this question
• Hosting state-transition workflow designer: How to add handlers t...
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• ASP.NET Workflows and Sharepoint / InfoP
• Configuration
• How to use ASPNet XAML Activation sample
• OwnershipTimeoutSeconds
• I have to have Idingo to put the Expense
• Problem using the SqlTrackingService
• ASP.Net Designer example
• Custom Service loading from a different
• How to get ActivityExecutionContext from
• RequestPersist does not exist in Beta2?
• Terminate the workflow instance with a W
• workflow designer
• Beta 2 Debugging question for HOL 1
• WWF with .NET compact framework 2.0
• i can not open the link

Hot Articles

• Limitation for simultaneous executing wo
• Find Top Level Activities of Current Act
• Activity custom drawing does not work
• Sending mail through ExchangeWebDavMailS
• Activity 'workflow1' validation failed
• about ShadowProperties
• Question about performance overhead
• Windows Workflow Foundation
• CorrelationParameter data types
• Debug step into code behind SharePoint S
• Reusing workflows in a State machine
• Making properties values persist in a wo
• Some Workflow classes use wrong casing o
• Programmatically create a workflow (Work
• Does design any workflow need a new proj

Recommend Articles

• using correlation token to decide which
• dependency properties do not get seriali
• How to store data in a long running stat
• Pageflow Engine
• Exception throw by FaulthandlersActivity
• State Machine Dependency Properties
• Using Dynamic rules in workflow
• Persistence services
• Question about performance overhead
• XAML Activiation Limitations
• error indicator for the customized activ
• Custom Properties and SQL Persistence
• Usage of WWF in a .NET 2.0 app?
• Configuring ActiveDirectoryRoleFactory t
• InvokeWorkflow