How do I use the Result from a CodeActivty<string> in WF 4.0?
Question
I've created a custom activity in a .NET 4.0 beta 1 WF project. It's defined as:
public class GetCurrentUserMailAddress : CodeActivity<string>
because I've read that this is the most efficient way of returning a single result.
At the end, I set the Result using:
context.SetValue(Result, up.EmailAddress);
But now I'm struggling to use it in my Workflow. I want to use the value in my next activity but I can't find it.
How do I reference the Result from one custom activity in the next activity?
Solution
Never mind. I was being thick. Just in case anyone else is struggling, the Properties window for the custom activity contains a Result property. Stick your variable name in there and it will be populated with the value of your Result OutArgument.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow