The past few weeks I have been working on writing a new training on windows workflow foundation. Last week we did an internal dry run of the content and as we speak I am working on the hands-on labs that accompany the course.

During the development of the labs I ran into an interesting struggle with the activity binding dialog when you try to implement an interface that has enumerations as an input parameter.

I have the following function prototype that I want to implement using a WebserviceInput activity:

void VoteTrip(string tripid, ApprovalStatus status);

You can see I use the ApprovalStatus type that is an enumeration that can contain values: approved, declined, and pending.

Now when I try to bind the parameter to the workflow the property editor will not show the ellipses box in the property designer, but you will get a dropdown box where you can select the value of the parameter. The problem is that I did not want to bind a fixed value to the WevServiceInput parameter, I want to bind it to a WF property so I can use it later on in the workflow.

I scratched my head for a while, and decided to ask how I can overcome this problem in the workflow forum at MSDN. Wow, I had a response within a few hours and it appears that it is possible to pop up the Activity binding dialog, but you need to click on the little blue icon, instead of activating the dropdown. See picture below. You need to click the icon and then you are able to bind again…

Now that is what I call a great hidden feature J

b.t.w. The training is already scheduled to run beginning of February, so if you are intereseted in attending, you can find more information on the content and dates over here.