In my opinion you should more look into task life cycle methods (as defined by WSHT spec) rather than modifying task instances. For instance you could use forward or delegate methods (depending on your needs) and then setDocumentContent to modify task content (variables) of the task.
HTH