Windows Server AppFabric / Workflow Services Demo - Contoso HR

This sample demonstrates how you can use a Windows Workflow Foundation (WF4) Workflow Service and Windows Server AppFabric to construct a long running business process.

C# (6.3 MB)
 
 
 
 
 
4.9 Star
(8)
6,145 times
Add to favorites
12/3/2011
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

C#
<Activity mc:Ignorable="sap" x:Class="HRApplicationServices.Activities.ScreenEducation" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mv="clr-namespace:Microsoft.VisualBasic;assembly=System" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:s1="clr-namespace:System;assembly=System" xmlns:s2="clr-namespace:System;assembly=System.Xml" xmlns:s3="clr-namespace:System;assembly=System.Core" xmlns:s4="clr-namespace:System;assembly=System.ServiceModel" xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities" xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=System" xmlns:scg1="clr-namespace:System.Collections.Generic;assembly=System.ServiceModel" xmlns:scg2="clr-namespace:System.Collections.Generic;assembly=System.Core" xmlns:scg3="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sd="clr-namespace:System.Data;assembly=System.Data" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:st="clr-namespace:System.Text;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="Education" Type="InArgument(x:String)" />
    <x:Property Name="EducationPassed" Type="OutArgument(x:Boolean)" />
  </x:Members>
  <sap:VirtualizedContainerService.HintSize>654,676</sap:VirtualizedContainerService.HintSize>
  <mva:VisualBasic.Settings>Assembly references and imported namespaces for internal implementation</mva:VisualBasic.Settings>
  <Flowchart sad:XamlDebuggerXmlReader.FileName="C:\pe\Content\Labs\NETFX4\IntroToWFServices\Source\Ex3\End\CS\HRApplicationServices.Activities\ScreenEducation.xaml" sap:VirtualizedContainerService.HintSize="614,636">
    <sap:WorkflowViewStateService.ViewState>
      <scg3:Dictionary x:TypeArguments="x:String, x:Object">
        <x:Boolean x:Key="IsExpanded">False</x:Boolean>
        <av:Point x:Key="ShapeLocation">270,2.5</av:Point>
        <av:Size x:Key="ShapeSize">60,75</av:Size>
        <av:PointCollection x:Key="ConnectorLocation">300,77.5 300,102.5</av:PointCollection>
      </scg3:Dictionary>
    </sap:WorkflowViewStateService.ViewState>
    <Flowchart.StartNode>
      <FlowDecision x:Name="__ReferenceID0" Condition="[String.IsNullOrWhiteSpace(Education)]" sap:VirtualizedContainerService.HintSize="60,75">
        <sap:WorkflowViewStateService.ViewState>
          <scg3:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">270,102.5</av:Point>
            <av:Size x:Key="ShapeSize">60,75</av:Size>
            <av:PointCollection x:Key="TrueConnector">270,140 110,140 110,159</av:PointCollection>
            <av:PointCollection x:Key="FalseConnector">330,140 360,140 450,140</av:PointCollection>
          </scg3:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <FlowDecision.True>
          <FlowStep x:Name="__ReferenceID1">
            <sap:WorkflowViewStateService.ViewState>
              <scg3:Dictionary x:TypeArguments="x:String, x:Object">
                <av:Point x:Key="ShapeLocation">10,159</av:Point>
                <av:Size x:Key="ShapeSize">200,22</av:Size>
              </scg3:Dictionary>
            </sap:WorkflowViewStateService.ViewState>
            <Throw DisplayName="Throw ArgumentNull" Exception="[New ArgumentNullException(&quot;Education&quot;)]" sap:VirtualizedContainerService.HintSize="200,22" />
          </FlowStep>
        </FlowDecision.True>
        <FlowDecision.False>
          <FlowSwitch x:TypeArguments="x:String" x:Name="__ReferenceID2" Expression="[Education]" sap:VirtualizedContainerService.HintSize="60,75">
            <FlowSwitch.Default>
              <FlowStep x:Name="__ReferenceID3">
                <sap:WorkflowViewStateService.ViewState>
                  <scg3:Dictionary x:TypeArguments="x:String, x:Object">
                    <av:Point x:Key="ShapeLocation">39,221</av:Point>
                    <av:Size x:Key="ShapeSize">242,58</av:Size>
                  </scg3:Dictionary>
                </sap:WorkflowViewStateService.ViewState>
                <Assign sap:VirtualizedContainerService.HintSize="242,58">
                  <Assign.To>
                    <OutArgument x:TypeArguments="x:Boolean">[EducationPassed]</OutArgument>
                  </Assign.To>
                  <Assign.Value>
                    <InArgument x:TypeArguments="x:Boolean">False</InArgument>
                  </Assign.Value>
                </Assign>
              </FlowStep>
            </FlowSwitch.Default>
            <sap:WorkflowViewStateService.ViewState>
              <scg3:Dictionary x:TypeArguments="x:String, x:Object">
                <av:Point x:Key="ShapeLocation">450,102.5</av:Point>
                <av:Size x:Key="ShapeSize">60,75</av:Size>
                <av:PointCollection x:Key="Default">465,177.5 465,250 281,250</av:PointCollection>
                <av:PointCollection x:Key="MastersConnector">480,177.5 480,320 301,320</av:PointCollection>
                <av:PointCollection x:Key="DoctorateConnector">510,140 532,140 532,390 321,390</av:PointCollection>
              </scg3:Dictionary>
            </sap:WorkflowViewStateService.ViewState>
            <FlowStep x:Key="Masters" x:Name="__ReferenceID4">
              <sap:WorkflowViewStateService.ViewState>
                <scg3:Dictionary x:TypeArguments="x:String, x:Object">
                  <av:Point x:Key="ShapeLocation">59,291</av:Point>
                  <av:Size x:Key="ShapeSize">242,58</av:Size>
                </scg3:Dictionary>
              </sap:WorkflowViewStateService.ViewState>
              <Assign sap:VirtualizedContainerService.HintSize="242,58">
                <Assign.To>
                  <OutArgument x:TypeArguments="x:Boolean">[EducationPassed]</OutArgument>
                </Assign.To>
                <Assign.Value>
                  <InArgument x:TypeArguments="x:Boolean">True</InArgument>
                </Assign.Value>
              </Assign>
            </FlowStep>
            <FlowStep x:Key="Doctorate" x:Name="__ReferenceID5">
              <sap:WorkflowViewStateService.ViewState>
                <scg3:Dictionary x:TypeArguments="x:String, x:Object">
                  <av:Point x:Key="ShapeLocation">79,361</av:Point>
                  <av:Size x:Key="ShapeSize">242,58</av:Size>
                </scg3:Dictionary>
              </sap:WorkflowViewStateService.ViewState>
              <Assign sap:VirtualizedContainerService.HintSize="242,58">
                <Assign.To>
                  <OutArgument x:TypeArguments="x:Boolean">[EducationPassed]</OutArgument>
                </Assign.To>
                <Assign.Value>
                  <InArgument x:TypeArguments="x:Boolean">True</InArgument>
                </Assign.Value>
              </Assign>
            </FlowStep>
          </FlowSwitch>
        </FlowDecision.False>
      </FlowDecision>
    </Flowchart.StartNode>
    <x:Reference>__ReferenceID0</x:Reference>
    <x:Reference>__ReferenceID1</x:Reference>
    <x:Reference>__ReferenceID2</x:Reference>
    <x:Reference>__ReferenceID3</x:Reference>
    <x:Reference>__ReferenceID4</x:Reference>
    <x:Reference>__ReferenceID5</x:Reference>
  </Flowchart>
</Activity>