Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6810567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:13:16+00:00 2026-05-26T20:13:16+00:00

I have a workflow that moves files around between ftp sites. It can be

  • 0

I have a workflow that moves files around between ftp sites.
It can be the case that a user deletes the files from an ftp site while the workflow is about to copy it. I can detect that the file is gone, so I want to Cancel the workflow about to do the file transfer.

I start my workflows using a factory. The factory creates a helper class (wfManager) and the helper class starts the actual workflow using WorkflowApplication.

The workflow itself determines if it should Close based on if the file has gone missing. The workflow has a reference to the wfManager that started it so calls workflowApplication.close from the wfManager

I had thought that if I use WorkflowApplication.close from the wfManager that the workflow would Close.

However, the Close times out.

What would cause the Close to time out and is there a generic way to close or terminate a workflow via code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:13:16+00:00Added an answer on May 26, 2026 at 8:13 pm

    You have basically 3 options to end a worklflow:

    • Cancel
      As you have seen this waits a bit of time (so the workflow can finish whatever it is currently doing), then closes the workflow, then invoke the OnCompleted handler
    • Terminate
      This takes a reason for termination (as a param), waits a bit of time (so the workflow can finish whatever it is currently doing), then closes the workflow, then invoke the OnCompleted handler
    • Abort
      This just kills the workflow and does not call OnCompleted handler.

    MSDN references:

    • http://msdn.microsoft.com/en-us/library/dd987846.aspx
    • http://msdn.microsoft.com/en-us/library/ms611688.aspx
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a custom workflow activity that copies attachments from a case to
I have a skelta workflow that has finished with errors according to the WorkflowExecutionReport.
i have created a workflow activity that do give the item creater of a
I have a Windows Workflow application that uses classes I've written for COM automation.
I have a very simple workflow that is just trying to send an email
I have a fairly straight-forward sequential approval workflow that has an EnableModificationActivity that is
I have a workflow created in Sharepoint designer that works fine when manually triggered.
I have a working workflow in CruiseControl.Net that successfully builds and tests an MSBuild
I am trying to use Windows Workflow and have a model that looks similar
I have a bunch of Workflow foundation 4.0 RC code activities that consume web

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.