Welcome to Windows Workflow Foundation (WF)
Top Tasks :

WF Team Bloggers

Browse by Tags

All Tags » activities   (RSS)

  • Activities Survey

    So, we're getting close to .NET 3.5 getting out the door, and as always we're thinking about what comes next.  The activities team is looking how to make activities better going forward, and they are very interested in what you have to say, how you have been using them and how you'd like to use them. This feedback will help us understand how to shape the future of things and how we should think about the pain points you are experiencing. Fill survey out here! Read More...
  • Implementing the N of M Pattern in WF

    The second in my series of alternate execution patterns ( part 1 ) I recently worked with a customer who was implementing what I would call a "basic" human workflow system. It tracked approvals, rejections and managed things as they moved through a customizable process. It's easy to build workflows like this with an Approval activity, but they wanted to implement a pattern that's not directly supported out of the box. This pattern, which I have taken to calling "n of m", is also referred to as a " Canceling partial join for multiple instances " in the van der Aalst taxonomy. The basic description of this pattern is that we start m concurrent actions, and when some subset of those, n, complete, we can move on in our process and cancel the other concurrent actions. A common scenario for this is where I want to send a document for approval to 5 people, and when 3 of them have approved it, I can move on. This comes up frequently in human or task-based workflows. There are a couple of "business" questions which have to be answered as well, the implementation can support any set of answers for this: What happens if an individual rejects? Does this stop the whole group from completing, or is it simply noted as a "no" vote? How should delegation be handled? Some business want this to break out from the approval process at this point. The first approach the customer took was to use the ConditionedActivityGroup (CAG). The CAG is probably one of the most sophisticated out of the box activities Read More...
  • Different Execution Patterns with WF (or, Going beyond Sequential and State Machine)

    How do I do this? A lot of times people get stuck with the impression that there are only two workflow models available: sequential and state machine. True, out of the box these are the two that are built in, but only because there are is a set of common problems that map nicely into their execution semantics. As a result of these two being "in the box," I often see people doing a lot of very unnatural things in order to fit their problem into a certain model. The drawing above illustrates the flow of one such pattern. In this case, the customer wanted parallel execution with two branches ((1,3) and (2,5)). But, they had an additional factor that played in here, 4 could execute, but it could only execute when both 1 and 2 had completed. 4 didn't need to wait for 3 and 5 to finish, 3 and 5 could take a long period of time, so 4 could at least start once 1 and 2 were completed. Before we dive into a more simple solution, let's look at some of the ways they tried to solve the problem, in an attempt to use "what's in the box." The "While-polling" approach The basic idea behind this approach is that we will use a parallel activity, and in the third branch we will place a while loop that loops on the condition of "if activity x is done" with a brief delay activity in there so that we are not busy polling. What's the downside to this approach: The model is unnatural, and gets more awkward given the complexity of the process (what do we do if activity 7 has a dependency on 4 and 5) The Read More...
  • Dynamically Generating an Operation Contract in Orcas using WF

    This kicks off a set of posts where I'll be discussing some of the interesting features coming out in Orcas. I want to focus on this post on the Receive Activity, and a nice little feature in the designer that lets you create a contract on the fly, without having to drop into code and write a decorated interface. This allows us to divide the world into two approaches: One where I design my contract first, and then start creating a workflow to implement the operations on the contract. Design my workflow first, and have it figure out the contract for me (this is what I will focus on in more detail) Designing a Contract First This is what most WCF folks will be familiar with: [ServiceContract] public interface IOrderProcessing { [OperationContract] bool SubmitOrder(Order order); [OperationContract] Order[] GetOrders( int customerId); } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } When I drop a receive activity Read More...
  • Mechanical Turk Activities

    Mark Blomsma has put together some activities and an article which shows how to interact with Amazon's Mechanical Turk with WF activities. I've linked to the sample on here. Cool, cool, cool Read More...

Copyright © 2006 Microsoft Corporation. All Rights Reserved. | Terms of Use | Privacy Statement | Contact Us