Passing an anonymous callback function from one workflow to another workflow and execute

Hey guys,

I have a situation where I want to send a callback function as a parameter to the next workflow so that the main workflow can execute code while the sub workflow continues to run. I’m passing the function in a Func and that seems to work as an In parameter. However, when i’m in the sub workflow, i tried to execute that function in an Invoke Code activity and it looks like i get an issue related to scope. “An ActivityContext can only be accessed within the scope of the function it was passed into.” Does anyone know how i can pass an anonymous function from one workflow to another, and successfully execute that function in the other workflow?