<Activity x:Class="XrmWorkflowe44cfc7ade694d25acd3fe6374253ee8" 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: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:XrmWorkflowe44cfc7ade694d25acd3fe6374253ee8.InputEntities>
    <InArgument x:TypeArguments="scg:IDictionary(x:String, mxs:Entity)" />
  </this:XrmWorkflowe44cfc7ade694d25acd3fe6374253ee8.InputEntities>
  <this:XrmWorkflowe44cfc7ade694d25acd3fe6374253ee8.CreatedEntities>
    <InArgument x:TypeArguments="scg:IDictionary(x:String, mxs:Entity)" />
  </this:XrmWorkflowe44cfc7ade694d25acd3fe6374253ee8.CreatedEntities>
  <mva:VisualBasic.Settings>Assembly references and imported namespaces for internal implementation</mva:VisualBasic.Settings>
  <mxswa:Workflow>
    <Sequence DisplayName="SendEmailStep21: Send Email when 'Email Veteran?' is selected">
      <Sequence.Variables>
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep21_1" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep21_2" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep21_3" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep21_4" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep21_5" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep21_6" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep21_7" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep21_8" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep21_9" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep21_10" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep21_11" />
      </Sequence.Variables>
      <Assign x:TypeArguments="mxs:Entity" To="[CreatedEntities(&quot;SendEmailStep21_localParameter#Temp&quot;)]" Value="[New Entity(&quot;email&quot;)]" />
      <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, "62082eba-34ac-e611-8124-127b25dcbde7", "Key" }]</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">[SendEmailStep21_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, "queue", "MHV", SendEmailStep21_3, "Lookup" }]</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">[SendEmailStep21_2]</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.PartyList, SendEmailStep21_2 }]</InArgument>
          <InArgument x:TypeArguments="s:Type" x:Key="TargetType">
            <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:EntityCollection" />
          </InArgument>
          <OutArgument x:TypeArguments="x:Object" x:Key="Result">[SendEmailStep21_1]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="from" Entity="[CreatedEntities(&quot;SendEmailStep21_localParameter#Temp&quot;)]" EntityName="email" Value="[SendEmailStep21_1]">
        <mxswa:SetEntityProperty.TargetType>
          <InArgument x:TypeArguments="s:Type">
            <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:EntityCollection" />
          </InArgument>
        </mxswa:SetEntityProperty.TargetType>
      </mxswa:SetEntityProperty>
      <mxswa:GetEntityProperty Attribute="customerid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="incident" Value="[SendEmailStep21_5]">
        <mxswa:GetEntityProperty.TargetType>
          <InArgument x:TypeArguments="s:Type">
            <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:EntityCollection" />
          </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() { SendEmailStep21_5 }]</InArgument>
          <InArgument x:TypeArguments="s:Type" x:Key="TargetType">
            <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:EntityCollection" />
          </InArgument>
          <OutArgument x:TypeArguments="x:Object" x:Key="Result">[SendEmailStep21_4]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="to" Entity="[CreatedEntities(&quot;SendEmailStep21_localParameter#Temp&quot;)]" EntityName="email" Value="[SendEmailStep21_4]">
        <mxswa:SetEntityProperty.TargetType>
          <InArgument x:TypeArguments="s:Type">
            <mxswa:ReferenceLiteral x:TypeArguments="s:Type" Value="mxs:EntityCollection" />
          </InArgument>
        </mxswa:SetEntityProperty.TargetType>
      </mxswa:SetEntityProperty>
      <mxswa:GetEntityProperty Attribute="incidentid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="incident" Value="[SendEmailStep21_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() { SendEmailStep21_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">[SendEmailStep21_6]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="regardingobjectid" Entity="[CreatedEntities(&quot;SendEmailStep21_localParameter#Temp&quot;)]" EntityName="email" Value="[SendEmailStep21_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:GetEntityProperty Attribute="customerid" Entity="[InputEntities(&quot;primaryEntity&quot;)]" EntityName="incident" Value="[SendEmailStep21_9]">
        <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() { SendEmailStep21_9 }]</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">[SendEmailStep21_8]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="vhacrm_veteranid" Entity="[CreatedEntities(&quot;SendEmailStep21_localParameter#Temp&quot;)]" EntityName="email" Value="[SendEmailStep21_8]">
        <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.Guid, "a76c3ba1-8f01-e611-811e-127b25dcbde7", "Key" }]</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">[SendEmailStep21_11]</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, "transactioncurrency", "US Dollar", SendEmailStep21_11, "Lookup" }]</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">[SendEmailStep21_10]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="transactioncurrencyid" Entity="[CreatedEntities(&quot;SendEmailStep21_localParameter#Temp&quot;)]" EntityName="email" Value="[SendEmailStep21_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:SendEmailFromTemplate EntityId="{x:Null}" DisplayName="SendEmailStep21: Send Email when 'Email Veteran?' is selected" Entity="[CreatedEntities(&quot;SendEmailStep21_localParameter#Temp&quot;)]" RegardingId="[InputEntities(&quot;primaryEntity&quot;).Id]" RegardingType="incident" TemplateId="6b92a938-8e9f-e611-8124-127b25dcbde7" />
      <Persist />
    </Sequence>
    <Sequence DisplayName="StopWorkflowStep22: Stop workflow if succeeded">
      <Sequence.Variables>
        <Variable x:TypeArguments="x:Object" Name="StopWorkflowStep22_1" />
        <Variable x:TypeArguments="x:String" Default="db174053-b063-4441-b004-8dda4116ed5f" 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">[StopWorkflowStep22_1]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <TerminateWorkflow DisplayName="StopWorkflowStep22: Stop workflow if succeeded" Exception="[New Microsoft.Xrm.Sdk.InvalidPluginExecutionException(Microsoft.Xrm.Sdk.OperationStatus.Succeeded)]" Reason="[DirectCast(StopWorkflowStep22_1, System.String)]" />
    </Sequence>
  </mxswa:Workflow>
</Activity>