Invoking Workflows With WorklfowInvoker In WF4.0

WF4.0 provides a lightweight process for invoking workflows. One of the limitations of WF3.x was the overhead that was inherited when executing workflows. "WorkflowInvoker.Invoke" opens the door for inherited benefits and functionality for building business logic through Windows Workflow Foundation. WorkflowInvoker makes it as simple as calling a method for processing workflows synchronous. Take the below flowchart workflow. Flowchart workflows is a new style of workflows introduced in WF4.0, however the concept of flowchart workflows in general match the way we design software, making the learning curve of building them trivial.

This workflow determines of someone is old enough to do "x", by determining if someone is older than 21.

We can process this workflow very easily by calling the below code and taking advantage of WorkflowInvoker.

Now we can write business logic visually instead of plain old code and calling it just like any other method!

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: BayerWhite
Posted on: 2/27/2010 at 8:14 AM
Actions: E-mail | Kick it! | DZone it! |
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed
Comments are closed