<Activity x:Class="XrmWorkflow3daee875b5c24e3085c8029dbd120a1c" 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:XrmWorkflow3daee875b5c24e3085c8029dbd120a1c.InputEntities>
    <InArgument x:TypeArguments="scg:IDictionary(x:String, mxs:Entity)" />
  </this:XrmWorkflow3daee875b5c24e3085c8029dbd120a1c.InputEntities>
  <this:XrmWorkflow3daee875b5c24e3085c8029dbd120a1c.CreatedEntities>
    <InArgument x:TypeArguments="scg:IDictionary(x:String, mxs:Entity)" />
  </this:XrmWorkflow3daee875b5c24e3085c8029dbd120a1c.CreatedEntities>
  <mva:VisualBasic.Settings>Assembly references and imported namespaces for internal implementation</mva:VisualBasic.Settings>
  <mxswa:Workflow>
    <mxswa:Workflow.Variables>
      <Variable x:TypeArguments="x:String" Default="[Nothing]" Name="CustomActivityStep6ResultString_localParameter" />
      <Variable x:TypeArguments="x:Boolean" Default="False" Name="CustomActivityStep6ResultBoolean_localParameter" />
      <Variable x:TypeArguments="s:DateTime" Default="" Name="CustomActivityStep6ResultDateTime_localParameter" />
      <Variable x:TypeArguments="x:Decimal" Default="0" Name="CustomActivityStep6ResultDecimal_localParameter" />
      <Variable x:TypeArguments="x:Double" Default="0" Name="CustomActivityStep6ResultDouble_localParameter" />
      <Variable x:TypeArguments="x:Int32" Default="0" Name="CustomActivityStep6ResultInteger_localParameter" />
      <Variable x:TypeArguments="mxs:Money" Name="CustomActivityStep6ResultMoney_localParameter">
        <Variable.Default>
          <mxswa:ReferenceLiteral x:TypeArguments="mxs:Money">
            <x:Null />
          </mxswa:ReferenceLiteral>
        </Variable.Default>
      </Variable>
    </mxswa:Workflow.Variables>
    <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.Composite, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="StageStep1: Create External Request if Case Note Pointer Records created for this request already.">
      <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="ConditionStep2: Check to see if Case Note Pointers have been created">
            <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="ConditionBranchStep3_condition" />
                <Variable x:TypeArguments="x:Object" Name="ConditionBranchStep3_1" />
                <Variable x:TypeArguments="x:Object" Name="ConditionBranchStep3_2" />
              </sco:Collection>
              <sco:Collection x:TypeArguments="Activity" x:Key="Activities">
                <mxswa:GetEntityProperty Attribute="vhacrm_casenotepointerscreated" Entity="[InputEntities(&quot;related_vhacrm_requestid#incident&quot;)]" EntityName="incident" Value="[ConditionBranchStep3_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.Boolean, "1" }]</InArgument>
                    <InArgument x:TypeArguments="s:Type" x:Key="TargetType">
                      <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="x:Boolean" />
                    </InArgument>
                    <OutArgument x:TypeArguments="x:Object" x:Key="Result">[ConditionBranchStep3_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() { ConditionBranchStep3_2 }]</InArgument>
                    <InArgument x:TypeArguments="x:Object" x:Key="Operand">[ConditionBranchStep3_1]</InArgument>
                    <OutArgument x:TypeArguments="x:Boolean" x:Key="Result">[ConditionBranchStep3_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="ConditionBranchStep3">
                  <mxswa:ActivityReference.Arguments>
                    <InArgument x:TypeArguments="x:Boolean" x:Key="Condition">[ConditionBranchStep3_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="ConditionBranchStep3">
                      <mxswa:ActivityReference.Properties>
                        <sco:Collection x:TypeArguments="Variable" x:Key="Variables" />
                        <sco:Collection x:TypeArguments="Activity" x:Key="Activities">
                          <Sequence DisplayName="CreateStep4: Create the new Case Note Pointer">
                            <Sequence.Variables>
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_1" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_2" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_3" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_4" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_5" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_6" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_7" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_8" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_9" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_10" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_11" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_12" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_13" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_14" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_15" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_16" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_17" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_18" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_19" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_20" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_21" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_22" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_23" />
                              <Variable x:TypeArguments="x:Object" Name="CreateStep4_24" />
                            </Sequence.Variables>
                            <Assign x:TypeArguments="mxs:Entity" To="[CreatedEntities(&quot;CreateStep4_localParameter#Temp&quot;)]" Value="[New Entity(&quot;vhacrm_casenotepointer&quot;)]" />
                            <mxswa:GetEntityProperty Attribute="vhacrm_casenoteid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="vhacrm_casenote" Value="[CreateStep4_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() { CreateStep4_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">[CreateStep4_1]</OutArgument>
                              </mxswa:ActivityReference.Arguments>
                            </mxswa:ActivityReference>
                            <mxswa:SetEntityProperty Attribute="vhacrm_name" Entity="[CreatedEntities(&quot;CreateStep4_localParameter#Temp&quot;)]" EntityName="vhacrm_casenotepointer" Value="[CreateStep4_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_casenoteid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="vhacrm_casenote" Value="[CreateStep4_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() { CreateStep4_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">[CreateStep4_3]</OutArgument>
                              </mxswa:ActivityReference.Arguments>
                            </mxswa:ActivityReference>
                            <mxswa:SetEntityProperty Attribute="vhacrm_casenoteid" Entity="[CreatedEntities(&quot;CreateStep4_localParameter#Temp&quot;)]" EntityName="vhacrm_casenotepointer" Value="[CreateStep4_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:GetEntityProperty Attribute="vhacrm_casenotetype_code" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="vhacrm_casenote" Value="[CreateStep4_6]">
                              <mxswa:GetEntityProperty.TargetType>
                                <InArgument x:TypeArguments="s:Type">
                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:OptionSetValue" />
                                </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() { CreateStep4_6 }]</InArgument>
                                <InArgument x:TypeArguments="s:Type" x:Key="TargetType">
                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:OptionSetValue" />
                                </InArgument>
                                <OutArgument x:TypeArguments="x:Object" x:Key="Result">[CreateStep4_5]</OutArgument>
                              </mxswa:ActivityReference.Arguments>
                            </mxswa:ActivityReference>
                            <mxswa:SetEntityProperty Attribute="vhacrm_casenotetype_code" Entity="[CreatedEntities(&quot;CreateStep4_localParameter#Temp&quot;)]" EntityName="vhacrm_casenotepointer" Value="[CreateStep4_5]">
                              <mxswa:SetEntityProperty.TargetType>
                                <InArgument x:TypeArguments="s:Type">
                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:OptionSetValue" />
                                </InArgument>
                              </mxswa:SetEntityProperty.TargetType>
                            </mxswa:SetEntityProperty>
                            <mxswa:GetEntityProperty Attribute="vhacrm_casenotes_memo" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="vhacrm_casenote" Value="[CreateStep4_8]">
                              <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() { CreateStep4_8 }]</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">[CreateStep4_7]</OutArgument>
                              </mxswa:ActivityReference.Arguments>
                            </mxswa:ActivityReference>
                            <mxswa:SetEntityProperty Attribute="vhacrm_casenotes_memo" Entity="[CreatedEntities(&quot;CreateStep4_localParameter#Temp&quot;)]" EntityName="vhacrm_casenotepointer" Value="[CreateStep4_7]">
                              <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_createdby_employeeid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="vhacrm_casenote" Value="[CreateStep4_10]">
                              <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() { CreateStep4_10 }]</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">[CreateStep4_9]</OutArgument>
                              </mxswa:ActivityReference.Arguments>
                            </mxswa:ActivityReference>
                            <mxswa:SetEntityProperty Attribute="vhacrm_createdby_employeeid" Entity="[CreatedEntities(&quot;CreateStep4_localParameter#Temp&quot;)]" EntityName="vhacrm_casenotepointer" Value="[CreateStep4_9]">
                              <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_interactionid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="vhacrm_casenote" Value="[CreateStep4_12]">
                              <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() { CreateStep4_12 }]</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">[CreateStep4_11]</OutArgument>
                              </mxswa:ActivityReference.Arguments>
                            </mxswa:ActivityReference>
                            <mxswa:SetEntityProperty Attribute="vhacrm_interactionid" Entity="[CreatedEntities(&quot;CreateStep4_localParameter#Temp&quot;)]" EntityName="vhacrm_casenotepointer" Value="[CreateStep4_11]">
                              <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_modifiedby_employeeid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="vhacrm_casenote" Value="[CreateStep4_14]">
                              <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() { CreateStep4_14 }]</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">[CreateStep4_13]</OutArgument>
                              </mxswa:ActivityReference.Arguments>
                            </mxswa:ActivityReference>
                            <mxswa:SetEntityProperty Attribute="vhacrm_modifiedby_employeeid" Entity="[CreatedEntities(&quot;CreateStep4_localParameter#Temp&quot;)]" EntityName="vhacrm_casenotepointer" Value="[CreateStep4_13]">
                              <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="createdby" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="vhacrm_casenote" Value="[CreateStep4_16]">
                              <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() { CreateStep4_16 }]</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">[CreateStep4_15]</OutArgument>
                              </mxswa:ActivityReference.Arguments>
                            </mxswa:ActivityReference>
                            <mxswa:SetEntityProperty Attribute="vhacrm_notecreatedby" Entity="[CreatedEntities(&quot;CreateStep4_localParameter#Temp&quot;)]" EntityName="vhacrm_casenotepointer" Value="[CreateStep4_15]">
                              <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="createdon" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="vhacrm_casenote" Value="[CreateStep4_18]">
                              <mxswa:GetEntityProperty.TargetType>
                                <InArgument x:TypeArguments="s:Type">
                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="s:DateTime" />
                                </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() { CreateStep4_18 }]</InArgument>
                                <InArgument x:TypeArguments="s:Type" x:Key="TargetType">
                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="s:DateTime" />
                                </InArgument>
                                <OutArgument x:TypeArguments="x:Object" x:Key="Result">[CreateStep4_17]</OutArgument>
                              </mxswa:ActivityReference.Arguments>
                            </mxswa:ActivityReference>
                            <mxswa:SetEntityProperty Attribute="vhacrm_notecreatedon_date" Entity="[CreatedEntities(&quot;CreateStep4_localParameter#Temp&quot;)]" EntityName="vhacrm_casenotepointer" Value="[CreateStep4_17]">
                              <mxswa:SetEntityProperty.TargetType>
                                <InArgument x:TypeArguments="s:Type">
                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="s:DateTime" />
                                </InArgument>
                              </mxswa:SetEntityProperty.TargetType>
                            </mxswa:SetEntityProperty>
                            <mxswa:GetEntityProperty Attribute="vhacrm_owner_employeeid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="vhacrm_casenote" Value="[CreateStep4_20]">
                              <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() { CreateStep4_20 }]</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">[CreateStep4_19]</OutArgument>
                              </mxswa:ActivityReference.Arguments>
                            </mxswa:ActivityReference>
                            <mxswa:SetEntityProperty Attribute="vhacrm_owner_employeeid" Entity="[CreatedEntities(&quot;CreateStep4_localParameter#Temp&quot;)]" EntityName="vhacrm_casenotepointer" Value="[CreateStep4_19]">
                              <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_requestid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="vhacrm_casenote" Value="[CreateStep4_22]">
                              <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() { CreateStep4_22 }]</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">[CreateStep4_21]</OutArgument>
                              </mxswa:ActivityReference.Arguments>
                            </mxswa:ActivityReference>
                            <mxswa:SetEntityProperty Attribute="vhacrm_requestid" Entity="[CreatedEntities(&quot;CreateStep4_localParameter#Temp&quot;)]" EntityName="vhacrm_casenotepointer" Value="[CreateStep4_21]">
                              <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_veteranpointerid" Entity="[InputEntities(&quot;related_vhacrm_requestid#incident&quot;)]" EntityName="incident" Value="[CreateStep4_24]">
                              <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() { CreateStep4_24 }]</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">[CreateStep4_23]</OutArgument>
                              </mxswa:ActivityReference.Arguments>
                            </mxswa:ActivityReference>
                            <mxswa:SetEntityProperty Attribute="vhacrm_veteranpointerid" Entity="[CreatedEntities(&quot;CreateStep4_localParameter#Temp&quot;)]" EntityName="vhacrm_casenotepointer" Value="[CreateStep4_23]">
                              <mxswa:SetEntityProperty.TargetType>
                                <InArgument x:TypeArguments="s:Type">
                                  <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:EntityReference" />
                                </InArgument>
                              </mxswa:SetEntityProperty.TargetType>
                            </mxswa:SetEntityProperty>
                            <mxswa:CreateEntity EntityId="{x:Null}" DisplayName="CreateStep4: Create the new Case Note Pointer" Entity="[CreatedEntities(&quot;CreateStep4_localParameter#Temp&quot;)]" EntityName="vhacrm_casenotepointer" />
                            <Assign x:TypeArguments="mxs:Entity" To="[CreatedEntities(&quot;CreateStep4_localParameter&quot;)]" Value="[CreatedEntities(&quot;CreateStep4_localParameter#Temp&quot;)]" />
                            <Persist />
                          </Sequence>
                          <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.Composite, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="CustomActivityStep6: Assign the new Case Note Pointer">
                            <mxswa:ActivityReference.Properties>
                              <sco:Collection x:TypeArguments="Variable" x:Key="Variables">
                                <Variable x:TypeArguments="x:Object" Name="CustomActivityStep6_1" />
                                <Variable x:TypeArguments="x:Object" Name="CustomActivityStep6_1_converted" />
                                <Variable x:TypeArguments="x:Object" Name="CustomActivityStep6_2" />
                                <Variable x:TypeArguments="x:Object" Name="CustomActivityStep6_2_converted" />
                                <Variable x:TypeArguments="x:Object" Name="CustomActivityStep6_3" />
                                <Variable x:TypeArguments="x:Object" Name="CustomActivityStep6_3_converted" />
                              </sco:Collection>
                              <sco:Collection x:TypeArguments="Activity" x:Key="Activities">
                                <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.String, "w5T", "String" }]</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">[CustomActivityStep6_1]</OutArgument>
                                  </mxswa:ActivityReference.Arguments>
                                </mxswa:ActivityReference>
                                <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.ConvertCrmXrmTypes, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="ConvertCrmXrmTypes">
                                  <mxswa:ActivityReference.Arguments>
                                    <InArgument x:TypeArguments="x:Object" x:Key="Value">[CustomActivityStep6_1]</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">[CustomActivityStep6_1_converted]</OutArgument>
                                  </mxswa:ActivityReference.Arguments>
                                </mxswa:ActivityReference>
                                <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.ConvertCrmXrmTypes, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="ConvertCrmXrmTypes">
                                  <mxswa:ActivityReference.Arguments>
                                    <InArgument x:TypeArguments="x:Object" x:Key="Value">[CustomActivityStep6_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">[CustomActivityStep6_2_converted]</OutArgument>
                                  </mxswa:ActivityReference.Arguments>
                                </mxswa:ActivityReference>
                                <mxswa:ActivityReference AssemblyQualifiedName="Microsoft.Crm.Workflow.Activities.ConvertCrmXrmTypes, Microsoft.Crm.Workflow, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DisplayName="ConvertCrmXrmTypes">
                                  <mxswa:ActivityReference.Arguments>
                                    <InArgument x:TypeArguments="x:Object" x:Key="Value">[CustomActivityStep6_3]</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">[CustomActivityStep6_3_converted]</OutArgument>
                                  </mxswa:ActivityReference.Arguments>
                                </mxswa:ActivityReference>
                                <mxswa:ActivityReference AssemblyQualifiedName="North52.FormulaManager.WorkflowActivities.ExecuteFormula, North52.FormulaManager, Version=1.0.0.506, Culture=neutral, PublicKeyToken=a8878fd7dad60ca1" DisplayName="CustomActivityStep6: Assign the new Case Note Pointer">
                                  <mxswa:ActivityReference.Arguments>
                                    <InArgument x:TypeArguments="x:String" x:Key="FormulaShortCode">[DirectCast(CustomActivityStep6_1_converted, System.String)]</InArgument>
                                    <InArgument x:TypeArguments="x:String" x:Key="FormulaParameterXml">[DirectCast(CustomActivityStep6_2_converted, System.String)]</InArgument>
                                    <InArgument x:TypeArguments="x:String" x:Key="PrimaryEntityId">[DirectCast(CustomActivityStep6_3_converted, System.String)]</InArgument>
                                    <OutArgument x:TypeArguments="x:String" x:Key="ResultString">[CustomActivityStep6ResultString_localParameter]</OutArgument>
                                    <OutArgument x:TypeArguments="x:Boolean" x:Key="ResultBoolean">[CustomActivityStep6ResultBoolean_localParameter]</OutArgument>
                                    <OutArgument x:TypeArguments="s:DateTime" x:Key="ResultDateTime">[CustomActivityStep6ResultDateTime_localParameter]</OutArgument>
                                    <OutArgument x:TypeArguments="x:Decimal" x:Key="ResultDecimal">[CustomActivityStep6ResultDecimal_localParameter]</OutArgument>
                                    <OutArgument x:TypeArguments="x:Double" x:Key="ResultDouble">[CustomActivityStep6ResultDouble_localParameter]</OutArgument>
                                    <OutArgument x:TypeArguments="x:Int32" x:Key="ResultInteger">[CustomActivityStep6ResultInteger_localParameter]</OutArgument>
                                    <OutArgument x:TypeArguments="mxs:Money" x:Key="ResultMoney">[CustomActivityStep6ResultMoney_localParameter]</OutArgument>
                                  </mxswa:ActivityReference.Arguments>
                                </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>
          <Sequence DisplayName="StopWorkflowStep5: Exit with success.">
            <Sequence.Variables>
              <Variable x:TypeArguments="x:Object" Name="StopWorkflowStep5_1" />
              <Variable x:TypeArguments="x:String" Default="eb738218-e42d-4def-bb78-5157b6357b2d" Name="stepLabelLabelId" />
              <Variable x:TypeArguments="x:String" Name="stepLabelDescription">
                <Variable.Default>
                  <Literal x:TypeArguments="x:String" Value="" />
                </Variable.Default>
              </Variable>
              <Variable x:TypeArguments="x:Int32" Default="1033" Name="stepLabelLanguageCode" />
            </Sequence.Variables>
            <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.String, "", "String" }]</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">[StopWorkflowStep5_1]</OutArgument>
              </mxswa:ActivityReference.Arguments>
            </mxswa:ActivityReference>
            <TerminateWorkflow DisplayName="StopWorkflowStep5: Exit with success." Exception="[New Microsoft.Xrm.Sdk.InvalidPluginExecutionException(Microsoft.Xrm.Sdk.OperationStatus.Succeeded)]" Reason="[DirectCast(StopWorkflowStep5_1, System.String)]" />
          </Sequence>
          <Persist />
        </sco:Collection>
      </mxswa:ActivityReference.Properties>
    </mxswa:ActivityReference>
  </mxswa:Workflow>
</Activity>