<Activity x:Class="XrmWorkflow0ccae932b6c047b4ab2ad28454768f3a" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" xmlns:mxs="clr-namespace:Microsoft.Xrm.Sdk;assembly=Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" xmlns:mxsq="clr-namespace:Microsoft.Xrm.Sdk.Query;assembly=Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" xmlns:mxswa="clr-namespace:Microsoft.Xrm.Sdk.Workflow.Activities;assembly=Microsoft.Xrm.Sdk.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" xmlns:s="clr-namespace:System;assembly=mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" xmlns:srs="clr-namespace:System.Runtime.Serialization;assembly=System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" xmlns:this="clr-namespace:" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="InputEntities" Type="InArgument(scg:IDictionary(x:String, mxs:Entity))" />
    <x:Property Name="CreatedEntities" Type="InArgument(scg:IDictionary(x:String, mxs:Entity))" />
  </x:Members>
  <this:XrmWorkflow0ccae932b6c047b4ab2ad28454768f3a.InputEntities>
    <InArgument x:TypeArguments="scg:IDictionary(x:String, mxs:Entity)" />
  </this:XrmWorkflow0ccae932b6c047b4ab2ad28454768f3a.InputEntities>
  <this:XrmWorkflow0ccae932b6c047b4ab2ad28454768f3a.CreatedEntities>
    <InArgument x:TypeArguments="scg:IDictionary(x:String, mxs:Entity)" />
  </this:XrmWorkflow0ccae932b6c047b4ab2ad28454768f3a.CreatedEntities>
  <mva:VisualBasic.Settings>Assembly references and imported namespaces for internal implementation</mva:VisualBasic.Settings>
  <mxswa:Workflow>
    <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.Composite, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="StageStep7: Type a stage description here.">
      <mxswa:ActivityReference.Properties>
        <sco:Collection x:TypeArguments="Variable" x:Key="Variables" />
        <sco:Collection x:TypeArguments="Activity" x:Key="Activities">
          <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.ConditionSequence, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="ConditionStep1: Check if Facility contains data,">
            <mxswa:ActivityReference.Arguments>
              <InArgument x:TypeArguments="x:Boolean" x:Key="Wait">False</InArgument>
            </mxswa:ActivityReference.Arguments>
            <mxswa:ActivityReference.Properties>
              <sco:Collection x:TypeArguments="Variable" x:Key="Variables">
                <Variable x:TypeArguments="x:Boolean" Default="False" Name="ConditionBranchStep2_condition" />
                <Variable x:TypeArguments="x:Object" Name="ConditionBranchStep2_1" />
                <Variable x:TypeArguments="x:Boolean" Default="False" Name="ConditionBranchStep4_condition" />
                <Variable x:TypeArguments="x:Object" Name="ConditionBranchStep4_1" />
              </sco:Collection>
              <sco:Collection x:TypeArguments="Activity" x:Key="Activities">
                <mxswa:GetEntityProperty Attribute="bah_facilityid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="bah_interactions" Value="[ConditionBranchStep2_1]">
                  <mxswa:GetEntityProperty.TargetType>
                    <InArgument x:TypeArguments="s:Type">
                      <mxswa:ReferenceLiteral x:TypeArguments="s:Type">
                        <x:Null />
                      </mxswa:ReferenceLiteral>
                    </InArgument>
                  </mxswa:GetEntityProperty.TargetType>
                </mxswa:GetEntityProperty>
                <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.EvaluateCondition, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="EvaluateCondition">
                  <mxswa:ActivityReference.Arguments>
                    <InArgument x:TypeArguments="mxsq:ConditionOperator" x:Key="ConditionOperator">NotNull</InArgument>
                    <x:Null x:Key="Parameters" />
                    <InArgument x:TypeArguments="x:Object" x:Key="Operand">[ConditionBranchStep2_1]</InArgument>
                    <OutArgument x:TypeArguments="x:Boolean" x:Key="Result">[ConditionBranchStep2_condition]</OutArgument>
                  </mxswa:ActivityReference.Arguments>
                </mxswa:ActivityReference>
                <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.ConditionBranch, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="ConditionBranchStep2">
                  <mxswa:ActivityReference.Arguments>
                    <InArgument x:TypeArguments="x:Boolean" x:Key="Condition">[ConditionBranchStep2_condition]</InArgument>
                  </mxswa:ActivityReference.Arguments>
                  <mxswa:ActivityReference.Properties>
                    <mxswa:ActivityReference x:Key="Then" AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.Composite, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="ConditionBranchStep2">
                      <mxswa:ActivityReference.Properties>
                        <sco:Collection x:TypeArguments="Variable" x:Key="Variables" />
                        <sco:Collection x:TypeArguments="Activity" x:Key="Activities">
                          <Sequence DisplayName="UpdateStep3: Copy VISN and CPAC">
                            <Sequence.Variables>
                              <Variable x:TypeArguments="x:Object" Name="UpdateStep3_1" />
                              <Variable x:TypeArguments="x:Object" Name="UpdateStep3_2" />
                              <Variable x:TypeArguments="x:Object" Name="UpdateStep3_3" />
                              <Variable x:TypeArguments="x:Object" Name="UpdateStep3_4" />
                            </Sequence.Variables>
                            <Assign x:TypeArguments="mxs:Entity" To="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" Value="[New Entity(&quot;bah_interactions&quot;)]" />
                            <Assign x:TypeArguments="s:Guid" To="[CreatedEntities(&quot;primaryEntity#Temp&quot;).Id]" Value="[InputEntities(&quot;primaryEntity&quot;).Id]" />
                            <mxswa:GetEntityProperty Attribute="bah_visnid" Entity="[InputEntities(&quot;related_bah_facilityid#bah_facility&quot;)]" EntityName="bah_facility" Value="[UpdateStep3_2]">
                              <mxswa:GetEntityProperty.TargetType>
                                <InArgument x:TypeArguments="s:Type">
                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:EntityReference" />
                                </InArgument>
                              </mxswa:GetEntityProperty.TargetType>
                            </mxswa:GetEntityProperty>
                            <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.EvaluateExpression, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="EvaluateExpression">
                              <mxswa:ActivityReference.Arguments>
                                <InArgument x:TypeArguments="x:String" x:Key="ExpressionOperator">SelectFirstNonNull</InArgument>
                                <InArgument x:TypeArguments="s:Object[]" x:Key="Parameters">[New Object() { UpdateStep3_2 }]</InArgument>
                                <InArgument x:TypeArguments="s:Type" x:Key="TargetType">
                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:EntityReference" />
                                </InArgument>
                                <OutArgument x:TypeArguments="x:Object" x:Key="Result">[UpdateStep3_1]</OutArgument>
                              </mxswa:ActivityReference.Arguments>
                            </mxswa:ActivityReference>
                            <mxswa:SetEntityProperty Attribute="bah_visnid" Entity="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" EntityName="bah_interactions" Value="[UpdateStep3_1]">
                              <mxswa:SetEntityProperty.TargetType>
                                <InArgument x:TypeArguments="s:Type">
                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:EntityReference" />
                                </InArgument>
                              </mxswa:SetEntityProperty.TargetType>
                            </mxswa:SetEntityProperty>
                            <mxswa:GetEntityProperty Attribute="vhacrm_cpacid" Entity="[InputEntities(&quot;related_bah_facilityid#bah_facility&quot;)]" EntityName="bah_facility" Value="[UpdateStep3_4]">
                              <mxswa:GetEntityProperty.TargetType>
                                <InArgument x:TypeArguments="s:Type">
                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:EntityReference" />
                                </InArgument>
                              </mxswa:GetEntityProperty.TargetType>
                            </mxswa:GetEntityProperty>
                            <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.EvaluateExpression, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="EvaluateExpression">
                              <mxswa:ActivityReference.Arguments>
                                <InArgument x:TypeArguments="x:String" x:Key="ExpressionOperator">SelectFirstNonNull</InArgument>
                                <InArgument x:TypeArguments="s:Object[]" x:Key="Parameters">[New Object() { UpdateStep3_4 }]</InArgument>
                                <InArgument x:TypeArguments="s:Type" x:Key="TargetType">
                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:EntityReference" />
                                </InArgument>
                                <OutArgument x:TypeArguments="x:Object" x:Key="Result">[UpdateStep3_3]</OutArgument>
                              </mxswa:ActivityReference.Arguments>
                            </mxswa:ActivityReference>
                            <mxswa:SetEntityProperty Attribute="vhacrm_cpacid" Entity="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" EntityName="bah_interactions" Value="[UpdateStep3_3]">
                              <mxswa:SetEntityProperty.TargetType>
                                <InArgument x:TypeArguments="s:Type">
                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:EntityReference" />
                                </InArgument>
                              </mxswa:SetEntityProperty.TargetType>
                            </mxswa:SetEntityProperty>
                            <mxswa:UpdateEntity DisplayName="UpdateStep3" Entity="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" EntityName="bah_interactions" />
                            <Assign x:TypeArguments="mxs:Entity" To="[InputEntities(&quot;primaryEntity&quot;)]" Value="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" />
                          </Sequence>
                        </sco:Collection>
                      </mxswa:ActivityReference.Properties>
                    </mxswa:ActivityReference>
                    <x:Null x:Key="Else" />
                  </mxswa:ActivityReference.Properties>
                </mxswa:ActivityReference>
                <mxswa:GetEntityProperty Attribute="bah_facilityid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="bah_interactions" Value="[ConditionBranchStep4_1]">
                  <mxswa:GetEntityProperty.TargetType>
                    <InArgument x:TypeArguments="s:Type">
                      <mxswa:ReferenceLiteral x:TypeArguments="s:Type">
                        <x:Null />
                      </mxswa:ReferenceLiteral>
                    </InArgument>
                  </mxswa:GetEntityProperty.TargetType>
                </mxswa:GetEntityProperty>
                <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.EvaluateCondition, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="EvaluateCondition">
                  <mxswa:ActivityReference.Arguments>
                    <InArgument x:TypeArguments="mxsq:ConditionOperator" x:Key="ConditionOperator">Null</InArgument>
                    <x:Null x:Key="Parameters" />
                    <InArgument x:TypeArguments="x:Object" x:Key="Operand">[ConditionBranchStep4_1]</InArgument>
                    <OutArgument x:TypeArguments="x:Boolean" x:Key="Result">[ConditionBranchStep4_condition]</OutArgument>
                  </mxswa:ActivityReference.Arguments>
                </mxswa:ActivityReference>
                <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.ConditionBranch, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="ConditionBranchStep4">
                  <mxswa:ActivityReference.Arguments>
                    <InArgument x:TypeArguments="x:Boolean" x:Key="Condition">[ConditionBranchStep4_condition]</InArgument>
                  </mxswa:ActivityReference.Arguments>
                  <mxswa:ActivityReference.Properties>
                    <mxswa:ActivityReference x:Key="Then" AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.Composite, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="ConditionBranchStep4">
                      <mxswa:ActivityReference.Properties>
                        <sco:Collection x:TypeArguments="Variable" x:Key="Variables" />
                        <sco:Collection x:TypeArguments="Activity" x:Key="Activities">
                          <Sequence DisplayName="UpdateStep5: Otherwise, clear VISN and CPAC">
                            <Sequence.Variables>
                              <Variable x:TypeArguments="x:Object" Name="UpdateStep5_1" />
                              <Variable x:TypeArguments="x:Object" Name="UpdateStep5_2" />
                            </Sequence.Variables>
                            <Assign x:TypeArguments="mxs:Entity" To="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" Value="[New Entity(&quot;bah_interactions&quot;)]" />
                            <Assign x:TypeArguments="s:Guid" To="[CreatedEntities(&quot;primaryEntity#Temp&quot;).Id]" Value="[InputEntities(&quot;primaryEntity&quot;).Id]" />
                            <mxswa:SetEntityProperty Attribute="bah_visnid" Entity="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" EntityName="bah_interactions" Value="[UpdateStep5_1]">
                              <mxswa:SetEntityProperty.TargetType>
                                <InArgument x:TypeArguments="s:Type">
                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:EntityReference" />
                                </InArgument>
                              </mxswa:SetEntityProperty.TargetType>
                            </mxswa:SetEntityProperty>
                            <mxswa:SetEntityProperty Attribute="vhacrm_cpacid" Entity="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" EntityName="bah_interactions" Value="[UpdateStep5_2]">
                              <mxswa:SetEntityProperty.TargetType>
                                <InArgument x:TypeArguments="s:Type">
                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:EntityReference" />
                                </InArgument>
                              </mxswa:SetEntityProperty.TargetType>
                            </mxswa:SetEntityProperty>
                            <mxswa:UpdateEntity DisplayName="UpdateStep5" Entity="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" EntityName="bah_interactions" />
                            <Assign x:TypeArguments="mxs:Entity" To="[InputEntities(&quot;primaryEntity&quot;)]" Value="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" />
                          </Sequence>
                        </sco:Collection>
                      </mxswa:ActivityReference.Properties>
                    </mxswa:ActivityReference>
                    <x:Null x:Key="Else" />
                  </mxswa:ActivityReference.Properties>
                </mxswa:ActivityReference>
              </sco:Collection>
            </mxswa:ActivityReference.Properties>
          </mxswa:ActivityReference>
        </sco:Collection>
      </mxswa:ActivityReference.Properties>
    </mxswa:ActivityReference>
    <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.Composite, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="StageStep6: Check for Facility and update Renewal Procedure and Schedule Procedure fields">
      <mxswa:ActivityReference.Properties>
        <sco:Collection x:TypeArguments="Variable" x:Key="Variables" />
        <sco:Collection x:TypeArguments="Activity" x:Key="Activities">
          <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.ConditionSequence, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="ConditionStep8: If Facility Renewal/Schedule Procedure fields contain data, update Interaction">
            <mxswa:ActivityReference.Arguments>
              <InArgument x:TypeArguments="x:Boolean" x:Key="Wait">False</InArgument>
            </mxswa:ActivityReference.Arguments>
            <mxswa:ActivityReference.Properties>
              <sco:Collection x:TypeArguments="Variable" x:Key="Variables">
                <Variable x:TypeArguments="x:Boolean" Default="False" Name="ConditionBranchStep9_condition" />
                <Variable x:TypeArguments="x:Boolean" Default="False" Name="ConditionBranchStep9_1" />
                <Variable x:TypeArguments="x:Object" Name="ConditionBranchStep9_2" />
                <Variable x:TypeArguments="x:Boolean" Default="False" Name="ConditionBranchStep9_3" />
                <Variable x:TypeArguments="x:Object" Name="ConditionBranchStep9_4" />
              </sco:Collection>
              <sco:Collection x:TypeArguments="Activity" x:Key="Activities">
                <mxswa:GetEntityProperty Attribute="vhacrm_renewalprocedure_memo" Entity="[InputEntities(&quot;related_bah_facilityid#bah_facility&quot;)]" EntityName="bah_facility" Value="[ConditionBranchStep9_2]">
                  <mxswa:GetEntityProperty.TargetType>
                    <InArgument x:TypeArguments="s:Type">
                      <mxswa:ReferenceLiteral x:TypeArguments="s:Type">
                        <x:Null />
                      </mxswa:ReferenceLiteral>
                    </InArgument>
                  </mxswa:GetEntityProperty.TargetType>
                </mxswa:GetEntityProperty>
                <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.EvaluateCondition, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="EvaluateCondition">
                  <mxswa:ActivityReference.Arguments>
                    <InArgument x:TypeArguments="mxsq:ConditionOperator" x:Key="ConditionOperator">NotNull</InArgument>
                    <x:Null x:Key="Parameters" />
                    <InArgument x:TypeArguments="x:Object" x:Key="Operand">[ConditionBranchStep9_2]</InArgument>
                    <OutArgument x:TypeArguments="x:Boolean" x:Key="Result">[ConditionBranchStep9_1]</OutArgument>
                  </mxswa:ActivityReference.Arguments>
                </mxswa:ActivityReference>
                <mxswa:GetEntityProperty Attribute="vhacrm_scheduleprocedure_memo" Entity="[InputEntities(&quot;related_bah_facilityid#bah_facility&quot;)]" EntityName="bah_facility" Value="[ConditionBranchStep9_4]">
                  <mxswa:GetEntityProperty.TargetType>
                    <InArgument x:TypeArguments="s:Type">
                      <mxswa:ReferenceLiteral x:TypeArguments="s:Type">
                        <x:Null />
                      </mxswa:ReferenceLiteral>
                    </InArgument>
                  </mxswa:GetEntityProperty.TargetType>
                </mxswa:GetEntityProperty>
                <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.EvaluateCondition, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="EvaluateCondition">
                  <mxswa:ActivityReference.Arguments>
                    <InArgument x:TypeArguments="mxsq:ConditionOperator" x:Key="ConditionOperator">NotNull</InArgument>
                    <x:Null x:Key="Parameters" />
                    <InArgument x:TypeArguments="x:Object" x:Key="Operand">[ConditionBranchStep9_4]</InArgument>
                    <OutArgument x:TypeArguments="x:Boolean" x:Key="Result">[ConditionBranchStep9_3]</OutArgument>
                  </mxswa:ActivityReference.Arguments>
                </mxswa:ActivityReference>
                <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.EvaluateLogicalCondition, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="EvaluateLogicalCondition">
                  <mxswa:ActivityReference.Arguments>
                    <InArgument x:TypeArguments="mxsq:LogicalOperator" x:Key="LogicalOperator">Or</InArgument>
                    <InArgument x:TypeArguments="x:Boolean" x:Key="LeftOperand">[ConditionBranchStep9_1]</InArgument>
                    <InArgument x:TypeArguments="x:Boolean" x:Key="RightOperand">[ConditionBranchStep9_3]</InArgument>
                    <OutArgument x:TypeArguments="x:Boolean" x:Key="Result">[ConditionBranchStep9_condition]</OutArgument>
                  </mxswa:ActivityReference.Arguments>
                </mxswa:ActivityReference>
                <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.ConditionBranch, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="ConditionBranchStep9">
                  <mxswa:ActivityReference.Arguments>
                    <InArgument x:TypeArguments="x:Boolean" x:Key="Condition">[ConditionBranchStep9_condition]</InArgument>
                  </mxswa:ActivityReference.Arguments>
                  <mxswa:ActivityReference.Properties>
                    <mxswa:ActivityReference x:Key="Then" AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.Composite, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="ConditionBranchStep9">
                      <mxswa:ActivityReference.Properties>
                        <sco:Collection x:TypeArguments="Variable" x:Key="Variables" />
                        <sco:Collection x:TypeArguments="Activity" x:Key="Activities">
                          <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.ConditionSequence, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="ConditionStep15">
                            <mxswa:ActivityReference.Arguments>
                              <InArgument x:TypeArguments="x:Boolean" x:Key="Wait">False</InArgument>
                            </mxswa:ActivityReference.Arguments>
                            <mxswa:ActivityReference.Properties>
                              <sco:Collection x:TypeArguments="Variable" x:Key="Variables">
                                <Variable x:TypeArguments="x:Boolean" Default="False" Name="ConditionBranchStep16_condition" />
                                <Variable x:TypeArguments="x:Object" Name="ConditionBranchStep16_1" />
                                <Variable x:TypeArguments="x:Object" Name="ConditionBranchStep16_2" />
                                <Variable x:TypeArguments="x:Object" Name="ConditionBranchStep16_3" />
                              </sco:Collection>
                              <sco:Collection x:TypeArguments="Activity" x:Key="Activities">
                                <mxswa:GetEntityProperty Attribute="vhacrm_lobid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="bah_interactions" Value="[ConditionBranchStep16_1]">
                                  <mxswa:GetEntityProperty.TargetType>
                                    <InArgument x:TypeArguments="s:Type">
                                      <mxswa:ReferenceLiteral x:TypeArguments="s:Type">
                                        <x:Null />
                                      </mxswa:ReferenceLiteral>
                                    </InArgument>
                                  </mxswa:GetEntityProperty.TargetType>
                                </mxswa:GetEntityProperty>
                                <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.EvaluateExpression, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="EvaluateExpression">
                                  <mxswa:ActivityReference.Arguments>
                                    <InArgument x:TypeArguments="x:String" x:Key="ExpressionOperator">CreateCrmType</InArgument>
                                    <InArgument x:TypeArguments="s:Object[]" x:Key="Parameters">[New Object() { Microsoft.Xrm.Sdk.Workflow.WorkflowPropertyType.Guid, "a831ee9c-ac14-e711-9482-0050568d63d9", "UniqueIdentifier" }]</InArgument>
                                    <InArgument x:TypeArguments="s:Type" x:Key="TargetType">
                                      <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="s:Guid" />
                                    </InArgument>
                                    <OutArgument x:TypeArguments="x:Object" x:Key="Result">[ConditionBranchStep16_3]</OutArgument>
                                  </mxswa:ActivityReference.Arguments>
                                </mxswa:ActivityReference>
                                <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.EvaluateExpression, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="EvaluateExpression">
                                  <mxswa:ActivityReference.Arguments>
                                    <InArgument x:TypeArguments="x:String" x:Key="ExpressionOperator">CreateCrmType</InArgument>
                                    <InArgument x:TypeArguments="s:Object[]" x:Key="Parameters">[New Object() { Microsoft.Xrm.Sdk.Workflow.WorkflowPropertyType.EntityReference, "vhacrm_lob", "PCC", ConditionBranchStep16_3, "Lookup" }]</InArgument>
                                    <InArgument x:TypeArguments="s:Type" x:Key="TargetType">
                                      <mxswa:ReferenceLiteral x:TypeArguments="s:Type">
                                        <x:Null />
                                      </mxswa:ReferenceLiteral>
                                    </InArgument>
                                    <OutArgument x:TypeArguments="x:Object" x:Key="Result">[ConditionBranchStep16_2]</OutArgument>
                                  </mxswa:ActivityReference.Arguments>
                                </mxswa:ActivityReference>
                                <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.EvaluateCondition, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="EvaluateCondition">
                                  <mxswa:ActivityReference.Arguments>
                                    <InArgument x:TypeArguments="mxsq:ConditionOperator" x:Key="ConditionOperator">Equal</InArgument>
                                    <InArgument x:TypeArguments="s:Object[]" x:Key="Parameters">[New Object() { ConditionBranchStep16_2 }]</InArgument>
                                    <InArgument x:TypeArguments="x:Object" x:Key="Operand">[ConditionBranchStep16_1]</InArgument>
                                    <OutArgument x:TypeArguments="x:Boolean" x:Key="Result">[ConditionBranchStep16_condition]</OutArgument>
                                  </mxswa:ActivityReference.Arguments>
                                </mxswa:ActivityReference>
                                <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.ConditionBranch, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="ConditionBranchStep16">
                                  <mxswa:ActivityReference.Arguments>
                                    <InArgument x:TypeArguments="x:Boolean" x:Key="Condition">[ConditionBranchStep16_condition]</InArgument>
                                  </mxswa:ActivityReference.Arguments>
                                  <mxswa:ActivityReference.Properties>
                                    <mxswa:ActivityReference x:Key="Then" AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.Composite, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="ConditionBranchStep16">
                                      <mxswa:ActivityReference.Properties>
                                        <sco:Collection x:TypeArguments="Variable" x:Key="Variables" />
                                        <sco:Collection x:TypeArguments="Activity" x:Key="Activities">
                                          <Sequence DisplayName="UpdateStep17">
                                            <Sequence.Variables>
                                              <Variable x:TypeArguments="x:Object" Name="UpdateStep17_1" />
                                              <Variable x:TypeArguments="x:Object" Name="UpdateStep17_2" />
                                              <Variable x:TypeArguments="x:Object" Name="UpdateStep17_3" />
                                              <Variable x:TypeArguments="x:Object" Name="UpdateStep17_4" />
                                            </Sequence.Variables>
                                            <Assign x:TypeArguments="mxs:Entity" To="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" Value="[New Entity(&quot;bah_interactions&quot;)]" />
                                            <Assign x:TypeArguments="s:Guid" To="[CreatedEntities(&quot;primaryEntity#Temp&quot;).Id]" Value="[InputEntities(&quot;primaryEntity&quot;).Id]" />
                                            <mxswa:GetEntityProperty Attribute="vhacrm_renewalprocedure_memo" Entity="[InputEntities(&quot;related_bah_facilityid#bah_facility&quot;)]" EntityName="bah_facility" Value="[UpdateStep17_2]">
                                              <mxswa:GetEntityProperty.TargetType>
                                                <InArgument x:TypeArguments="s:Type">
                                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="x:String" />
                                                </InArgument>
                                              </mxswa:GetEntityProperty.TargetType>
                                            </mxswa:GetEntityProperty>
                                            <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.EvaluateExpression, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="EvaluateExpression">
                                              <mxswa:ActivityReference.Arguments>
                                                <InArgument x:TypeArguments="x:String" x:Key="ExpressionOperator">SelectFirstNonNull</InArgument>
                                                <InArgument x:TypeArguments="s:Object[]" x:Key="Parameters">[New Object() { UpdateStep17_2 }]</InArgument>
                                                <InArgument x:TypeArguments="s:Type" x:Key="TargetType">
                                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="x:String" />
                                                </InArgument>
                                                <OutArgument x:TypeArguments="x:Object" x:Key="Result">[UpdateStep17_1]</OutArgument>
                                              </mxswa:ActivityReference.Arguments>
                                            </mxswa:ActivityReference>
                                            <mxswa:SetEntityProperty Attribute="vhacrm_renewalprocedure_memo" Entity="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" EntityName="bah_interactions" Value="[UpdateStep17_1]">
                                              <mxswa:SetEntityProperty.TargetType>
                                                <InArgument x:TypeArguments="s:Type">
                                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="x:String" />
                                                </InArgument>
                                              </mxswa:SetEntityProperty.TargetType>
                                            </mxswa:SetEntityProperty>
                                            <mxswa:GetEntityProperty Attribute="vhacrm_scheduleprocedure_memo" Entity="[InputEntities(&quot;related_bah_facilityid#bah_facility&quot;)]" EntityName="bah_facility" Value="[UpdateStep17_4]">
                                              <mxswa:GetEntityProperty.TargetType>
                                                <InArgument x:TypeArguments="s:Type">
                                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="x:String" />
                                                </InArgument>
                                              </mxswa:GetEntityProperty.TargetType>
                                            </mxswa:GetEntityProperty>
                                            <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.EvaluateExpression, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="EvaluateExpression">
                                              <mxswa:ActivityReference.Arguments>
                                                <InArgument x:TypeArguments="x:String" x:Key="ExpressionOperator">SelectFirstNonNull</InArgument>
                                                <InArgument x:TypeArguments="s:Object[]" x:Key="Parameters">[New Object() { UpdateStep17_4 }]</InArgument>
                                                <InArgument x:TypeArguments="s:Type" x:Key="TargetType">
                                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="x:String" />
                                                </InArgument>
                                                <OutArgument x:TypeArguments="x:Object" x:Key="Result">[UpdateStep17_3]</OutArgument>
                                              </mxswa:ActivityReference.Arguments>
                                            </mxswa:ActivityReference>
                                            <mxswa:SetEntityProperty Attribute="vhacrm_scheduleprocedure_memo" Entity="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" EntityName="bah_interactions" Value="[UpdateStep17_3]">
                                              <mxswa:SetEntityProperty.TargetType>
                                                <InArgument x:TypeArguments="s:Type">
                                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="x:String" />
                                                </InArgument>
                                              </mxswa:SetEntityProperty.TargetType>
                                            </mxswa:SetEntityProperty>
                                            <mxswa:UpdateEntity DisplayName="UpdateStep17" Entity="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" EntityName="bah_interactions" />
                                            <Assign x:TypeArguments="mxs:Entity" To="[InputEntities(&quot;primaryEntity&quot;)]" Value="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" />
                                          </Sequence>
                                        </sco:Collection>
                                      </mxswa:ActivityReference.Properties>
                                    </mxswa:ActivityReference>
                                    <x:Null x:Key="Else" />
                                  </mxswa:ActivityReference.Properties>
                                </mxswa:ActivityReference>
                              </sco:Collection>
                            </mxswa:ActivityReference.Properties>
                          </mxswa:ActivityReference>
                        </sco:Collection>
                      </mxswa:ActivityReference.Properties>
                    </mxswa:ActivityReference>
                    <x:Null x:Key="Else" />
                  </mxswa:ActivityReference.Properties>
                </mxswa:ActivityReference>
              </sco:Collection>
            </mxswa:ActivityReference.Properties>
          </mxswa:ActivityReference>
        </sco:Collection>
      </mxswa:ActivityReference.Properties>
    </mxswa:ActivityReference>
    <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.Composite, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="StageStep11: Clear Fields">
      <mxswa:ActivityReference.Properties>
        <sco:Collection x:TypeArguments="Variable" x:Key="Variables" />
        <sco:Collection x:TypeArguments="Activity" x:Key="Activities">
          <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.ConditionSequence, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="ConditionStep12: If Facility on Interaction is blank, clear fields">
            <mxswa:ActivityReference.Arguments>
              <InArgument x:TypeArguments="x:Boolean" x:Key="Wait">False</InArgument>
            </mxswa:ActivityReference.Arguments>
            <mxswa:ActivityReference.Properties>
              <sco:Collection x:TypeArguments="Variable" x:Key="Variables">
                <Variable x:TypeArguments="x:Boolean" Default="False" Name="ConditionBranchStep13_condition" />
                <Variable x:TypeArguments="x:Object" Name="ConditionBranchStep13_1" />
              </sco:Collection>
              <sco:Collection x:TypeArguments="Activity" x:Key="Activities">
                <mxswa:GetEntityProperty Attribute="bah_facilityid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="bah_interactions" Value="[ConditionBranchStep13_1]">
                  <mxswa:GetEntityProperty.TargetType>
                    <InArgument x:TypeArguments="s:Type">
                      <mxswa:ReferenceLiteral x:TypeArguments="s:Type">
                        <x:Null />
                      </mxswa:ReferenceLiteral>
                    </InArgument>
                  </mxswa:GetEntityProperty.TargetType>
                </mxswa:GetEntityProperty>
                <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.EvaluateCondition, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="EvaluateCondition">
                  <mxswa:ActivityReference.Arguments>
                    <InArgument x:TypeArguments="mxsq:ConditionOperator" x:Key="ConditionOperator">Null</InArgument>
                    <x:Null x:Key="Parameters" />
                    <InArgument x:TypeArguments="x:Object" x:Key="Operand">[ConditionBranchStep13_1]</InArgument>
                    <OutArgument x:TypeArguments="x:Boolean" x:Key="Result">[ConditionBranchStep13_condition]</OutArgument>
                  </mxswa:ActivityReference.Arguments>
                </mxswa:ActivityReference>
                <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.ConditionBranch, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="ConditionBranchStep13">
                  <mxswa:ActivityReference.Arguments>
                    <InArgument x:TypeArguments="x:Boolean" x:Key="Condition">[ConditionBranchStep13_condition]</InArgument>
                  </mxswa:ActivityReference.Arguments>
                  <mxswa:ActivityReference.Properties>
                    <mxswa:ActivityReference x:Key="Then" AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.Composite, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="ConditionBranchStep13">
                      <mxswa:ActivityReference.Properties>
                        <sco:Collection x:TypeArguments="Variable" x:Key="Variables" />
                        <sco:Collection x:TypeArguments="Activity" x:Key="Activities">
                          <Sequence DisplayName="UpdateStep14">
                            <Sequence.Variables>
                              <Variable x:TypeArguments="x:Object" Name="UpdateStep14_1" />
                              <Variable x:TypeArguments="x:Object" Name="UpdateStep14_2" />
                            </Sequence.Variables>
                            <Assign x:TypeArguments="mxs:Entity" To="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" Value="[New Entity(&quot;bah_interactions&quot;)]" />
                            <Assign x:TypeArguments="s:Guid" To="[CreatedEntities(&quot;primaryEntity#Temp&quot;).Id]" Value="[InputEntities(&quot;primaryEntity&quot;).Id]" />
                            <mxswa:SetEntityProperty Attribute="vhacrm_renewalprocedure_memo" Entity="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" EntityName="bah_interactions" Value="[UpdateStep14_1]">
                              <mxswa:SetEntityProperty.TargetType>
                                <InArgument x:TypeArguments="s:Type">
                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="x:String" />
                                </InArgument>
                              </mxswa:SetEntityProperty.TargetType>
                            </mxswa:SetEntityProperty>
                            <mxswa:SetEntityProperty Attribute="vhacrm_scheduleprocedure_memo" Entity="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" EntityName="bah_interactions" Value="[UpdateStep14_2]">
                              <mxswa:SetEntityProperty.TargetType>
                                <InArgument x:TypeArguments="s:Type">
                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="x:String" />
                                </InArgument>
                              </mxswa:SetEntityProperty.TargetType>
                            </mxswa:SetEntityProperty>
                            <mxswa:UpdateEntity DisplayName="UpdateStep14" Entity="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" EntityName="bah_interactions" />
                            <Assign x:TypeArguments="mxs:Entity" To="[InputEntities(&quot;primaryEntity&quot;)]" Value="[CreatedEntities(&quot;primaryEntity#Temp&quot;)]" />
                          </Sequence>
                        </sco:Collection>
                      </mxswa:ActivityReference.Properties>
                    </mxswa:ActivityReference>
                    <x:Null x:Key="Else" />
                  </mxswa:ActivityReference.Properties>
                </mxswa:ActivityReference>
              </sco:Collection>
            </mxswa:ActivityReference.Properties>
          </mxswa:ActivityReference>
        </sco:Collection>
      </mxswa:ActivityReference.Properties>
    </mxswa:ActivityReference>
  </mxswa:Workflow>
</Activity>