Pro WF: Windows Workflow in .NET 4

Category: Operating Systems
Author: Bruce Bukovics
3.0
This Year Stack Overflow 2
This Month Stack Overflow 2

Comments

by anonymous   2017-08-20

I have to disagree with @Andreas Öhlund. This is like saying "I have C# and the .NET Framework, so why do I need to buy an ERP system?" @juanjo.arana's answer is much more balanced.

The NServiceBus documentation for Sagas is one page (5 screens on my monitor). The book Pro WF is 850 pages. (I've read it; it's not filler.) The book Professional K2 blackpearl (discussing a full BPM system) is 870 pages (Amazon's count is off).

Even WF 4 (excluding SharePoint) is not a full-featured BPM system. It's missing an activity-level security model, locking ("Bob has claimed this work order, but has not completed it yet"), advanced versioning, and reporting. You can build all of these things, but they aren't in the "box."

Look at the Timeouts section of the NServiceBus Sagas page. Compare that to the visual method of doing an expiration in WF 4. Imagine keeping track of this in a complex workflow, where timeouts (escalations) are needed every time a manager wants to be notified that an employee is taking too long in a document-processing system.

I agree that workflows are sometimes overkill, and that they can be hard to test. (There are ways to unit test WF 4.) But I would not want to build a real-world, BPM-style workflow with NServiceBus.

by anonymous   2017-08-20

First, I'd recommend picking up the book Pro WF: Windows Workflow in .NET 4.0 and working through the tutorials (if you haven't yet). While it's not perfect, it covers many of the important topics.

For a long-running process you're almost certainly going to want to implement persistence. Otherwise if your server goes down, running workflows disappear. Also consider hosting under IIS.

Subscribe to The Problem Solver and check out his answers on SO. He also has an Introduction to WF 4 video series. There are several videos by others on Channel 9, too.

State Machine doesn't come out of the box; it's a separate download. It's not required, though - you could use Sequential, Flowchart, or a combination to achieve what you want.

Be prepared to write custom activities. (See the Channel 9 videos, especially Leon Welicki's.) You'll have to implement security, locking, worklists, etc. if those are part of your requirements. WF is not a BPM system out of the box.

Finally, don't be intimidated. This is all doable, and WF 4 is a well-thought-out framework. Just be prepared to spend considerable time learning and implementing this.