I have a book that explicitly states how to integrate WF (WorkFlow) and WCF. Obviously, this is too much to post here. I think your question deserves a longer answer than you can easily answer this entire forum, but Microsoft offers some recommendations .
And a Google search for "WCF and WF" produces a lot of results.
I developed an application in which we used a similar process using MSMQ. The idea was to provide alarm messages to all our stores in the event of a product recall or known problems that affect a large number of stores. It was designed and tested by OK.
We ended up not using MSMQ due to business requirements - we needed to know if a message was received right away so we could call the store, and not just let the store receive it when their computer could pick up the message from the queue . However, it worked very well.
The article linked to above is a good place to start.
Our current design with which we live does exactly what you asked about the Windows service.
- We have a web page for entering messages and selecting mailing lists. - they are stored in the database
- We have a separate Windows service (we call it AlertSender) that polls the database and checks for new messages.
- Storage-level computers have a Windows service that hosts a WCF client that listens for messages (AlertListener)
- When AlertSender finds messages that need to be disabled, it sends them to AlertListener, which is responsible for displaying the message in stores and playing a sound signal.
- When messages are sent, AlertSender updates the message status in the database.
- When stores receive a message, an employee dials their employee # and presses a button to confirm that they received the message. (A critical business requirement is for us, because if all stores do not receive the message, we may need to physically call them so that they remove the infected product from the shelf, etc.).
- Finally, our administrative part has a report (ASP.NET) attached to AlertId that displays all pending messages and their status.
David source share