I am trying to write a custom CompositeActivity using WF3.5. Something like a WhileActivity.
The problem is when I want to execute the child activity again (it previously succeeded with a final call to ActivityExecutionContext.CloseActivity()) I get an InvalidOperationException, with this message: "Activity status must be 'Initialized' for executing".
From debugging the problem, it appears that the child activity's ExecutionStatus is Closed and its ExecutionResult is Uninitialized.
But the MSDN doc for ActivityExecutionContext.ExecuteActivity says that "If the status is Closed, the Activity is initialized and executed".
So why am I getting this exception and how can I avoid it?
Thanks, Julien