Ask a questionAsk a question
 

Questionhow to stop/cancel a workflow (3.5)

  • Wednesday, October 21, 2009 1:02 AMtobrien Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    We have implemented several workflows as WCF services, exposing methods that are implemented using ReceiveActivities in our Sequential Workflows. These typically perform long running tasks that are database intensive. Our workflow runtime is hosted in the web.config of the WCF service.

     

              < workflowRuntime name = "WorkflowServiceHostRuntime " validateOnCreate = "true " enablePerformanceCounters = "true ">

                < commonParameters >

                  < add name = "ConnectionString " value = "our connection string" />

                </ commonParameters >

                < services >

                  < add type = "System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 " connectionString = "our connection string " LoadIntervalSeconds = "1 " UnLoadOnIdle = "true " />

                  < add type = "System.Workflow.Runtime.Tracking.SqlTrackingService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 " IsTransactional = "false " UseDefaultProfile = "true " connectionString = "our connection string " />

                  < add type = "System.Workflow.Runtime.Hosting.SharedConnectionWorkflowCommitWorkBatchService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 " />

                </ services >

              </ workflowRuntime >

     

     

    We need to find a way to cancel a workflow instance mid-process that would stop the instance completely. It is necessary for the solution to keep a record of the cancel action in the UserEvents table in the SqlPersistence database.

    Does anyone knows how would we cancel/stop a workflow here? Any help appreciated.

    • Moved byAmyMacMSFTWednesday, November 04, 2009 11:20 PMWrong Forum for Version (From:.NET Framework 4: Workflow Foundation - Beta 2)
    •  

All Replies