public MyCallbakActivity() { Implementation = () => new Sequence() { Variables = { v }, Activities = { //To wrap the activity delegate new InvokeFunc <int, int, long> { Func = Callback, Argument1 = new InArgument <int>(env => XX.Get(env)), //Must wire with local InArgument this way. Argument2 = new InArgument <int>(env => YY.Get(env)), Result = v, //buffer the callback Result in v }, //To wire the callback Result with the local Result. new Assign <long> { To = new ArgumentReference <long> { ArgumentName = "Result" }, Value = v, } }, }; }