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 149021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:03:44+00:00 2026-05-11T09:03:44+00:00

Best practices for writing long running custom activities for Workflow Foundation (3.0/3.5) suggest that

  • 0

Best practices for writing long running custom activities for Workflow Foundation (3.0/3.5) suggest that it is not a good idea for an activity to perform a long-running task entirely within the Execute method of the activity. The single thread allocated to the workflow would be blocked, which prevents the processing of other scheduled requests for the workflow.

So for long running tasks, a queue should be created. The actual work will be done by a local service (running on a thread pool thread). This service passes the result of the work to the waiting activity via the previously workflow queue.

So my question is, what exactly quantifies a task as long running? Is it a matter of processing time? When should one create a queue and when is just using a local service sufficient?

Thanks for any clarification.

  • 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. 2026-05-11T09:03:44+00:00Added an answer on May 11, 2026 at 9:03 am

    What kind of reliability you need will mostly govern this. I find it safe to presume that any task which involves communicating with one or more external systems (be it just e-mail) should be handled with some reliability in mind, i.e. persistent storage in between.

    Long running is not so much of an issue as what would happen if you fail to recover from a failure at some point. This is why I rely on database transactions to commit or rollback workflow state as the workflow is being processed.

    I would consider any operating which can potentially block for more than 2 minutes as long running. And depending on how many free completion ports I have available I might not even want to wait that long but this is more of a load balancing thing. Keep your workflow runtime crunching but not blocking 😉

    EDIT

    That 2 minute thing comes from RFC 793 which dictates that no TCP session should remain idle for more than 2 minutes. I figured that if my system is talking to your system and its taking more than 2 minutes to complete they shouldn’t be waiting on each other to finish.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Q1. What are best practices for a writing a code that does not consume
What are the best practices for writing code that can be cross compiled on
Possible Duplicate: What are best practices that you use when writing Objective-C and Cocoa?
What are the best practices for writing C or C++ functions that return an
When writing a custom server, what are the best practices or techniques to determine
What are the best practices for reading and writing binary data in Ruby? In
I have a question about best practices in Java. I'm writing a class, which
What best practices have you used in unit testing embedded software that are peculiar
For my current job I am writing some long-running (think hours to days) scripts
I have an application that I'm writing that uses solely @properties. I have not

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.