How to pass parameters from workflow to activity properties?

I've created a custom activity with 3 properties (p1,p2,p3) all of them System.String.
I'm using that activity in a workflow with parameter wfp1.
How can I put the value of wfp1 into p2 using the visual designer?

Regards.

[234 byte] By [urraca] at [2008-2-27]
# 1

Hi, You need to bind the activity property with the workflow parameter so that you can pass the value. For sample code please refer to http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=96331

Hope this helps.

Vihang

vihang at 2007-9-9 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 2

How can I bind it if I have a pure code based workflow , no .xoml file ?

would this work ?



activitybind2.ID = "/Parent";
activitybind2.Path = "Parameters[myItemId]";
this.createItem1.SetBinding(Spikes.WWF.Ressearch.ActivityLib.CreateItem.ItemIdProperty, ((System.Workflow.ComponentModel.Bind)(activitybind2)));

YvesLorphelin at 2007-9-9 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 3

Almost. You need to say

activitybind2.Path = "Parameters[myItemId].Value";

Thanks,

Vihang

vihang at 2007-9-9 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...

Software Development for Windows Vista

Site Classified