In one of my earlier articles, I covered a common issue that we encounter during installation of workflows. In this article, I’d cover another issue that we encounter during uninstallation and reinstallation of workflows.
Background of this issue goes on like this before I present the troubleshooting route that I took to overcome the same. In one of my implementations, I have installed all the pre-requisites required for Workflows and configured them successfully. Same is the case with Workflows for which the installation went peacefully. Problems started only when I identified the workflows are not working properly with the Approvals during the initial testing. After several unsuccessful attempts, I decided to take the hard way to get out of this issue. I decided to uninstall the Workflows completely and reinstall the same. Even repairing workflows wasn’t working. To add to my already existing problems, the uninstallation also failed returning a fatal error. After several attempts again to uninstall the same, in a frustration, I uninstalled Web Services, MOSS and even Business Portal just to make sure I wanted to have a clean install.
The same fatal error prevailed even after uninstalling the whole thing and reinstalling the same pre-requisites. What to do? I have to make a choice here again. Then comes the most hard decision. To go through an unsupported method. (Please be advised that this is an unsupported method and readers are requested to exercise caution)
1. Uninstalled the Workflows using Windows Installer Clean up utiliy. Remember that Windows installer clean up doesn’t delete the actual program.
2. Backed up the Registry.
3. Went to Registry Editor (regedit.exe) and identified the Keys for Workflows as below
HKEY_LOCAL_MACHINE_SOFTWARE_BUSINESS SOLUTIONS_WORKFLOW FOR DYNAMICS GP
4. Deleted the above keys. We can identify the keys by seeing the display name of the same.
5. Rebooted the server.
6. Tried installing the Workflows again. For a minute, I thought It went past the earlier error. It did before it failed again returning the following errors
C:\ Program Files \ Microsoft Dynamics\ Workflow \Microsoft.Dynamics.Workflow.Install.RegisterSchedule.exe returned '-532459699'
7. To overcome the above errors, I opened the stsadm.exe command prompt and ran the following commands.
• stsadm -o deactivatefeature -name DynamicsApproval -url <DynamicsGPWorkflow URL> -force
• stsadm -o deactivatefeature -name DynamicsWorkflowForms -url <DynamicsGPWorkflow URL> -force
• stsadm -o deactivatefeature -name DynamicsWorkflow -url <DynamicsGPWorkflow URL> -force
• stsadm -o uninstallfeature -name DynamicsApproval -force
• stsadm -o uninstallfeature -name DynamicsWorkflowForms -force
• stsadm -o uninstallfeature -name DynamicsWorkflow -force
Note: DynamicsGPWorkflow URL should be replaced by actual workflow URL
8. Tried installing it again. voila! It worked.