How to update existing TaskDefinitions while active tasks are pending
We currently have a TaskDefinition workflow that handles customer self registration. Once deployed in production if there are active tasks pending we can not deploy a new version of that workflow until all task are finished and no longer pending. This seems to be a big issue and unreasonable with two levels of approvals. A task could be pending at all times. Is there a better way to design workflow so that we do not run into this deployment issue.
[458 byte] By [
donjosha] at [2007-11-27 5:26:30]

# 1
Hi I could understand where you are coming from. We have the same issue as well and had explored various ways to overcome this. It seems too much to ask the approvers to clear their pending approvals whenever we deploy new workflows.
It seems a bit like a hack to you. But this is what you can do to overcome the issue :
From the debug page
1) Export the entire 'workitem' object.
2) Delete all existing workitems.
2) Export the entire 'TaskInstance' object.
3) Delete all existing Task Instance.
Now when you import the workflows, IdM will no longer complain.
From Import Exchange
4) Import the new workflows.
5) Re-import the entire Workitem object.
6) Re-import the entire Task Instance Object
As usual do a dry run on your staging first :-)
Good Luck!
# 3
You can do the following:
When you see an error like:
Task definition 'Add User' may not be modified while there are active task instances.
Note the GUID For the problem object: id='#ID#F4CCBBF442262B8F:18B492:10AB4696C44:-7E18'
From lh console:
rename TaskDefinition '#ID#F4CCBBF442262B8F:18EF117:10B900DFC80:-7FBF' 'Add User 20070525'
Where the last paramter above is the new name you want for the object.
Remove the GUID from the new taskDefinition you are importing or at least make sure the new TaskDefinition you are importing does not have the same GUID as the old one.