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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:03:37+00:00 2026-05-26T00:03:37+00:00

I am trying to construct a simple windows workflow to monitor a directory for

  • 0

I am trying to construct a simple windows workflow to monitor a directory for inbound files and do some DB updates using Windows WF 4.0. Currently I am planning to build a ‘WCF Workflow Service’ and host it as a ‘Windows service’ running 24/7 (with a daily service shutdown and startup).

Further in the future I am planning to consume this service using an ASP.NET/WPF application to create a basic dashboard kind of stuff.

Considering the idea of directory polling for files with WF hosted on windows service, does it seems to be a good idea? What can be the cons of this?

Please advice if there are any drawbacks on this or can this achieved by better means?

  • 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-26T00:03:38+00:00Added an answer on May 26, 2026 at 12:03 am

    I’m actually doing this, but it is a bit more complex than you think, and should be avoided if possible.

    You should not be blocking from within an Activity; if it is expected to be a long running Activity that is waiting from input from the outside (FileSystemWatcher event, for instance), the workflow should idle itself and wait to be woken from the outside.

    How I did this was I created a workflow extension that hosted the FileSystemWatcher. Once the Activity was ready to watch for a file, it created a bookmark and passed it to the extension.

    The extension then started the FSW, holding onto the bookmark.

    When a FSW event was fired, the extension resumed the bookmark, passing in an object that contained details about the event. The Activity did what was needed with the event, then re-scheduled itself.

    Normally I wouldn’t have done this, but I had some requirements that forced me to use WF4 to accomplish this goal. If I didn’t have to use WF4, I would have just spun up the FSW within the service and consumed the events.

    Unless you expect to have to be very flexible with your configuration detailing what you do with the FSW event, and expect this to change relatively often during deployment of the service, I’d skip WF4.

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

Sidebar

Related Questions

trying to test out move semantics i build a simple class that allocates some
Am trying to construct a simple update query in my model class Model_DbTable_Account extends
Simple Substitution Cipher. I'm trying to make a looping construct that would loop through
I am trying to compile Flusspferd on Windows using MSVC, but it fails due
I'm trying to construct a FSM for a simple compiler. I've chosen to create
I'm trying to construct a simple delete statement in mysql and can't seem to
I'm trying to build a simple AWT application in Java. I want all of
I'm currently playing with the Stack Overflow data dumps and am trying to construct
I am trying to create a really simple GUI using GtkBuilder and glade. To
I am building a state machine with windows workflow, and I am trying to

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.