Disabling a Workflow via web-services?
I'm using the fim2010client from Codeplex to try and develop a data-migration program.I posted this in their forums, but I think there's more support here. Does anyone know how you can effectively disable a workflow via web-services? FIM seems to be caching the workflow for some reason when I'm wiping the XOML attribute on the workflow: I'm trying to use the client to disable a workflow as part of a data-migration exersize. Of course this resource doesn't have a nice little "Disabled" attribute, that would be far too helpful. What I've tried doing instead is wiping out the XOML attribute, which seemed to have the desired affect when I viewed the workflow in the Portal, but upon running the script fully which went like this: Disable workflow Load data Enable workflow It turned out the workflow had still run. And to make matters worse, the service now won't start after I tried restarting it. Microsoft.ResourceManagement: Microsoft.ResourceManagement.WebServices.Exceptions.UnwillingToPerformException: Other ---> Procedure: ReRaiseException. Line number: 37. Message: A Sql failure occurred during Workflow processing., State 1, Procedure ReRaiseException, Line 37, Message: Reraised Error 50000, Level 16, State 1, Procedure DoRefreshWorkflowDefinitionCache, Line 216, Message: WorkflowSqlOperationException: A WorkflowDefinitionVersionKey mismatch exists in one of the workflow instance cache tables. You must restore the specified version to [WorkflowDefinition] or remove the instance from the cache tables before executing this procedure.. I'll just restore the database to get around this, but does anyone know how I would go about disabling a workflow? This workflow is associated with a ton of MPR's. I initially thought about trying to cycle through the MPR's and remove the workflow and then re-add it after, but I don't see how I can do that through the client.
September 17th, 2010 1:28pm

I fixed it by re-writing the code to remove the ActionWorkflowDefinition entry from the MPR's instead.
Free Windows Admin Tool Kit Click here and download it now
September 17th, 2010 2:45pm

Why removing the workflow from the MPRs? You can disable / enables MPRs and that way disable / enable workflows. Cheers, MarkusMarkus Vilcinskas, Knowledge Engineer, Microsoft Corporation
September 17th, 2010 2:49pm

Thanks for the reply Markus. I want to disable the Workflow, not the MPR. This one workflow is associated with many MPR's and some MPR's have many workflows, so disabling the MPR's isn't viable. I removed it from the MPR, did the data-migration and then re-added it to the MPR, this gave the desired result.
Free Windows Admin Tool Kit Click here and download it now
September 17th, 2010 4:02pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics