R – Workflow Custom Activity building workflow parameters

workflowworkflow-foundation

Let's say I have a Workflow with 2 dependency Property : Prop1, Prop2.

I'd like to create a custom activity that when I drag into the workflow, It will show Prop1 and Prop2 in the property grid in the designer.

Is this possible ?

Like the invokeWorkflow, when you select the TargetWorkflow, it populates the property grid with Parameters of the workflow, so that you can bind.

Best Answer

You could try something like this:

http://blogs.microsoft.co.il/blogs/bursteg/archive/2006/10/29/DynamicWorkflowBindingParameters.aspx

I've been doing quite a bit of digging into dynamically creating properties during design time and I've had some success with it.

However, I haven't been able to get dynamic properties to show up in the actual property binding display. So you can create properties dynamically in the designer and set them, but you can set other properties to point to your dynamic properties.

This appears to be a limitation of the workflow designer in visual studio. I can't see a reason why the workflow engine itself can't handle this.

Related Topic