passing param to custom activity in Designer

Hi there,

I've created a custom activity within Visual Studio, which I've imported into SharePoint Designer and used in a workflow. My activity requires one input parameter, which I've set within Designer to the 'Encoded Absolute Url' (of the item the workflow instance is running on).

I write the value of Encoded Absolute Url out in a 'log to history list' action, which I can see is correct. However, my activity is erroring because that value doesn't get set in my code (confirmed through debug) - the property isn't null, it's a string value 'EncodedAbsUrl'.Which is a bit odd, no? So it seems to sort of be mapping, but not to the value.

I followed the 'Importing Custom Actions Into SharePoint Designer' white paper to create my activity and assumed that once I'd promoted my property (i.e. the input parameter) and created a .actions file etc, the property would get set by the workflow.

Addendum - the white paper says on pages 4/5:

Property promotion consists of getters and setters to allow the property to be bound to variables outside of the activity.For this example, we need to take in a username and pass back the manager’s information, as well as an error message if it wasn’t successful.

To promote properties, use the “DependencyProperty” code snippet that comes with the WF designer.This code snippet generates the getter/setter code and allows you to specify the property name, type, and description for the property.

With this customized, the property is exposed to the rest of the workflow.The workflow can now bind variables to these properties for both input and output.Now the activity is ready to be used in SharePoint Designer 2007.

So I had assumed that by binding to the property within Designer, the property would get set - however upon debugging my activity (since I can't unfortunately debug the bits before the activity since they're in Designer) I can see that the property isn't set as expected.

Hope that makes sense, I'm a bit confused. Thanks in advance!

[3066 byte] By [clovernews] at [2008-3-1]
# 1
I've figured it out - the DesignerType I was using within my .actions file was wrong. I made the value of that 'fieldValues' and it worked. Would be awfully helpful if Microsoft would publish a list of DesignerTypes SOON though, because I just had to guess at that value name - it wasn't used within wss.actions which to my knowledge is the only point of reference for finding out some of the DesigerTypes available!
clovernews at 2007-9-5 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Workflow...

SharePoint Products and Technologies

Site Classified