Workflow Systems: Myths, Truths and Wishful Thinking

by bsatrom September 22, 2009 19:55

I had a great time at IASA Denver last night. My presentation included some great discussion among the group about workflow systems and the various challenges we all face when addressing a “workflow style” problem.IASA Denver is an amazing community and a real example of how a professional group should be run. Many thanks to Paul, Kevin and Tim for starting and leading such an amazing group. If you’re in CO, consider yourself an architect and aren’t an IASA Denver member, you’re missing out.

If you’re interested, I’ve posted the slides from my talk at SlideShare and have embedded them below. You can also get the slide deck and the code from both of my demos at http://github.com/bsatrom/WorkflowSystems

 

 

Now to continue a productive week in CO with the Thought Ascent crew!

Tags: , , ,

architecture | iasa | masstransit | wf | workflow

Workflow Systems: Myths, Truths and Wishful Thinking – Speaking at IASA Denver on Sept. 21st

by bsatrom September 04, 2009 20:31

In a couple of weeks, I’ll be heading back up to Colorado to do some planning and brainstorming with the Thought Ascent HQ guys and also to speak at the Denver chapter of IASA.

The topic: Workflow Systems.

I spoke at the RMTT back in February about Workflow, specifically Windows Workflow 3.5 (you can still find the slides and code here, btw).

This talk will be nothing like that one.

Different audience, different goals.

Here’s the abstract if you don’t believe me:

Workflow Systems: Myths, Truths and Wishful Thinking


"If workflow is simply about the coordination of work, why is it such a point of contention for most technologists? Do Workflow systems really enable a Business Analyst to change a production process, or are they a waste of time and resources, not to mention a problem that a solid developer could solve with a hundred lines of code? The goal of this talk is to demystify the idea of "workflow," and to discuss what place, if any, a Workflow system might have in your problem domain. We'll discuss Workflow Systems by example with Microsoft's Workflow Foundation tools (3.x and 4.0) and explore popular, low-ceremony options for doing "workflow" (NServiceBus, MassTransit, etc). We'll end the session with an open discussion on workflow tools and collaboratively craft some tactical recommendations on when and why to use workflow in your organization."

So not so much about WF as it is about Workflow in general. The aspects that are about WF don’t make the assumption that WF is a useful tool, or even a good solution, hence the time spent on other options like NServiceBus and MassTransit.

Look for the slides and code to be posted here shortly before or after the talk, along with a couple of follow-up posts (perhaps even a series) that will dive deeper into the main points from my talk.

And if you’re in Colorado, I hope to see you there (click here for meeting details, times and a map)!

Tags: , , , , ,

masstransit | nservicebus | saga | service | speaking | wf

The Future of Work and Workflow - RMTT Slides and Code Samples

by bsatrom February 23, 2009 19:02

Well, the Rocky Mountain Tech Trifecta has come and gone, and I think the event was a big success. There was a great turnout, and some really useful sessions.

I was pleased to have a full house in my WF talk, and I hope that it was a useful time for those that chose to listen to me drone over the other available options. There was some good interaction and good questions, both during and after the talk.

If you were there, I'd love to hear your feedback, good or bad. I can take, and I'm always looking for tips on how a technical talk can be more useful. If you have unabashed praise, I like that too.

If you would like to have the slides, I've embedded those below, or you can download them here. I have some notes of many of the slides if you're interested in more detail than I shared in the presentation. There are also a few slides at the end on .NET 4.0 improvements to WF that I didn't get to during the talk.

If you would like the code and demos I used during the presentation, you can find everything in a single Zip here. Most everything you need to run the demos should be here, but you will need to create the persistence and tracking databases if you want to use those pieces. Also, you'll need to have MSMQ installed and running on whichever machine you plan to use for these demos. There's a Powershell script to create the queues in the ConsoleWorkflowServiceHost project if you want to try out the MSMQ features.

There's also some unit tests if you want to try things out independent of the web app. You'll need to stage some data, but that's pretty easy. You'll notice that I also added a Test file to test the Custom WF activities I created for this demo separate from the WF itself. This is something I only mentioned in passing in the talk, but it's worth checking out as it's a useful way to really test your custom activities.

If anything else is gnarly, feel free to drop me a comment here or an email and I'd be happy to help you out.

Tags: , , ,

net | rmtt | speaking | wf

Debugging Workflows: WF Tracing - When Nothing Else Works, Try This...

by bsatrom February 17, 2009 01:02

If you've spent any time with Windows Workflow Foundation, you probably know that every possible thing you can do to enable logging and tracing of your workflows at runtime (Tracking, logging, Tracing) can save your butt when you just can't seem to find out why the heck your workflow is sitting idle after you've just thrown a few hundred concurrent requests at it.

