- Remove Workflow from associated list.
- Remove corresponding feature from entire farm (for good measure).
- Clean and rebuild entire workflow solution.
- Deploy workflow.
- Start the workflow on an existing item in associated list.
- Fill out the initiation form (that was built via InfoPath and VSTA).
- Get an error screen saying: "The workflow failed to start due to an internal error" (even though I have set every bloomin' Web.config file on the server to NOT show custom errors and TO show a call stack).
- I return to the associated list.
- *le gasp* The item says its workflow is "Completed" despite the error!
- I check on the status of the completed workflow, and see it has created 1 task (after which it was supposed to wait for that task to be updated or completed, infopath form and all, after which it was supposed to assign another task).
- I click on the task, then on "Edit Item", then "OK".
- I repeat step 11, but this time when I click "OK", I get the error message "This task is currently locked by a running workflow and cannot be edited."
I know I made an error somewhere (probably failed to correctly include a Form for the tasks or something), but geez, some uncontradictory information would be helpful!
Stay tuned for a solution (if I ever find one! :P).
EDIT: I think I resolved this by setting TaskListContentTypeId="0x01080100C9C9515DE4E24001905074F980F93160" in my workflow.xml. This is what you use if you do NOT define a content type in SP first (as is the case with this workflow). Evidently, this ID is universally recognized as the code for custom content schemas defined by attached InfoPath forms with URN's corresponding to those found in the MetaData section of Workflow.xml. In other words, all tasks with TaskProperties.TaskType=X will have ExtendedProperties corresponding to the InfoPath form whose URN == TaskX_FormURN.
Please respond with any corrections to any misunderstandings of mine. Thanks!