I been in a situation yesterday with one of my clients, they had a problem in their portals server and been getting the above message during the uninstallation of the Workflow of Dynamics GP.
The exact message was: "The selected website is not a SharePoint site", but if you open the SharePoint Central Administration you finds the web application that holds the Workflow and it is indeed your Workflow web application.
While digging deeply into this, I noticed that the web applications for Workflows are being identified by unique identifier instead of using the web application name, so the mentioned case might became due to an operation that you have deleted the SharePoint web application from SharePoint Central Administration which workflow installed, and re-added the web application with the same name and same configuration, even with the same data as I have restored the web application from a SharePoint backup I had earlier.
The only way to resolve this is by forcing the workflows to be uninstalled without validating the SharePoint, to do this you will need to download Windows Installer Cleanup Utility which could be downloaded from here, and uninstall the workflow application by clicking on uninstall, this will remove the information of the workflow from your system but will not delete workflow files, normally workflow files will be replaced after doing the reinstallation, but the only thing that will have to be removed manually is the registered workflows and features that was deployed over SharePoint, this will need to be done by running following commands in CMD:
cd C:\Program Files\Common files\Microsoft shared\Web server extensions\12\Bin\
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
Replace the <DynamicsGPWorkflow URL> placeholder with the path of the DynamicsGPWorkflow site collection. For example, replace the placeholder with the following path:
http:// Server_name /Sites/DynamicsGPWorkflow
Finally you’ll be able to reinstall the workflow with no issues.