<Activity x:Class="XrmWorkflow067033325baf4bed89175afe9b4cd0b6" 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: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:XrmWorkflow067033325baf4bed89175afe9b4cd0b6.InputEntities>
    <InArgument x:TypeArguments="scg:IDictionary(x:String, mxs:Entity)" />
  </this:XrmWorkflow067033325baf4bed89175afe9b4cd0b6.InputEntities>
  <this:XrmWorkflow067033325baf4bed89175afe9b4cd0b6.CreatedEntities>
    <InArgument x:TypeArguments="scg:IDictionary(x:String, mxs:Entity)" />
  </this:XrmWorkflow067033325baf4bed89175afe9b4cd0b6.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="CustomActivityStep3ResultString_localParameter" />
      <Variable x:TypeArguments="x:Boolean" Default="False" Name="CustomActivityStep3ResultBoolean_localParameter" />
      <Variable x:TypeArguments="s:DateTime" Default="" Name="CustomActivityStep3ResultDateTime_localParameter" />
      <Variable x:TypeArguments="x:Decimal" Default="0" Name="CustomActivityStep3ResultDecimal_localParameter" />
      <Variable x:TypeArguments="x:Double" Default="0" Name="CustomActivityStep3ResultDouble_localParameter" />
      <Variable x:TypeArguments="x:Int32" Default="0" Name="CustomActivityStep3ResultInteger_localParameter" />
      <Variable x:TypeArguments="mxs:Money" Name="CustomActivityStep3ResultMoney_localParameter">
        <Variable.Default>
          <mxswa:ReferenceLiteral x:TypeArguments="mxs:Money">
            <x:Null />
          </mxswa:ReferenceLiteral>
        </Variable.Default>
      </Variable>
    </mxswa:Workflow.Variables>
    <Sequence DisplayName="UpdateStep1: Update Veteran's email address">
      <Sequence.Variables>
        <Variable x:TypeArguments="x:Object" Name="UpdateStep1_1" />
        <Variable x:TypeArguments="x:Object" Name="UpdateStep1_2" />
      </Sequence.Variables>
      <Assign x:TypeArguments="mxs:Entity" To="[CreatedEntities(&quot;related_bah_veteranid#contact#Temp&quot;)]" Value="[New Entity(&quot;contact&quot;)]" />
      <Assign x:TypeArguments="s:Guid" To="[CreatedEntities(&quot;related_bah_veteranid#contact#Temp&quot;).Id]" Value="[InputEntities(&quot;related_bah_veteranid#contact&quot;).Id]" />
      <mxswa:GetEntityProperty Attribute="vhacrm_emailaddress_text" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="bah_interactions" Value="[UpdateStep1_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() { UpdateStep1_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">[UpdateStep1_1]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="emailaddress1" Entity="[CreatedEntities(&quot;related_bah_veteranid#contact#Temp&quot;)]" EntityName="contact" Value="[UpdateStep1_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:UpdateEntity DisplayName="UpdateStep1" Entity="[CreatedEntities(&quot;related_bah_veteranid#contact#Temp&quot;)]" EntityName="contact" />
      <Assign x:TypeArguments="mxs:Entity" To="[InputEntities(&quot;related_bah_veteranid#contact&quot;)]" Value="[CreatedEntities(&quot;related_bah_veteranid#contact#Temp&quot;)]" />
      <Persist />
    </Sequence>
    <Sequence DisplayName="CreateStep2: Create Correspondence record for form request">
      <Sequence.Variables>
        <Variable x:TypeArguments="x:Object" Name="CreateStep2_1" />
        <Variable x:TypeArguments="x:Object" Name="CreateStep2_2" />
        <Variable x:TypeArguments="x:Object" Name="CreateStep2_3" />
        <Variable x:TypeArguments="x:Object" Name="CreateStep2_4" />
        <Variable x:TypeArguments="x:Object" Name="CreateStep2_5" />
        <Variable x:TypeArguments="x:Object" Name="CreateStep2_6" />
        <Variable x:TypeArguments="x:Object" Name="CreateStep2_7" />
        <Variable x:TypeArguments="x:Object" Name="CreateStep2_8" />
        <Variable x:TypeArguments="x:Object" Name="CreateStep2_9" />
        <Variable x:TypeArguments="x:Object" Name="CreateStep2_10" />
        <Variable x:TypeArguments="x:Object" Name="CreateStep2_11" />
        <Variable x:TypeArguments="x:Object" Name="CreateStep2_12" />
        <Variable x:TypeArguments="x:Object" Name="CreateStep2_13" />
        <Variable x:TypeArguments="x:Object" Name="CreateStep2_14" />
        <Variable x:TypeArguments="x:Object" Name="CreateStep2_15" />
      </Sequence.Variables>
      <Assign x:TypeArguments="mxs:Entity" To="[CreatedEntities(&quot;CreateStep2_localParameter#Temp&quot;)]" Value="[New Entity(&quot;vhacrm_correspondence&quot;)]" />
      <mxswa:GetEntityProperty Attribute="bah_veteranid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="bah_interactions" Value="[CreateStep2_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() { CreateStep2_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">[CreateStep2_1]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="vhacrm_veteranid" Entity="[CreatedEntities(&quot;CreateStep2_localParameter#Temp&quot;)]" EntityName="vhacrm_correspondence" Value="[CreateStep2_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="bah_interactionsid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="bah_interactions" Value="[CreateStep2_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() { CreateStep2_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">[CreateStep2_3]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="vhacrm_interactionid" Entity="[CreatedEntities(&quot;CreateStep2_localParameter#Temp&quot;)]" EntityName="vhacrm_correspondence" Value="[CreateStep2_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: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.OptionSetValue, "713770001", "Picklist" }]</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">[CreateStep2_5]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="vhacrm_correspondencetype_code" Entity="[CreatedEntities(&quot;CreateStep2_localParameter#Temp&quot;)]" EntityName="vhacrm_correspondence" Value="[CreateStep2_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_availableformsid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="bah_interactions" Value="[CreateStep2_7]">
        <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() { CreateStep2_7 }]</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">[CreateStep2_6]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="vhacrm_correspondencetemplateid" Entity="[CreatedEntities(&quot;CreateStep2_localParameter#Temp&quot;)]" EntityName="vhacrm_correspondence" Value="[CreateStep2_6]">
        <mxswa:SetEntityProperty.TargetType>
          <InArgument x:TypeArguments="s:Type">
            <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:EntityReference" />
          </InArgument>
        </mxswa:SetEntityProperty.TargetType>
      </mxswa:SetEntityProperty>
      <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, "Email", "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">[CreateStep2_8]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="vhacrm_addressname_text" Entity="[CreatedEntities(&quot;CreateStep2_localParameter#Temp&quot;)]" EntityName="vhacrm_correspondence" Value="[CreateStep2_8]">
        <mxswa:SetEntityProperty.TargetType>
          <InArgument x:TypeArguments="s:Type">
            <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="x:String" />
          </InArgument>
        </mxswa:SetEntityProperty.TargetType>
      </mxswa:SetEntityProperty>
      <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, "False" }]</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">[CreateStep2_9]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="vhacrm_isnewaddress_bool" Entity="[CreatedEntities(&quot;CreateStep2_localParameter#Temp&quot;)]" EntityName="vhacrm_correspondence" Value="[CreateStep2_9]">
        <mxswa:SetEntityProperty.TargetType>
          <InArgument x:TypeArguments="s:Type">
            <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="x:Boolean" />
          </InArgument>
        </mxswa:SetEntityProperty.TargetType>
      </mxswa:SetEntityProperty>
      <mxswa:GetEntityProperty Attribute="vhacrm_lobid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="bah_interactions" Value="[CreateStep2_11]">
        <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() { CreateStep2_11 }]</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">[CreateStep2_10]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="vhacrm_lobid" Entity="[CreatedEntities(&quot;CreateStep2_localParameter#Temp&quot;)]" EntityName="vhacrm_correspondence" Value="[CreateStep2_10]">
        <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_emailaddress_text" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="bah_interactions" Value="[CreateStep2_13]">
        <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() { CreateStep2_13 }]</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">[CreateStep2_12]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="emailaddress" Entity="[CreatedEntities(&quot;CreateStep2_localParameter#Temp&quot;)]" EntityName="vhacrm_correspondence" Value="[CreateStep2_12]">
        <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_name" Entity="[InputEntities(&quot;related_vhacrm_casenotetemplateid#vhacrm_casenotetemplate&quot;)]" EntityName="vhacrm_casenotetemplate" Value="[CreateStep2_15]">
        <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() { CreateStep2_15 }]</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">[CreateStep2_14]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="vhacrm_name" Entity="[CreatedEntities(&quot;CreateStep2_localParameter#Temp&quot;)]" EntityName="vhacrm_correspondence" Value="[CreateStep2_14]">
        <mxswa:SetEntityProperty.TargetType>
          <InArgument x:TypeArguments="s:Type">
            <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="x:String" />
          </InArgument>
        </mxswa:SetEntityProperty.TargetType>
      </mxswa:SetEntityProperty>
      <mxswa:CreateEntity EntityId="{x:Null}" DisplayName="CreateStep2: Create Correspondence record for form request" Entity="[CreatedEntities(&quot;CreateStep2_localParameter#Temp&quot;)]" EntityName="vhacrm_correspondence" />
      <Assign x:TypeArguments="mxs:Entity" To="[CreatedEntities(&quot;CreateStep2_localParameter&quot;)]" Value="[CreatedEntities(&quot;CreateStep2_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="CustomActivityStep3: Determine which template to send and send it via N52 Rule VX7">
      <mxswa:ActivityReference.Properties>
        <sco:Collection x:TypeArguments="Variable" x:Key="Variables">
          <Variable x:TypeArguments="x:Object" Name="CustomActivityStep3_1" />
          <Variable x:TypeArguments="x:Object" Name="CustomActivityStep3_1_converted" />
          <Variable x:TypeArguments="x:Object" Name="CustomActivityStep3_2" />
          <Variable x:TypeArguments="x:Object" Name="CustomActivityStep3_2_converted" />
          <Variable x:TypeArguments="x:Object" Name="CustomActivityStep3_3" />
          <Variable x:TypeArguments="x:Object" Name="CustomActivityStep3_4" />
          <Variable x:TypeArguments="x:Object" Name="CustomActivityStep3_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, "VX7", "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">[CustomActivityStep3_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">[CustomActivityStep3_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">[CustomActivityStep3_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">[CustomActivityStep3_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">[CustomActivityStep3_2_converted]</OutArgument>
            </mxswa:ActivityReference.Arguments>
          </mxswa:ActivityReference>
          <mxswa:GetEntityProperty Attribute="vhacrm_correspondenceid" Entity="[CreatedEntities(&quot;CreateStep2_localParameter&quot;)]" EntityName="vhacrm_correspondence" Value="[CustomActivityStep3_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() { CustomActivityStep3_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">[CustomActivityStep3_3]</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">[CustomActivityStep3_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">[CustomActivityStep3_3_converted]</OutArgument>
            </mxswa:ActivityReference.Arguments>
          </mxswa:ActivityReference>
          <mxswa:ActivityReference AssemblyQualifiedName="North52.FormulaManager.WorkflowActivities.ExecuteFormula, North52.FormulaManager, Version=1.0.0.492, Culture=neutral, PublicKeyToken=a8878fd7dad60ca1" DisplayName="CustomActivityStep3: Determine which template to send and send it via N52 Rule VX7">
            <mxswa:ActivityReference.Arguments>
              <InArgument x:TypeArguments="x:String" x:Key="FormulaShortCode">[DirectCast(CustomActivityStep3_1_converted, System.String)]</InArgument>
              <InArgument x:TypeArguments="x:String" x:Key="FormulaParameterXml">[DirectCast(CustomActivityStep3_2_converted, System.String)]</InArgument>
              <InArgument x:TypeArguments="x:String" x:Key="PrimaryEntityId">[DirectCast(CustomActivityStep3_3_converted, System.String)]</InArgument>
              <OutArgument x:TypeArguments="x:String" x:Key="ResultString">[CustomActivityStep3ResultString_localParameter]</OutArgument>
              <OutArgument x:TypeArguments="x:Boolean" x:Key="ResultBoolean">[CustomActivityStep3ResultBoolean_localParameter]</OutArgument>
              <OutArgument x:TypeArguments="s:DateTime" x:Key="ResultDateTime">[CustomActivityStep3ResultDateTime_localParameter]</OutArgument>
              <OutArgument x:TypeArguments="x:Decimal" x:Key="ResultDecimal">[CustomActivityStep3ResultDecimal_localParameter]</OutArgument>
              <OutArgument x:TypeArguments="x:Double" x:Key="ResultDouble">[CustomActivityStep3ResultDouble_localParameter]</OutArgument>
              <OutArgument x:TypeArguments="x:Int32" x:Key="ResultInteger">[CustomActivityStep3ResultInteger_localParameter]</OutArgument>
              <OutArgument x:TypeArguments="mxs:Money" x:Key="ResultMoney">[CustomActivityStep3ResultMoney_localParameter]</OutArgument>
            </mxswa:ActivityReference.Arguments>
          </mxswa:ActivityReference>
        </sco:Collection>
      </mxswa:ActivityReference.Properties>
    </mxswa:ActivityReference>
  </mxswa:Workflow>
</Activity>