views:

204

answers:

1

I have a polling service that checks a directory for new files, if there is a new file I call SSIS.

There are instances where I can't have SSIS run if another instance of SSIS is already processing another file.
How can I make SSIS run sequentially during these situations?

Note: parallel SSIS's running is fine in some circumstances, while in others not, how can I achieve both?

Note: I don't want to go into WHEN/WHY it can't run in parallel at times, but just assume sometimes it can and sometimes it can't, the main idea is how can I prevent a SSIS call IF it has to run in sequence?

+3  A: 

If you want to control the flow sequentially, think of a design like where you can enqueue requests (for invoking SSIS) to a queue data structure. At a time, only the top request from the queue will be processed. As soon as that request completes, next request can be dequeued.

Gulzar