Integrating Integrators – BizTalk, Windows Azure, Windows Workflow, and Beyond

January, 2010

Windows Workflow

This is the top level group for Microsoft Windows Workflow Foundation. Find blogs, samples, videos, and learning resources for various versions of workflow including 3.0, 3.5, and 4.0 here.

Windows Workflow Community Blogs via Syndication

Windows Workflow Foundation related bloggers. All content is property of the original blog owner.
  • Windows Workflow Community Blogs via Syndication

    Workflow Foundation 4.0 Activity Model (II)

    In previous post I introduced WF 4's Activity model. In this section, I'm going to use 2 samples to demo 4 styles to create a custom Activity . How to build a leaf activity – HttpGet Today HTTP based RESTful services are getting popular, so it might be useful to perform some basic HTTP operations in workflow . Now let’s try to build one simple Activity to grab some data from a web service using HTTP GET request. Code it up First let’s pick a base activity class to implement. This is a leaf...
  • Windows Workflow Community Blogs via Syndication

    About type coercion

    The hosted compiler does something called type coercion. It converts one type to another type using the widening and narrowing conversions specified by the big VB compiler. On the whole, this is very useful functionality. It allows you to strongly type your arguments but still set your Int16 variable to 5 or your string variable to Nothing. Type coercion is especially important for delegate types and lambda expressions. When the compiler encounters a lambda expression, it infers its type as an anonymous...
  • Windows Workflow Community Blogs via Syndication

    Expression serialization and literal support

    Expressions created in the WF designer are serialized using square brackets, which is shorthand for VisualBasicValue <T> or VisualBasicReference <T>. For example, drop a WriteLine activity into a Workflow, and set its text to the expression (1+2).ToString (in VB you can omit the brackets after the ToString). Save your workflow, open it in XAML view ( F7 is your friend ). You see the following XAML: < WriteLine Text ="[(1 + 2).ToString]" /> Now not all text that you enter...
  • Windows Workflow Community Blogs via Syndication

    Workflow Foundation 4.0 Activity Model (I)

    Workflow as Activities If you have programmed with Windows Workflow Foundation (WF) , you should be very familiar with Activities . In WF , programs are defined by a tree of Activities . Some Activities are used to control the flow of program, like Sequence , If , and While ; some Activities perform specific actions, like Assign , InvokeMethod and WriteLine ; some could communicate with external systems, like Send and Receive . For example this is a simple workflow: Figure 1. A simple "toss...
  • Windows Workflow Community Blogs via Syndication

    Women in technology at PDC09

    When I was at PDC I spent some time with Ed and Ashley of Ed and Ashley’s 5 minute show . They have a video blog with a number of interviews they have conducted with women in the technology. I spoke with them about mentoring, and the clip was recently posted. See Episode 57, Cathy Dumas (PDC09) . Upshot: mentoring works, it retains women in high tech, start early in your career, have goals in mind, mentor often. I talked about an outreach program started by Erin Chapple ( see her video ) where mentees...
  • Windows Workflow Community Blogs via Syndication

    End-to-end expression editing feature deck

    Hi, today I gave a talk to our support team about the expression editing feature. Since this is all public facing information, I thought I would post the deck. Some of this information is old hat to regular readers of this blog (especially the overview and programmability bits, which I ported straight from previous blog entries). However there is plenty of new information in there about serialization, literals, assembly loading, namespace management, imports designer. VisualBasic.Settings, and type...
  • Windows Workflow Community Blogs via Syndication

    Windows Workflow 4.0 – Workflow Instance Extensions

    Update 01/20/2009: Since I failed to mention this before I wanted to make something clear about these workflow posts. All information in these posts is based on the knowledge I gained through developing a framework based on Windows Workflow 4.0. I am not a member of the team nor is this information in any way endorsed by the team. In the previous posts we covered one way you could implement a producer-consumer pattern in workflow. This approach used composition and attempted to hide the complexities...
  • Windows Workflow Community Blogs via Syndication

    Dev-BA Collaboration:Part-3

    Scenario: A BA starts with the Workflow authoring using the Re-hosted workflow designer and the Toolbox activities provided in the palette. At some point, the BA figures out that the Toolbox doesn't contain an activity that he is looking for. Only option that the BA has for him is to work offline with the Dev to add such an activity to the Toolbox palette. Loss of considerable amount of time, every time the BA figures out that the activity he needs is not present. Wouldn't it be nice, if...
  • Windows Workflow Community Blogs via Syndication

    Enter and Tab key handling in the ExpressionTextBox

    The Enter and Tab keys work a bit differently in the ExpressionTextBox than in the big VB IDE. In the big IDE, Enter and Tab always insert their associated characters. If the IntelliSense completion list is up, Enter selects the item and inserts a new line. We noticed that big IDE behavior does not always make sense in a single line editor. We found that users expected the ExpressionTextBox to behave exactly as a TextBox, especially in the property grid. So we changed the handling of the Tab and...
  • Windows Workflow Community Blogs via Syndication

    Dev-BA Collaboration:Part-2

    In the series, the next question we generally get is, How about Validations. How can I have one set of validations for Devs in VS only and another set for BAs in a non-VS environment. To demonstrate that, again I have developed it on top of the sample application we saw in the previous post. In here, to know that I am in the VS environment, I am assuming that the designer used would be from CustomActivities.VisualStudio.Design.dll. Next, I override OnModelItemChanged and set the property for the...
  • Windows Workflow Community Blogs via Syndication

    Making Swiss Cheese Look Good, or Designers for ActivityAction in WF4

    In my last post , I covered using ActivityAction in order to provide a schematized callback, or hole, for the consumers of your activity to supply.  What I didn’t cover, and what I intend to here, is how to create a designer for that. If you’ve been following along, or have written a few designers using WorkflowItemPresenter, you may have a good idea how we might go about solving this.  There are a few gotcha’s along the way that we’ll cover as we go through this. First, let’s familiarize...
  • Windows Workflow Community Blogs via Syndication

    Dev-BA Collaboration:Part-1

    One of the selling points with Workflows is customers have been able to customize the Workflows and can have a collaborative work between the BAs and Developers. BAs define the business process using the Re-hosted Workflow designer and the dev fine tunes/completes the implementation by taking the Workflow file in VS and editing it as appropriate. In that context, the very first question that generally comes is, for a particular activity, how can we have a specific designer for BA and a different...
  • Windows Workflow Community Blogs via Syndication

    Least discoverable feature: 100% zoom and fit to screen

    There are a whole bunch of buttons in the bottom right hand corner of the workflow designer. Here they are: The magnifying glass to the left of the zoom combo box changes the zoom level of the workflow designer to 100%. (Yes this really is a button.) The button to the right of the combo box fits the contents of the current breadcrumb root to your screen. By clicking the magnifying glass, you can easily remove the effect of clicking the Fit to screen button. The final button is for the overview map...
  • Windows Workflow Community Blogs via Syndication

    A developer’s view of Workflow

    A new programming language Windows Workflow Foundation (WF) 4.0 offers many features to simplify business application development, deployment and management. In this post I’d like to explore workflow from a developer’s angle as a new programming language. WF has a lot of “new” features compared to mainstream industry languages like C\C++\Java\C#\VB. As a developer, I personally appreciate the below ones the most: 1.        Fully declarative programming model 2.       ...
  • Windows Workflow Community Blogs via Syndication

    Least discoverable feature: Workflow designer keyboard shortcuts

    The Workflow designer, like any good Visual Studio component, has many keyboard shortcuts. We are documenting these shortcuts in the MSDN documentation (I’ll post when the docs are available*), but I thought I’d list them here so that they’re available for you to use now. Shortcut Purpose Ctrl+E, A Shows or hides the Argument Designer. Ctrl+E, C Collapses the selected activity in place. Ctrl+E, E Expands the selected activity in place. Ctrl+E, F Connects the selected activities in a flowchart. Ctrl...
  • Windows Workflow Community Blogs via Syndication

    Windows Workflow 4.0 – CopyDirectory (Part 3 of 3)

    So far we have written ParallelItemScheduler<T> , which is a generic activity that goes dormant and schedules actions based on input via bookmark resumption. We then used this activity to design ProducerConsumer<T> , which takes this idea a little further and provides a generic mechanism for running a producer thread that can pump data into a consumer thread. In the last part of this series we finally have all required building blocks to design our highly efficient and parallel copy directory...
  • Windows Workflow Community Blogs via Syndication

    Least discoverable feature: F7 and Shift+F7 to toggle code view

    In this episode, we turn to the project system. The Workflow Designer, unlike Cider (the WPF editor), does not have a side-by-side design/code view. If you want to close the designer and view the XAML for the workflow, you must close and reopen the document. You will have to live with this for Dev10. It’s kind of a pain to do this via context menu from the Solution Explorer. Fortunately, there is a keyboard shortcut. When in design view, pressing F7 takes you to the code view. When in code view,...
  • Windows Workflow Community Blogs via Syndication

    Windows Workflow 4.0 – CopyDirectory (Part 2 of 3)

    In my previous post I introduced you to NativeActivity and walked through the design and implementation of a class named ParallelItemScheduler<T> . In part 2 of this series we will be utilizing the aforementioned activity to build a new composed activity named ProducerConsumer<T> . Once we have completed this task we will have a framework for building our final activity, CopyDirectory . Building Activities Through Composition Unlike the previous activity, the ProducerConsumer<T>...
  • Windows Workflow Community Blogs via Syndication

    Windows Workflow 4.0 – CopyDirectory (Part 1 of 3)

    In my last couple of posts I have lead you through some basic introduction to workflow as well as a real world example of how to implement a cancelable CopyFile activity. The next thing I would like to do is dive into a much more involved example utilizing the previous activity. The purpose of this post is to introduce the class NativeActivity , since we will need to implement a custom activity for driving the consumers. We will also be working toward using our producer-consumer activity to eventually...
  • Windows Workflow Community Blogs via Syndication

    Workflow Toolbar and Customizations

    In the re-hosted scenario, as part of customizations that domain specific users want – we have been asked many times as to how can we not show the toolbar at the bottom of the designer or show only specific items in that toolbar? Internally we refer to it as the Shellbar as well and the API to go about customizing the toolbar is: this .wd.Context.Services.GetService<DesignerView>().WorkflowShellBarItemVisibility = ShellBarItemVisibility.None; The ShellBarItemVisibility is a enumeration where...
Page 1 of 2 (25 items) 12