I have a workflow, that at a certain point, needs to be triggered recursively.
I can't seem to figure out how to do this.
I tried the following code but context ends up being null??
private void codeTriggerChildren_ExecuteCode(object sender, EventArgs e)
{
ActivityExecutionContext context = sender as ActivityExecutionContext;
//context is null here?!
IStartWorkflow aWorkflow = context.GetService(typeof(ApprovalFlow)) as IStartWorkflow;
Dictionary<string, object> parameters = new Dictionary<string, object>();
parameters.Add("Parm1", "foo");
parameters.Add("Parm2", "bar");
Guid guid = aWorkflow.StartWorkflow(typeof(ApprovalFlow), parameters);
}