Tracking is pretty well documented, and I would highly recommend it, along with a Monitoring tool that gives you a view into tracking results without needing to write queries against the tracking DB (I'll cover some minor enhancements I made to this tool in another post). Not that it's really that difficult, it's just not worth your time to figure out the ins and outs of the Tracking DB schema when Microsoft plans to greatly enhance it in .NET 4.0. (along with providing Tracking data views in IIS, which will be fantastic.)

Logging, whether via Enterprise Library or another tool like Log4Net, is also pretty well documented. If you're using Workflow Services, you'd also be wise to use Service logging as another source for Workflow forensics. This is also well documented.

Tracing, on the other hand -- which I consider to be the last line of defense when WF Runtime seems fine, Tracking data is clean, but the WF isn't completing as expected and/ or you're seeing intermittent socket exceptions in the svclogs -- is not so well documented. Perhaps this is because it need not be documented as it is simple and I am daft.

In any case, I thought it might be helpful to expound upon a few of the entries I have seen regarding Workflow Tracing.

When I first looked into adding tracing to my Workflow Host, I found several articles that recommended the following code in config:

   1:  <configuration>
   2:    <system.diagnostics>
   3:      <switches>
   4:        <add name="System.Workflow LogToTraceListeners" value="1" />
   5:        <add name="System.Workflow.Runtime.Hosting" value="Verbose" />
   6:        <add name="System.Workflow.Runtime" value="Verbose" />
   7:        <add name="System.Workflow.Runtime.Tracking" value="Verbose" />
   8:        <add name="System.Workflow.Activities" value="Verbose" />
   9:        <add name="System.Workflow.Activities.Rules" value="Verbose" />
  10:      </switches>
  11:    </system.diagnostics>
  12:  </configuration>

 

I found one example of this on MSDN. The guidance is spot on, but it is missing a few lines that I think would be helpful for a developer at his or her wits end with WF who is just trying to get logging up and running. It goes without saying that "LogToTraceListeners" assumes that one or more trace listeners already exist in your config. They don't exactly tell you that, do they? What's more, the self-contained config above would lead one to believe that you're all set this with this block of code.

Not so. At bare minimum, you'll need to add at least one of the listeners below (unless you wanted to use the EventLog listener, but you get the idea):  

   1:  <system.diagnostics>
   2:      <switches>
   3:        <add name="System.Workflow LogToTraceListeners" value="1" />
   4:        <add name="System.Workflow.Runtime" value="Error"/>
   5:        <add name="System.Workflow.Runtime.Hosting" value="Error"/>
   6:        <add name="System.Workflow.Runtime.Tracking" value="Error"/>
   7:        <add name="System.Workflow.Activities" value="Error"/>
   8:        <add name="System.Workflow.Activities.Rules" value="Off"/>
   9:      </switches>
  10:      <trace autoflush="true">
  11:        <listeners>
  12:          <add name="ConsoleTraceListener" 
                    type="System.Diagnostics.ConsoleTraceListener" />
  13:          <add name="TextWriterTraceListener" 
                    type="System.Diagnostics.TextWriterTraceListener" 
                    initializeData="System.Workflow.Trace.log" 
                    traceOutputOptions="DateTime" />
  14:        </listeners>
  15:      </trace>
  16:    </system.diagnostics>

Obvious? Maybe, but it's easy to miss in a rush. If that's you, I hope this helped.

You might find that adding those two lines did nothing to fix your issue, in which case I might have something else for you to try. I' have seen in some cases where listeners are already set up for other parts of the system (WCF logging, for example) that the code above still won't work. If that's you, try this:

   3:    <sources>
   4:      <source name="System.Workflow">
   5:        <listeners>
   6:          <add name="System.Workflow" />          
   7:        </listeners>
   8:      </source>
   9:      <source name="System.Workflow.Runtime">
  10:          <listeners>
  11:            <add name="System.Workflow" />
  12:          </listeners>
  13:        </source>
  14:        <source name="System.Workflow.Runtime.Hosting">
  15:          <listeners>
  16:            <add name="System.Workflow" />
  17:          </listeners>
  18:        </source>
  19:        <source name="System.Workflow.Runtime.Tracking">
  20:          <listeners>
  21:            <add name="System.Workflow" />
  22:          </listeners>
  23:        </source>
  24:        <source name="System.Workflow.Activities">
  25:          <listeners>
  26:            <add name="System.Workflow" />
  27:          </listeners>
  28:        </source>
  29:    </sources>
  30:    <sharedListeners>
  31:      <add name="System.Workflow" 
                type="System.Diagnostics.TextWriterTraceListener" 
                initializeData="c:\logs\System.Workflow.trace.log"  
                traceOutputOptions="DateTime" />
  32:    </sharedListeners>
  33:    <switches>
  34:      <add name="System.Workflow.Runtime" value="Error" />
  35:      <add name="System.Workflow.Runtime.Hosting" value="Error" />
  36:      <add name="System.Workflow.Runtime.Tracking" value="Error" />
  37:      <add name="System.Workflow.Activities" value="Error" />
  38:      <add name="System.Workflow.Activities.Rules" value="Off" />
  39:    </switches>          

Notice that live 4 in the first example is nowhere to be found here. I found I didn't need it. You'll also note that I had to add a source and listener for each Namespace in System.Workflow that I wanted to trace. I can't say why this works in cases where existing sources cause the "LogToTraceListeners" switch to hit the fritz, but I thought it was worth sharing. If it gets you our of a jam, then I'm happy to have shared it.

Tags: , ,

wf | workflow

The Future of Work and Workflow - Speaking at the Rocky Mountain Tech Trifecta on Feb. 21st

by bsatrom February 06, 2009 19:02

If you've read this blog for any length of time where I've posted regularly, you'll know that I'm a pretty big wonk for composition, Composite Apps and all things assembled and reused over coding from scratch.

So it should be no surprise that I'm quite a fan of Windows Workflow Foundation (WF), the Chico Marx of the .NET Framework, underappreciated for it's elegance, simplicity and power to fundamentally change the way that applications are built in the future. Wait, that last part doesn't quite apply to a lesser-known Marx brother, but you get the idea.

I've been interested in WF (If you hear me speak about it, notice that I will never, ever call it "Dub-F." Can't do it.) from the beginning, and have spent the last four months swimming in the deep end with WF, building some key pieces of an integration layer for a payment processing system that Thought Ascent has been working on for some time. Over that time, I've discovered that WF really does have all of the potential I suspected it did, and then some.

