Subclassing StateActivity
I am trying to create a special subclass ofStateActivity which creates a user-assigned task entry in a database table when it becomes the current state, and the closes the task in the database when it ceases to be the current state.
This way my workflow creates a database entry for a user to say "do this task please" and also closes the task if workflow is completed, cancelled etc.
So far I haveStateWithTaskActivity which captures theExecute andOnClosed events to create and close the task, which works ok.
I would like to be able to let a workflow designer initialize some of the properties of the activity just before it creates the task, in the same way as theDelayActivity propertyInitializeTimeoutDuration- how does one create a dependency property that generates a function?
Note that I can't let the user use StateInitialization activities because the task is createdbefore this is called.
Here's hoping someone can suggest how..

