I have a workflow activity that is responsible for checking if a certain part of the infopath form was filled out correctly. If it wasn't it creates a task for the original submitter to complete that section. The workflow starts with a CodeActivity that reads in the document and checks if it is valid. If not it then creates a task for the original submitter and then uses a OnTaskChanged for that activity. When the task changes it checks the AfterProperties that it has been set to a completed state, and if it has then reverifies the document.
If after the task is set to completed the document is still invalid I need to set the task back to the "In Progress" state. I tried using an UpdateTaskActivity, but I always either get an SPException about the task being locked or I get an PersistenceException - invalid date/time.
I have tried using the UpdateTaskActivity and updating in code through the task list for the workflow. Both solutions throw one of the two exceptions depending on how it is configured.
Does anyone know the proper way to update a task?
Setup is MOSS 2007 on Server 2003 (VM)