<Activity x:Class="XrmWorkflowa36417dc1f4d49ac8985340437eb7d15" 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:XrmWorkflowa36417dc1f4d49ac8985340437eb7d15.InputEntities>
    <InArgument x:TypeArguments="scg:IDictionary(x:String, mxs:Entity)" />
  </this:XrmWorkflowa36417dc1f4d49ac8985340437eb7d15.InputEntities>
  <this:XrmWorkflowa36417dc1f4d49ac8985340437eb7d15.CreatedEntities>
    <InArgument x:TypeArguments="scg:IDictionary(x:String, mxs:Entity)" />
  </this:XrmWorkflowa36417dc1f4d49ac8985340437eb7d15.CreatedEntities>
  <mva:VisualBasic.Settings>Assembly references and imported namespaces for internal implementation</mva:VisualBasic.Settings>
  <mxswa:Workflow>
    <Sequence DisplayName="SendEmailStep2: Send email to Facility POC">
      <Sequence.Variables>
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep2_1" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep2_2" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep2_3" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep2_4" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep2_5" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep2_6" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep2_7" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep2_8" />
        <Variable x:TypeArguments="x:Object" Name="SendEmailStep2_9" />
      </Sequence.Variables>
      <Assign x:TypeArguments="mxs:Entity" To="[CreatedEntities(&quot;SendEmailStep2_localParameter#Temp&quot;)]" Value="[New Entity(&quot;email&quot;)]" />
      <mxswa:GetEntityProperty Attribute="queueid" Entity="[InputEntities(&quot;related_owningteam#team&quot;)]" EntityName="team" Value="[SendEmailStep2_2]">
        <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() { SendEmailStep2_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">[SendEmailStep2_1]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="to" Entity="[CreatedEntities(&quot;SendEmailStep2_localParameter#Temp&quot;)]" EntityName="email" Value="[SendEmailStep2_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: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, "cd785df8-bb16-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">[SendEmailStep2_5]</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", "NCCHV Supervisor Review", SendEmailStep2_5, "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">[SendEmailStep2_4]</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, SendEmailStep2_4 }]</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">[SendEmailStep2_3]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="cc" Entity="[CreatedEntities(&quot;SendEmailStep2_localParameter#Temp&quot;)]" EntityName="email" Value="[SendEmailStep2_3]">
        <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="[SendEmailStep2_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() { SendEmailStep2_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">[SendEmailStep2_6]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="regardingobjectid" Entity="[CreatedEntities(&quot;SendEmailStep2_localParameter#Temp&quot;)]" EntityName="email" Value="[SendEmailStep2_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.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">[SendEmailStep2_9]</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", SendEmailStep2_9, "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">[SendEmailStep2_8]</OutArgument>
        </mxswa:ActivityReference.Arguments>
      </mxswa:ActivityReference>
      <mxswa:SetEntityProperty Attribute="transactioncurrencyid" Entity="[CreatedEntities(&quot;SendEmailStep2_localParameter#Temp&quot;)]" EntityName="email" Value="[SendEmailStep2_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:SendEmailFromTemplate EntityId="{x:Null}" DisplayName="SendEmailStep2: Send email to Facility POC" Entity="[CreatedEntities(&quot;SendEmailStep2_localParameter#Temp&quot;)]" RegardingId="[InputEntities(&quot;primaryEntity&quot;).Id]" RegardingType="incident" TemplateId="d07ae4c6-8610-e611-811e-127b25dcbde7" />
      <Persist />
    </Sequence>
  </mxswa:Workflow>
</Activity>