WF is a platform that will change the way we look at building applications, and I think that WF is a great example of the kinds of technologies that will move us closer and closer to true composition of applications over the next 5-7 years. Of course, being a Workflow platform released in concert with a universal framework for building connected systems (WCF) and the UI framework of the future (WPF) sort of makes Workflow Foundation like the third member of Destiny's Child. Those other technologies were game changers from day one. WF has an uphill battle to fight for recognition and adoption, but I believe it's the game changer of the future.

Not that it's being ignored, I just think it's been undervalued in the past, typically met with comments from developers and architects like "I get how it works, I just don't see what it's for"or "what does this give me that I can't do myself with code?"

But I see that tone changing, with Microsoft putting a better and better case around Workflow though integration with key technologies, along with richer complimentary services and tighter integrations with WCF.

So why am I telling you all this?

As you may or may not know, the Rocky Mountain Tech Trifecta is coming up in Denver on February 21st. This event will bring together several experts in the world of .NET, SQL and Windows, along with a few wannabees like myself who will present on just about anything you could hope to hear about in a developers conference. And there will be some heavy hitters to be sure: Scott Hanselman, Paul Neilsen, Rob Bagby and others. I'm not worthy...

If you hadnt't guessed from the first paragraphs of this post, I'll be speaking on Windows Workflow Foundation. Here's the abstract for the talk:

The Future of Work and Workflow

Since .NET 3.0, Windows Workflow Foundation (WF) has lived in the shadow of its flashy framework companions WCF and WPF. Yet from the start WF has been, at its core, about new ways of creating durable applications and composable units of work, both of which have the potential to change the way that developers assemble solutions. In this talk, Brandon will cover some of the highlights and recent enhancements to WF (Creating workflow services with WCF and WF, Workflow Persistence and Tracking), tips and tricks for advanced workflow scenarios (using MSMQ with workflow services, custom activities, etc.), and a preview of some upcoming Workflow features in the 4.0 Framework.

If you're close to Denver and haven't signed up yet, you can sign up at www.rmtechtrifecta.com. And if you're planning on coming, drop me a line. It should be a fun day.

And if you're not planning on coming, look for slides and code here over the next few weeks.

Tags: , ,

architecture | speaking | wf | workflow

Why every good site needs content workflow

by bsatrom August 25, 2005 01:08

Here's an interesting image from Channel 9 at MSDN. On the second page, you'll see a talk by Anders Hejlsberg entitled "Programming data in C# 3.0." The image has since changed, but here is the original: conotentass.jpg I think it speaks volumes about how lack of content workflow means laughs for the rest of the world. Especially when the Evil Empire is involved. Channel9, CM, workflow

Tags: ,

saga | wf

Powered by BlogEngine.NET 1.6.0.0
Theme by Mads Kristensen | Modified by Mooglegiant

About me

I am a Developer Evangelist for Microsoft, President of IASA Austin, and a software developer interested in agile, architecture, craftsmanship, ddd and a variety of other topics. Join me as I explore them here.