Question

I am new to WF 4.5.

The "GenerateResult" activity will generate a string in the Result property.

I want to assign the Result to the varExternal in the following Assign activity.

How to?

enter image description here

The GeneratedResult activity is defined as below.

public sealed class GenerateResult<TResult> : NativeActivity<TResult>
{
    protected override void Execute(NativeActivityContext context)
    {
        this.Result.Set(context, "Hello, world!");
    }
}
Was it helpful?

Solution

Just like you'd do it when programming. You have to hold the result within a variable, then reference that variable elsewhere.

I'm assuming you want to use the result in the WriteLine activity, so you would create a variable within the workflow (look at the bottom of the designer), bind it to the Result property of your GenerateResult activity (it's in the Property grid, so right-click and hit Properties). Then you can reference that variable in the WriteLine activity.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top