619. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2/1/2017 2:56:53 PM Eastern Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

619.1 Files compared

# Location File Last Modified
1 C:\Araxis_Merge_Comprasion\Pub_un\BTSSS_CIF_122016.zip\BTSSS_CIF_12_20_16\clean\CRM\trunk\SDK\SampleCode\CS\Process\Workflows CreateProcessFromTemplate.cs Tue Dec 20 19:51:45 2016 UTC
2 Wed Feb 1 19:56:53 2017 UTC

619.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 0 0
Changed 0 0
Inserted 0 0
Removed 1 828

619.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

619.4 Active regular expressions

No regular expressions were active.

619.5 Comparison detail

1   // ======= ========== ========== ========== ========== ========== ========== ========== =        
2   //  This f ile is par t of the M icrosoft D ynamics CR M SDK Code  Samples.        
3   //        
4   //  Copyri ght (C) Mi crosoft Co rporation.   All righ ts reserve d.        
5   //        
6   //  This s ource code  is intend ed only as  a supplem ent to Mic rosoft        
7   //  Develo pment Tool s and/or o n-line doc umentation .  See the se other        
8   //  materi als for de tailed inf ormation r egarding M icrosoft c ode sample s.        
9   //        
10   //  THIS C ODE AND IN FORMATION  ARE PROVID ED "AS IS"  WITHOUT W ARRANTY OF  ANY        
11   //  KIND,  EITHER EXP RESSED OR  IMPLIED, I NCLUDING B UT NOT LIM ITED TO TH E        
12   //  IMPLIE D WARRANTI ES OF MERC HANTABILIT Y AND/OR F ITNESS FOR  A        
13   //  PARTIC ULAR PURPO SE.        
14   // ======= ========== ========== ========== ========== ========== ========== ========== =        
15          
16   //<snippet CreateProc essFromTem plate>        
17   using Syst em;        
18   using Syst em.Service Model;        
19          
20   // These n amespaces  are found  in the Mic rosoft.Xrm .Sdk.dll a ssembly        
21   // found i n the SDK\ bin folder .        
22   using Micr osoft.Xrm. Sdk;        
23   using Micr osoft.Xrm. Sdk.Client ;        
24   using Micr osoft.Xrm. Sdk.Query;        
25          
26   // This na mespace is  found in  Microsoft. Crm.Sdk.Pr oxy.dll as sembly        
27   // found i n the SDK\ bin folder .        
28   using Micr osoft.Crm. Sdk.Messag es;        
29          
30   namespace  Microsoft. Crm.Sdk.Sa mples        
31   {        
32       /// <s ummary>        
33       /// Cr eate a Wor kflow Proc ess from a n existing  Process T emplate.        
34       /// </ summary>        
35       public  class Cre ateProcess FromTempla te        
36       {        
37          
38           #r egion Clas s Level Me mbers        
39          
40           pr ivate Guid  _processT emplateId;        
41           pr ivate Guid  _processI d;        
42           pr ivate Orga nizationSe rviceProxy  _serviceP roxy;        
43          
44           #e ndregion C lass Level  Members        
45          
46           #r egion How- To Sample  Code        
47           // / <summary >        
48           // / Demonstr ates how t o programm atically c reate a Wo rkflow fro m an exist ing        
49           // / Process  Template.        
50           // / </summar y>        
51           // / <param n ame="serve rConfig">C ontains se rver conne ction info rmation.</ param>        
52           // / <param n ame="promp tforDelete ">When Tru e, the use r will be  prompted t o delete a ll        
53           // / created  entities.< /param>        
54           pu blic void  Run(Server Connection .Configura tion serve rConfig, b ool prompt forDelete)        
55           {        
56                try        
57                {        
58                    //<s nippetCrea teProcessF romTemplat e1>        
59                    // C onnect to  the Organi zation ser vice.         
60                    // T he using s tatement a ssures tha t the serv ice proxy  will be pr operly dis posed.        
61                    usin g (_servic eProxy = n ew Organiz ationServi ceProxy(se rverConfig .Organizat ionUri, se rverConfig .HomeRealm Uri,        
62                                                                              s erverConfi g.Credenti als, serve rConfig.De viceCreden tials))        
63                    {        
64                         // This st atement is  required  to enable  early-boun d type sup port.        
65                         _servicePr oxy.Enable ProxyTypes ();        
66          
67                         Organizati onServiceC ontext _or gContext =  new Organ izationSer viceContex t(_service Proxy);        
68          
69                         CreateRequ iredRecord s();        
70          
71                         CreateWork flowFromTe mplateRequ est reques t = new Cr eateWorkfl owFromTemp lateReques t()        
72                         {        
73                             Workfl owName = " Workflow F rom Templa te",        
74                             Workfl owTemplate Id = _proc essTemplat eId        
75                         };        
76          
77                         // Execute  request.        
78                         CreateWork flowFromTe mplateResp onse respo nse = (Cre ateWorkflo wFromTempl ateRespons e)_service Proxy.Exec ute(reques t);        
79                         _processId  = respons e.Id;        
80          
81                         // Verify  success.        
82                         // Retriev e the name  of the wo rkflow.        
83                         ColumnSet  cols = new  ColumnSet ("name");        
84                         Workflow n ewWorkflow  = (Workfl ow)_servic eProxy.Ret rieve(Work flow.Entit yLogicalNa me, respon se.Id, col s);        
85                         if (newWor kflow.Name  == "Workf low From T emplate")        
86                         {        
87                             Consol e.WriteLin e("Created  {0}.", re quest.Work flowName);        
88                         }        
89          
90                         DeleteRequ iredRecord s(promptfo rDelete);        
91                    }        
92                    //</ snippetCre ateProcess FromTempla te1>        
93                }        
94          
95                // Catch  any servi ce fault e xceptions  that Micro soft Dynam ics CRM th rows.        
96                catch (F aultExcept ion<Micros oft.Xrm.Sd k.Organiza tionServic eFault>)        
97                {        
98                    // Y ou can han dle an exc eption her e or pass  it back to  the calli ng method.        
99                    thro w;        
100                }        
101           }        
102          
103           // / <summary >        
104           // / Creates  any entity  records t hat this s ample requ ires.        
105           // / </summar y>        
106           pu blic void  CreateRequ iredRecord s()        
107           {        
108          
109                // Defin e an anony mous type  to define  the possib le values  for        
110                // proce ss type        
111                var Proc essType =  new        
112                {        
113                    Defi nition = 1 ,        
114                    Acti vation = 2 ,        
115                    Temp late = 3        
116                };        
117          
118                // Defin e an anony mous type  to define  the possib le values  for        
119                // proce ss categor y        
120                var Proc essCategor y = new        
121                {        
122                    Work flow = 0,        
123                    Dial og = 1,        
124                };        
125          
126                // Defin e an anony mous type  to define  the possib le values  for        
127                // proce ss scope        
128                var Proc essScope =  new        
129                {        
130                    User  = 1,        
131                    Busi nessUnit =  2,        
132                    Deep  = 3,        
133                    Glob al = 4        
134                };        
135          
136                // Creat e the Work flow templ ate that w e will use  to genera te the Wor kflow.        
137                Workflow  processTe mplate = n ew Workflo w()        
138                {        
139                    Name  = "Sample  Process T emplate",        
140                    Type  = new Opt ionSetValu e(ProcessT ype.Templa te),        
141                    Cate gory = new  OptionSet Value(Proc essCategor y.Workflow ),        
142                    Scop e = new Op tionSetVal ue(Process Scope.User ),        
143          
144                    //La nguage cod e for U.S.  English        
145                    Lang uageCode =  1033,        
146                    Trig gerOnCreat e = true,        
147                    OnDe mand = fal se,        
148                    Prim aryEntity  = Account. EntityLogi calName,        
149                    Xaml  =        
150   @"<?xml ve rsion=""1. 0"" encodi ng=""utf-1 6""?>        
151   <Activity  x:Class="" SampleWork flow"" xml ns=""http: //schemas. microsoft. com/netfx/ 2009/xaml/ activities "" xmlns:m va=""clr-n amespace:M icrosoft.V isualBasic .Activitie s;assembly =System.Ac tivities,  Version=4. 0.0.0, Cul ture=neutr al, Public KeyToken=3 1bf3856ad3 64e35"" xm lns:mxs="" clr-namesp ace:Micros oft.Xrm.Sd k;assembly =Microsoft .Xrm.Sdk,  Version=5. 0.0.0, Cul ture=neutr al, Public KeyToken=3 1bf3856ad3 64e35"" xm lns:mxsq=" "clr-names pace:Micro soft.Xrm.S dk.Query;a ssembly=Mi crosoft.Xr m.Sdk, Ver sion=5.0.0 .0, Cultur e=neutral,  PublicKey Token=31bf 3856ad364e 35"" xmlns :mxswa=""c lr-namespa ce:Microso ft.Xrm.Sdk .Workflow. Activities ;assembly= Microsoft. Xrm.Sdk.Wo rkflow, Ve rsion=5.0. 0.0, Cultu re=neutral , PublicKe yToken=31b f3856ad364 e35"" xmln s:s=""clr- namespace: System;ass embly=msco rlib, Vers ion=4.0.0. 0, Culture =neutral,  PublicKeyT oken=b77a5 c561934e08 9"" xmlns: scg=""clr- namespace: System.Col lections.G eneric;ass embly=msco rlib, Vers ion=4.0.0. 0, Culture =neutral,  PublicKeyT oken=b77a5 c561934e08 9"" xmlns: sco=""clr- namespace: System.Col lections.O bjectModel ;assembly= mscorlib,  Version=4. 0.0.0, Cul ture=neutr al, Public KeyToken=b 77a5c56193 4e089"" xm lns:srs="" clr-namesp ace:System .Runtime.S erializati on;assembl y=System.R untime.Ser ialization , Version= 4.0.0.0, C ulture=neu tral, Publ icKeyToken =b77a5c561 934e089""  xmlns:this =""clr-nam espace:""  xmlns:x="" http://sch emas.micro soft.com/w infx/2006/ xaml"">        
152     <x:Membe rs>        
153       <x:Pro perty Name =""InputEn tities"" T ype=""InAr gument(scg :IDictiona ry(x:Strin g, mxs:Ent ity))"" />        
154       <x:Pro perty Name =""Created Entities""  Type=""In Argument(s cg:IDictio nary(x:Str ing, mxs:E ntity))""  />        
155     </x:Memb ers>        
156     <this:Sa mpleWorkfl ow.InputEn tities>        
157       <InArg ument x:Ty peArgument s=""scg:ID ictionary( x:String,  mxs:Entity )"" />        
158     </this:S ampleWorkf low.InputE ntities>        
159     <this:Sa mpleWorkfl ow.Created Entities>        
160       <InArg ument x:Ty peArgument s=""scg:ID ictionary( x:String,  mxs:Entity )"" />        
161     </this:S ampleWorkf low.Create dEntities>        
162     <mva:Vis ualBasic.S ettings>As sembly ref erences an d imported  namespace s for inte rnal imple mentation< /mva:Visua lBasic.Set tings>        
163     <mxswa:W orkflow>        
164       <mxswa :ActivityR eference A ssemblyQua lifiedName =""Microso ft.Crm.Wor kflow.Acti vities.Con ditionSequ ence, Micr osoft.Crm. Workflow,  Version=5. 0.0.0, Cul ture=neutr al, Public KeyToken=3 1bf3856ad3 64e35"" Di splayName= ""Conditio nStep1: If  Account N ame is in  the &quot; Sample&quo t; family" ">        
165         <mxs wa:Activit yReference .Arguments >        
166           <I nArgument  x:TypeArgu ments=""x: Boolean""  x:Key=""Wa it"">False </InArgume nt>        
167         </mx swa:Activi tyReferenc e.Argument s>        
168         <mxs wa:Activit yReference .Propertie s>        
169           <s co:Collect ion x:Type Arguments= ""Variable "" x:Key=" "Variables "">        
170              <Variable  x:TypeArgu ments=""x: Boolean""  Default="" False"" Na me=""Condi tionBranch Step2_cond ition"" />        
171              <Variable  x:TypeArgu ments=""x: Object"" N ame=""Cond itionBranc hStep2_1""  />        
172              <Variable  x:TypeArgu ments=""x: Object"" N ame=""Cond itionBranc hStep2_2""  />        
173           </ sco:Collec tion>        
174           <s co:Collect ion x:Type Arguments= ""Activity "" x:Key=" "Activitie s"">        
175              <mxswa:Get EntityProp erty Attri bute=""nam e"" Entity =""[InputE ntities(&q uot;primar yEntity&qu ot;)]"" En tityName=" "account""  Value=""[ ConditionB ranchStep2 _1]"">        
176                <mxswa:G etEntityPr operty.Tar getType>        
177                  <InArg ument x:Ty peArgument s=""s:Type "">        
178                    <mxs wa:Referen ceLiteral  x:TypeArgu ments=""s: Type"">        
179                      <x :Null />        
180                    </mx swa:Refere nceLiteral >        
181                  </InAr gument>        
182                </mxswa: GetEntityP roperty.Ta rgetType>        
183              </mxswa:Ge tEntityPro perty>        
184              <mxswa:Act ivityRefer ence Assem blyQualifi edName=""M icrosoft.C rm.Workflo w.Activiti es.Evaluat eExpressio n, Microso ft.Crm.Wor kflow, Ver sion=5.0.0 .0, Cultur e=neutral,  PublicKey Token=31bf 3856ad364e 35"" Displ ayName=""E valuateExp ression"">        
185                <mxswa:A ctivityRef erence.Arg uments>        
186                  <InArg ument x:Ty peArgument s=""x:Stri ng"" x:Key =""Express ionOperato r"">Create CrmType</I nArgument>        
187                  <InArg ument x:Ty peArgument s=""s:Obje ct[]"" x:K ey=""Param eters"">[N ew Object( ) { Micros oft.Xrm.Sd k.Workflow .WorkflowP ropertyTyp e.String,  ""Sample"" , ""String "" }]</InA rgument>        
188                  <InArg ument x:Ty peArgument s=""s:Type "" x:Key=" "TargetTyp e"">        
189                    <mxs wa:Referen ceLiteral  x:TypeArgu ments=""s: Type"" Val ue=""x:Str ing"" />        
190                  </InAr gument>        
191                  <OutAr gument x:T ypeArgumen ts=""x:Obj ect"" x:Ke y=""Result "">[Condit ionBranchS tep2_2]</O utArgument >        
192                </mxswa: ActivityRe ference.Ar guments>        
193              </mxswa:Ac tivityRefe rence>        
194              <mxswa:Act ivityRefer ence Assem blyQualifi edName=""M icrosoft.C rm.Workflo w.Activiti es.Evaluat eCondition , Microsof t.Crm.Work flow, Vers ion=5.0.0. 0, Culture =neutral,  PublicKeyT oken=31bf3 856ad364e3 5"" Displa yName=""Ev aluateCond ition"">        
195                <mxswa:A ctivityRef erence.Arg uments>        
196                  <InArg ument x:Ty peArgument s=""mxsq:C onditionOp erator"" x :Key=""Con ditionOper ator"">Con tains</InA rgument>        
197                  <InArg ument x:Ty peArgument s=""s:Obje ct[]"" x:K ey=""Param eters"">[N ew Object( ) { Condit ionBranchS tep2_2 }]< /InArgumen t>        
198                  <InArg ument x:Ty peArgument s=""x:Obje ct"" x:Key =""Operand "">[Condit ionBranchS tep2_1]</I nArgument>        
199                  <OutAr gument x:T ypeArgumen ts=""x:Boo lean"" x:K ey=""Resul t"">[Condi tionBranch Step2_cond ition]</Ou tArgument>        
200                </mxswa: ActivityRe ference.Ar guments>        
201              </mxswa:Ac tivityRefe rence>        
202              <mxswa:Act ivityRefer ence Assem blyQualifi edName=""M icrosoft.C rm.Workflo w.Activiti es.Conditi onBranch,  Microsoft. Crm.Workfl ow, Versio n=5.0.0.0,  Culture=n eutral, Pu blicKeyTok en=31bf385 6ad364e35" " DisplayN ame=""Cond itionBranc hStep2"">        
203                <mxswa:A ctivityRef erence.Arg uments>        
204                  <InArg ument x:Ty peArgument s=""x:Bool ean"" x:Ke y=""Condit ion"">[Con ditionBran chStep2_co ndition]</ InArgument >        
205                </mxswa: ActivityRe ference.Ar guments>        
206                <mxswa:A ctivityRef erence.Pro perties>        
207                  <mxswa :ActivityR eference x :Key=""The n"" Assemb lyQualifie dName=""Mi crosoft.Cr m.Workflow .Activitie s.Composit e, Microso ft.Crm.Wor kflow, Ver sion=5.0.0 .0, Cultur e=neutral,  PublicKey Token=31bf 3856ad364e 35"" Displ ayName=""C onditionBr anchStep2" ">        
208                    <mxs wa:Activit yReference .Propertie s>        
209                      <s co:Collect ion x:Type Arguments= ""Variable "" x:Key=" "Variables "" />        
210                      <s co:Collect ion x:Type Arguments= ""Activity "" x:Key=" "Activitie s"">        
211                         <Sequence  DisplayNam e=""Create Step3: Add  new conta ct for Nan cy Anderso n at new a ccount."">        
212                           <Sequenc e.Variable s>        
213                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_1"" />        
214                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_2"" />        
215                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_3"" />        
216                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_4"" />        
217                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_5"" />        
218                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_6"" />        
219                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_7"" />        
220                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_8"" />        
221                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_9"" />        
222                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_10"" />        
223                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_11"" />        
224                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_12"" />        
225                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_13"" />        
226                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_14"" />        
227                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_15"" />        
228                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_16"" />        
229                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_17"" />        
230                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_18"" />        
231                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_19"" />        
232                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_20"" />        
233                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_21"" />        
234                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_22"" />        
235                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_23"" />        
236                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_24"" />        
237                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_25"" />        
238                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_26"" />        
239                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_27"" />        
240                             <Varia ble x:Type Arguments= ""x:Object "" Name="" CreateStep 3_28"" />        
241                           </Sequen ce.Variabl es>        
242                           <Assign  x:TypeArgu ments=""mx s:Entity""  To=""[Cre atedEntiti es(&quot;C reateStep3 _localPara meter#Temp &quot;)]""  Value=""[ New Entity (&quot;con tact&quot; )]"" />        
243                           <mxswa:G etEntityPr operty Att ribute=""t elephone1" " Entity=" "[InputEnt ities(&quo t;primaryE ntity&quot ;)]"" Enti tyName=""a ccount"" V alue=""[Cr eateStep3_ 2]"">        
244                             <mxswa :GetEntity Property.T argetType>        
245                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
246                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:S tring"" />        
247                               </In Argument>        
248                             </mxsw a:GetEntit yProperty. TargetType >        
249                           </mxswa: GetEntityP roperty>        
250                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
251                             <mxswa :ActivityR eference.A rguments>        
252                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Sele ctFirstNon Null</InAr gument>        
253                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Crea teStep3_2  }]</InArgu ment>        
254                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
255                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:S tring"" />        
256                               </In Argument>        
257                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_1] </OutArgum ent>        
258                             </mxsw a:Activity Reference. Arguments>        
259                           </mxswa: ActivityRe ference>        
260                           <mxswa:S etEntityPr operty Att ribute=""t elephone1" " Entity=" "[CreatedE ntities(&q uot;Create Step3_loca lParameter #Temp&quot ;)]"" Enti tyName=""c ontact"" V alue=""[Cr eateStep3_ 1]"">        
261                             <mxswa :SetEntity Property.T argetType>        
262                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
263                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:S tring"" />        
264                               </In Argument>        
265                             </mxsw a:SetEntit yProperty. TargetType >        
266                           </mxswa: SetEntityP roperty>        
267                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
268                             <mxswa :ActivityR eference.A rguments>        
269                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
270                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.String , ""Nancy" ", ""Strin g"" }]</In Argument>        
271                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
272                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:S tring"" />        
273                               </In Argument>        
274                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_3] </OutArgum ent>        
275                             </mxsw a:Activity Reference. Arguments>        
276                           </mxswa: ActivityRe ference>        
277                           <mxswa:S etEntityPr operty Att ribute=""f irstname""  Entity="" [CreatedEn tities(&qu ot;CreateS tep3_local Parameter# Temp&quot; )]"" Entit yName=""co ntact"" Va lue=""[Cre ateStep3_3 ]"">        
278                             <mxswa :SetEntity Property.T argetType>        
279                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
280                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:S tring"" />        
281                               </In Argument>        
282                             </mxsw a:SetEntit yProperty. TargetType >        
283                           </mxswa: SetEntityP roperty>        
284                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
285                             <mxswa :ActivityR eference.A rguments>        
286                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
287                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.String , ""Anders on"", ""St ring"" }]< /InArgumen t>        
288                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
289                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:S tring"" />        
290                               </In Argument>        
291                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_4] </OutArgum ent>        
292                             </mxsw a:Activity Reference. Arguments>        
293                           </mxswa: ActivityRe ference>        
294                           <mxswa:S etEntityPr operty Att ribute=""l astname""  Entity=""[ CreatedEnt ities(&quo t;CreateSt ep3_localP arameter#T emp&quot;) ]"" Entity Name=""con tact"" Val ue=""[Crea teStep3_4] "">        
295                             <mxswa :SetEntity Property.T argetType>        
296                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
297                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:S tring"" />        
298                               </In Argument>        
299                             </mxsw a:SetEntit yProperty. TargetType >        
300                           </mxswa: SetEntityP roperty>        
301                           <mxswa:G etEntityPr operty Att ribute=""a ccountid""  Entity="" [InputEnti ties(&quot ;primaryEn tity&quot; )]"" Entit yName=""ac count"" Va lue=""[Cre ateStep3_6 ]"">        
302                             <mxswa :GetEntity Property.T argetType>        
303                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
304                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :EntityRef erence"" / >        
305                               </In Argument>        
306                             </mxsw a:GetEntit yProperty. TargetType >        
307                           </mxswa: GetEntityP roperty>        
308                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
309                             <mxswa :ActivityR eference.A rguments>        
310                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Sele ctFirstNon Null</InAr gument>        
311                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Crea teStep3_6  }]</InArgu ment>        
312                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
313                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :EntityRef erence"" / >        
314                               </In Argument>        
315                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_5] </OutArgum ent>        
316                             </mxsw a:Activity Reference. Arguments>        
317                           </mxswa: ActivityRe ference>        
318                           <mxswa:S etEntityPr operty Att ribute=""p arentcusto merid"" En tity=""[Cr eatedEntit ies(&quot; CreateStep 3_localPar ameter#Tem p&quot;)]" " EntityNa me=""conta ct"" Value =""[Create Step3_5]"" >        
319                             <mxswa :SetEntity Property.T argetType>        
320                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
321                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :EntityRef erence"" / >        
322                               </In Argument>        
323                             </mxsw a:SetEntit yProperty. TargetType >        
324                           </mxswa: SetEntityP roperty>        
325                           <mxswa:G etEntityPr operty Att ribute=""t ransaction currencyid "" Entity= ""[InputEn tities(&qu ot;related _transacti oncurrency id#transac tioncurren cy&quot;)] "" EntityN ame=""tran sactioncur rency"" Va lue=""[Cre ateStep3_8 ]"">        
326                             <mxswa :GetEntity Property.T argetType>        
327                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
328                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :EntityRef erence"" / >        
329                               </In Argument>        
330                             </mxsw a:GetEntit yProperty. TargetType >        
331                           </mxswa: GetEntityP roperty>        
332                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
333                             <mxswa :ActivityR eference.A rguments>        
334                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Sele ctFirstNon Null</InAr gument>        
335                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Crea teStep3_8  }]</InArgu ment>        
336                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
337                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :EntityRef erence"" / >        
338                               </In Argument>        
339                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_7] </OutArgum ent>        
340                             </mxsw a:Activity Reference. Arguments>        
341                           </mxswa: ActivityRe ference>        
342                           <mxswa:S etEntityPr operty Att ribute=""t ransaction currencyid "" Entity= ""[Created Entities(& quot;Creat eStep3_loc alParamete r#Temp&quo t;)]"" Ent ityName="" contact""  Value=""[C reateStep3 _7]"">        
343                             <mxswa :SetEntity Property.T argetType>        
344                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
345                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :EntityRef erence"" / >        
346                               </In Argument>        
347                             </mxsw a:SetEntit yProperty. TargetType >        
348                           </mxswa: SetEntityP roperty>        
349                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
350                             <mxswa :ActivityR eference.A rguments>        
351                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
352                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Boolea n, ""False "" }]</InA rgument>        
353                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
354                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:B oolean"" / >        
355                               </In Argument>        
356                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_9] </OutArgum ent>        
357                             </mxsw a:Activity Reference. Arguments>        
358                           </mxswa: ActivityRe ference>        
359                           <mxswa:S etEntityPr operty Att ribute=""c reditonhol d"" Entity =""[Create dEntities( &quot;Crea teStep3_lo calParamet er#Temp&qu ot;)]"" En tityName=" "contact""  Value=""[ CreateStep 3_9]"">        
360                             <mxswa :SetEntity Property.T argetType>        
361                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
362                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:B oolean"" / >        
363                               </In Argument>        
364                             </mxsw a:SetEntit yProperty. TargetType >        
365                           </mxswa: SetEntityP roperty>        
366                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
367                             <mxswa :ActivityR eference.A rguments>        
368                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
369                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Option SetValue,  ""1"", ""P icklist""  }]</InArgu ment>        
370                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
371                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
372                               </In Argument>        
373                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_10 ]</OutArgu ment>        
374                             </mxsw a:Activity Reference. Arguments>        
375                           </mxswa: ActivityRe ference>        
376                           <mxswa:S etEntityPr operty Att ribute=""p referredco ntactmetho dcode"" En tity=""[Cr eatedEntit ies(&quot; CreateStep 3_localPar ameter#Tem p&quot;)]" " EntityNa me=""conta ct"" Value =""[Create Step3_10]" ">        
377                             <mxswa :SetEntity Property.T argetType>        
378                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
379                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
380                               </In Argument>        
381                             </mxsw a:SetEntit yProperty. TargetType >        
382                           </mxswa: SetEntityP roperty>        
383                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
384                             <mxswa :ActivityR eference.A rguments>        
385                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
386                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Boolea n, ""False "" }]</InA rgument>        
387                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
388                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:B oolean"" / >        
389                               </In Argument>        
390                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_11 ]</OutArgu ment>        
391                             </mxsw a:Activity Reference. Arguments>        
392                           </mxswa: ActivityRe ference>        
393                           <mxswa:S etEntityPr operty Att ribute=""d onotemail" " Entity=" "[CreatedE ntities(&q uot;Create Step3_loca lParameter #Temp&quot ;)]"" Enti tyName=""c ontact"" V alue=""[Cr eateStep3_ 11]"">        
394                             <mxswa :SetEntity Property.T argetType>        
395                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
396                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:B oolean"" / >        
397                               </In Argument>        
398                             </mxsw a:SetEntit yProperty. TargetType >        
399                           </mxswa: SetEntityP roperty>        
400                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
401                             <mxswa :ActivityR eference.A rguments>        
402                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
403                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Boolea n, ""False "" }]</InA rgument>        
404                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
405                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:B oolean"" / >        
406                               </In Argument>        
407                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_12 ]</OutArgu ment>        
408                             </mxsw a:Activity Reference. Arguments>        
409                           </mxswa: ActivityRe ference>        
410                           <mxswa:S etEntityPr operty Att ribute=""d onotbulkem ail"" Enti ty=""[Crea tedEntitie s(&quot;Cr eateStep3_ localParam eter#Temp& quot;)]""  EntityName =""contact "" Value=" "[CreateSt ep3_12]"">        
411                             <mxswa :SetEntity Property.T argetType>        
412                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
413                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:B oolean"" / >        
414                               </In Argument>        
415                             </mxsw a:SetEntit yProperty. TargetType >        
416                           </mxswa: SetEntityP roperty>        
417                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
418                             <mxswa :ActivityR eference.A rguments>        
419                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
420                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Boolea n, ""False "" }]</InA rgument>        
421                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
422                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:B oolean"" / >        
423                               </In Argument>        
424                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_13 ]</OutArgu ment>        
425                             </mxsw a:Activity Reference. Arguments>        
426                           </mxswa: ActivityRe ference>        
427                           <mxswa:S etEntityPr operty Att ribute=""d onotphone" " Entity=" "[CreatedE ntities(&q uot;Create Step3_loca lParameter #Temp&quot ;)]"" Enti tyName=""c ontact"" V alue=""[Cr eateStep3_ 13]"">        
428                             <mxswa :SetEntity Property.T argetType>        
429                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
430                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:B oolean"" / >        
431                               </In Argument>        
432                             </mxsw a:SetEntit yProperty. TargetType >        
433                           </mxswa: SetEntityP roperty>        
434                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
435                             <mxswa :ActivityR eference.A rguments>        
436                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
437                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Boolea n, ""False "" }]</InA rgument>        
438                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
439                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:B oolean"" / >        
440                               </In Argument>        
441                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_14 ]</OutArgu ment>        
442                             </mxsw a:Activity Reference. Arguments>        
443                           </mxswa: ActivityRe ference>        
444                           <mxswa:S etEntityPr operty Att ribute=""d onotfax""  Entity=""[ CreatedEnt ities(&quo t;CreateSt ep3_localP arameter#T emp&quot;) ]"" Entity Name=""con tact"" Val ue=""[Crea teStep3_14 ]"">        
445                             <mxswa :SetEntity Property.T argetType>        
446                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
447                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:B oolean"" / >        
448                               </In Argument>        
449                             </mxsw a:SetEntit yProperty. TargetType >        
450                           </mxswa: SetEntityP roperty>        
451                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
452                             <mxswa :ActivityR eference.A rguments>        
453                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
454                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Boolea n, ""False "" }]</InA rgument>        
455                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
456                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:B oolean"" / >        
457                               </In Argument>        
458                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_15 ]</OutArgu ment>        
459                             </mxsw a:Activity Reference. Arguments>        
460                           </mxswa: ActivityRe ference>        
461                           <mxswa:S etEntityPr operty Att ribute=""d onotpostal mail"" Ent ity=""[Cre atedEntiti es(&quot;C reateStep3 _localPara meter#Temp &quot;)]""  EntityNam e=""contac t"" Value= ""[CreateS tep3_15]"" >        
462                             <mxswa :SetEntity Property.T argetType>        
463                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
464                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:B oolean"" / >        
465                               </In Argument>        
466                             </mxsw a:SetEntit yProperty. TargetType >        
467                           </mxswa: SetEntityP roperty>        
468                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
469                             <mxswa :ActivityR eference.A rguments>        
470                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
471                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Boolea n, ""False "" }]</InA rgument>        
472                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
473                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:B oolean"" / >        
474                               </In Argument>        
475                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_16 ]</OutArgu ment>        
476                             </mxsw a:Activity Reference. Arguments>        
477                           </mxswa: ActivityRe ference>        
478                           <mxswa:S etEntityPr operty Att ribute=""d onotsendmm "" Entity= ""[Created Entities(& quot;Creat eStep3_loc alParamete r#Temp&quo t;)]"" Ent ityName="" contact""  Value=""[C reateStep3 _16]"">        
479                             <mxswa :SetEntity Property.T argetType>        
480                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
481                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:B oolean"" / >        
482                               </In Argument>        
483                             </mxsw a:SetEntit yProperty. TargetType >        
484                           </mxswa: SetEntityP roperty>        
485                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
486                             <mxswa :ActivityR eference.A rguments>        
487                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
488                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Option SetValue,  ""1"", ""P icklist""  }]</InArgu ment>        
489                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
490                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
491                               </In Argument>        
492                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_17 ]</OutArgu ment>        
493                             </mxsw a:Activity Reference. Arguments>        
494                           </mxswa: ActivityRe ference>        
495                           <mxswa:S etEntityPr operty Att ribute=""p referredap pointmentt imecode""  Entity=""[ CreatedEnt ities(&quo t;CreateSt ep3_localP arameter#T emp&quot;) ]"" Entity Name=""con tact"" Val ue=""[Crea teStep3_17 ]"">        
496                             <mxswa :SetEntity Property.T argetType>        
497                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
498                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
499                               </In Argument>        
500                             </mxsw a:SetEntit yProperty. TargetType >        
501                           </mxswa: SetEntityP roperty>        
502                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
503                             <mxswa :ActivityR eference.A rguments>        
504                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
505                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Option SetValue,  ""1"", ""P icklist""  }]</InArgu ment>        
506                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
507                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
508                               </In Argument>        
509                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_18 ]</OutArgu ment>        
510                             </mxsw a:Activity Reference. Arguments>        
511                           </mxswa: ActivityRe ference>        
512                           <mxswa:S etEntityPr operty Att ribute=""a ddress2_ad dresstypec ode"" Enti ty=""[Crea tedEntitie s(&quot;Cr eateStep3_ localParam eter#Temp& quot;)]""  EntityName =""contact "" Value=" "[CreateSt ep3_18]"">        
513                             <mxswa :SetEntity Property.T argetType>        
514                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
515                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
516                               </In Argument>        
517                             </mxsw a:SetEntit yProperty. TargetType >        
518                           </mxswa: SetEntityP roperty>        
519                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
520                             <mxswa :ActivityR eference.A rguments>        
521                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
522                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Option SetValue,  ""1"", ""P icklist""  }]</InArgu ment>        
523                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
524                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
525                               </In Argument>        
526                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_19 ]</OutArgu ment>        
527                             </mxsw a:Activity Reference. Arguments>        
528                           </mxswa: ActivityRe ference>        
529                           <mxswa:S etEntityPr operty Att ribute=""a ddress2_fr eightterms code"" Ent ity=""[Cre atedEntiti es(&quot;C reateStep3 _localPara meter#Temp &quot;)]""  EntityNam e=""contac t"" Value= ""[CreateS tep3_19]"" >        
530                             <mxswa :SetEntity Property.T argetType>        
531                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
532                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
533                               </In Argument>        
534                             </mxsw a:SetEntit yProperty. TargetType >        
535                           </mxswa: SetEntityP roperty>        
536                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
537                             <mxswa :ActivityR eference.A rguments>        
538                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
539                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Option SetValue,  ""1"", ""P icklist""  }]</InArgu ment>        
540                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
541                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
542                               </In Argument>        
543                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_20 ]</OutArgu ment>        
544                             </mxsw a:Activity Reference. Arguments>        
545                           </mxswa: ActivityRe ference>        
546                           <mxswa:S etEntityPr operty Att ribute=""a ddress2_sh ippingmeth odcode"" E ntity=""[C reatedEnti ties(&quot ;CreateSte p3_localPa rameter#Te mp&quot;)] "" EntityN ame=""cont act"" Valu e=""[Creat eStep3_20] "">        
547                             <mxswa :SetEntity Property.T argetType>        
548                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
549                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
550                               </In Argument>        
551                             </mxsw a:SetEntit yProperty. TargetType >        
552                           </mxswa: SetEntityP roperty>        
553                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
554                             <mxswa :ActivityR eference.A rguments>        
555                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
556                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Option SetValue,  ""1"", ""P icklist""  }]</InArgu ment>        
557                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
558                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
559                               </In Argument>        
560                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_21 ]</OutArgu ment>        
561                             </mxsw a:Activity Reference. Arguments>        
562                           </mxswa: ActivityRe ference>        
563                           <mxswa:S etEntityPr operty Att ribute=""c ustomersiz ecode"" En tity=""[Cr eatedEntit ies(&quot; CreateStep 3_localPar ameter#Tem p&quot;)]" " EntityNa me=""conta ct"" Value =""[Create Step3_21]" ">        
564                             <mxswa :SetEntity Property.T argetType>        
565                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
566                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
567                               </In Argument>        
568                             </mxsw a:SetEntit yProperty. TargetType >        
569                           </mxswa: SetEntityP roperty>        
570                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
571                             <mxswa :ActivityR eference.A rguments>        
572                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
573                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Option SetValue,  ""1"", ""P icklist""  }]</InArgu ment>        
574                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
575                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
576                               </In Argument>        
577                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_22 ]</OutArgu ment>        
578                             </mxsw a:Activity Reference. Arguments>        
579                           </mxswa: ActivityRe ference>        
580                           <mxswa:S etEntityPr operty Att ribute=""c ustomertyp ecode"" En tity=""[Cr eatedEntit ies(&quot; CreateStep 3_localPar ameter#Tem p&quot;)]" " EntityNa me=""conta ct"" Value =""[Create Step3_22]" ">        
581                             <mxswa :SetEntity Property.T argetType>        
582                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
583                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
584                               </In Argument>        
585                             </mxsw a:SetEntit yProperty. TargetType >        
586                           </mxswa: SetEntityP roperty>        
587                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
588                             <mxswa :ActivityR eference.A rguments>        
589                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
590                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Option SetValue,  ""1"", ""P icklist""  }]</InArgu ment>        
591                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
592                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
593                               </In Argument>        
594                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_23 ]</OutArgu ment>        
595                             </mxsw a:Activity Reference. Arguments>        
596                           </mxswa: ActivityRe ference>        
597                           <mxswa:S etEntityPr operty Att ribute=""e ducationco de"" Entit y=""[Creat edEntities (&quot;Cre ateStep3_l ocalParame ter#Temp&q uot;)]"" E ntityName= ""contact" " Value="" [CreateSte p3_23]"">        
598                             <mxswa :SetEntity Property.T argetType>        
599                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
600                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
601                               </In Argument>        
602                             </mxsw a:SetEntit yProperty. TargetType >        
603                           </mxswa: SetEntityP roperty>        
604                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
605                             <mxswa :ActivityR eference.A rguments>        
606                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
607                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Option SetValue,  ""1"", ""P icklist""  }]</InArgu ment>        
608                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
609                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
610                               </In Argument>        
611                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_24 ]</OutArgu ment>        
612                             </mxsw a:Activity Reference. Arguments>        
613                           </mxswa: ActivityRe ference>        
614                           <mxswa:S etEntityPr operty Att ribute=""h aschildren code"" Ent ity=""[Cre atedEntiti es(&quot;C reateStep3 _localPara meter#Temp &quot;)]""  EntityNam e=""contac t"" Value= ""[CreateS tep3_24]"" >        
615                             <mxswa :SetEntity Property.T argetType>        
616                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
617                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
618                               </In Argument>        
619                             </mxsw a:SetEntit yProperty. TargetType >        
620                           </mxswa: SetEntityP roperty>        
621                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
622                             <mxswa :ActivityR eference.A rguments>        
623                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
624                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Boolea n, ""False "" }]</InA rgument>        
625                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
626                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:B oolean"" / >        
627                               </In Argument>        
628                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_25 ]</OutArgu ment>        
629                             </mxsw a:Activity Reference. Arguments>        
630                           </mxswa: ActivityRe ference>        
631                           <mxswa:S etEntityPr operty Att ribute=""i sbackoffic ecustomer" " Entity=" "[CreatedE ntities(&q uot;Create Step3_loca lParameter #Temp&quot ;)]"" Enti tyName=""c ontact"" V alue=""[Cr eateStep3_ 25]"">        
632                             <mxswa :SetEntity Property.T argetType>        
633                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
634                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""x:B oolean"" / >        
635                               </In Argument>        
636                             </mxsw a:SetEntit yProperty. TargetType >        
637                           </mxswa: SetEntityP roperty>        
638                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
639                             <mxswa :ActivityR eference.A rguments>        
640                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
641                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Option SetValue,  ""1"", ""P icklist""  }]</InArgu ment>        
642                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
643                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
644                               </In Argument>        
645                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_26 ]</OutArgu ment>        
646                             </mxsw a:Activity Reference. Arguments>        
647                           </mxswa: ActivityRe ference>        
648                           <mxswa:S etEntityPr operty Att ribute=""l eadsourcec ode"" Enti ty=""[Crea tedEntitie s(&quot;Cr eateStep3_ localParam eter#Temp& quot;)]""  EntityName =""contact "" Value=" "[CreateSt ep3_26]"">        
649                             <mxswa :SetEntity Property.T argetType>        
650                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
651                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
652                               </In Argument>        
653                             </mxsw a:SetEntit yProperty. TargetType >        
654                           </mxswa: SetEntityP roperty>        
655                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
656                             <mxswa :ActivityR eference.A rguments>        
657                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
658                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Option SetValue,  ""1"", ""P icklist""  }]</InArgu ment>        
659                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
660                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
661                               </In Argument>        
662                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_27 ]</OutArgu ment>        
663                             </mxsw a:Activity Reference. Arguments>        
664                           </mxswa: ActivityRe ference>        
665                           <mxswa:S etEntityPr operty Att ribute=""s hippingmet hodcode""  Entity=""[ CreatedEnt ities(&quo t;CreateSt ep3_localP arameter#T emp&quot;) ]"" Entity Name=""con tact"" Val ue=""[Crea teStep3_27 ]"">        
666                             <mxswa :SetEntity Property.T argetType>        
667                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
668                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
669                               </In Argument>        
670                             </mxsw a:SetEntit yProperty. TargetType >        
671                           </mxswa: SetEntityP roperty>        
672                           <mxswa:A ctivityRef erence Ass emblyQuali fiedName=" "Microsoft .Crm.Workf low.Activi ties.Evalu ateExpress ion, Micro soft.Crm.W orkflow, V ersion=5.0 .0.0, Cult ure=neutra l, PublicK eyToken=31 bf3856ad36 4e35"" Dis playName=" "EvaluateE xpression" ">        
673                             <mxswa :ActivityR eference.A rguments>        
674                               <InA rgument x: TypeArgume nts=""x:St ring"" x:K ey=""Expre ssionOpera tor"">Crea teCrmType< /InArgumen t>        
675                               <InA rgument x: TypeArgume nts=""s:Ob ject[]"" x :Key=""Par ameters""> [New Objec t() { Micr osoft.Xrm. Sdk.Workfl ow.Workflo wPropertyT ype.Option SetValue,  ""1"", ""P icklist""  }]</InArgu ment>        
676                               <InA rgument x: TypeArgume nts=""s:Ty pe"" x:Key =""TargetT ype"">        
677                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
678                               </In Argument>        
679                               <Out Argument x :TypeArgum ents=""x:O bject"" x: Key=""Resu lt"">[Crea teStep3_28 ]</OutArgu ment>        
680                             </mxsw a:Activity Reference. Arguments>        
681                           </mxswa: ActivityRe ference>        
682                           <mxswa:S etEntityPr operty Att ribute=""t erritoryco de"" Entit y=""[Creat edEntities (&quot;Cre ateStep3_l ocalParame ter#Temp&q uot;)]"" E ntityName= ""contact" " Value="" [CreateSte p3_28]"">        
683                             <mxswa :SetEntity Property.T argetType>        
684                               <InA rgument x: TypeArgume nts=""s:Ty pe"">        
685                                 <m xswa:Refer enceLitera l x:TypeAr guments="" s:Type"" V alue=""mxs :OptionSet Value"" />        
686                               </In Argument>        
687                             </mxsw a:SetEntit yProperty. TargetType >        
688                           </mxswa: SetEntityP roperty>        
689                           <mxswa:C reateEntit y EntityId =""{x:Null }"" Displa yName=""Cr eateStep3:  Add new c ontact for  Nancy And erson at n ew account ."" Entity =""[Create dEntities( &quot;Crea teStep3_lo calParamet er#Temp&qu ot;)]"" En tityName=" "contact""  />        
690                           <Assign  x:TypeArgu ments=""mx s:Entity""  To=""[Cre atedEntiti es(&quot;C reateStep3 _localPara meter&quot ;)]"" Valu e=""[Creat edEntities (&quot;Cre ateStep3_l ocalParame ter#Temp&q uot;)]"" / >        
691                           <Persist  />        
692                         </Sequence >        
693                      </ sco:Collec tion>        
694                    </mx swa:Activi tyReferenc e.Properti es>        
695                  </mxsw a:Activity Reference>        
696                  <x:Nul l x:Key="" Else"" />        
697                </mxswa: ActivityRe ference.Pr operties>        
698              </mxswa:Ac tivityRefe rence>        
699           </ sco:Collec tion>        
700         </mx swa:Activi tyReferenc e.Properti es>        
701       </mxsw a:Activity Reference>        
702     </mxswa: Workflow>        
703   </Activity >"        
704                 };        
705                _process TemplateId  = _servic eProxy.Cre ate(proces sTemplate) ;        
706          
707                Console. Write("Cre ated {0}," , processT emplate.Na me);        
708          
709                // Activ ate the pr ocess temp late        
710                SetState Request ac tivateRequ est = new  SetStateRe quest        
711                {        
712                    Enti tyMoniker  = new Enti tyReferenc e(Workflow .EntityLog icalName,  _processTe mplateId),        
713                    Stat e = new Op tionSetVal ue((int)Wo rkflowStat e.Activate d),        
714                    Stat us = new O ptionSetVa lue(2)        
715                };        
716                _service Proxy.Exec ute(activa teRequest) ;        
717                Console. WriteLine( " and acti vated.");        
718          
719           }        
720          
721           // / <summary >        
722           // / Deletes  any entity  records t hat were c reated for  this samp le.        
723           // / <param n ame="promp t">Indicat es whether  to prompt  the user         
724           // / to delet e the reco rds create d in this  sample.</p aram>        
725           // / </summar y>        
726           pu blic void  DeleteRequ iredRecord s(bool pro mpt)        
727           {        
728                bool del eteRecords  = true;        
729          
730                if (prom pt)        
731                {        
732                    Cons ole.WriteL ine("\nDo  you want t hese entit y records  deleted? ( y/n) [y]:  ");        
733                    Stri ng answer  = Console. ReadLine() ;        
734          
735                    dele teRecords  = (answer. StartsWith ("y") || a nswer.Star tsWith("Y" ) || answe r == Strin g.Empty);        
736                }        
737          
738                if (dele teRecords)        
739                {        
740                    _ser viceProxy. Delete(Wor kflow.Enti tyLogicalN ame, _proc essId);        
741          
742                    // D eactivate  the proces s template  before yo u can dele te it.        
743                    SetS tateReques t deactiva teRequest  = new SetS tateReques t        
744                    {        
745                         EntityMoni ker = new  EntityRefe rence(Work flow.Entit yLogicalNa me, _proce ssTemplate Id),        
746                         State = ne w OptionSe tValue((in t)Workflow State.Draf t),        
747                         Status = n ew OptionS etValue(1)        
748                    };        
749                    _ser viceProxy. Execute(de activateRe quest);        
750                    _ser viceProxy. Delete(Wor kflow.Enti tyLogicalN ame, _proc essTemplat eId);        
751                    Cons ole.WriteL ine("Entit y records  have been  deleted.") ;        
752                }        
753           }        
754          
755           #e ndregion H ow-To Samp le Code        
756          
757           #r egion Main  method        
758          
759           // / <summary >        
760           // / Standard  Main() me thod used  by most SD K samples.        
761           // / </summar y>        
762           // / <param n ame="args" ></param>        
763           st atic publi c void Mai n(string[]  args)        
764           {        
765                try        
766                {        
767                    // O btain the  target org anization' s Web addr ess and cl ient logon          
768                    // c redentials  from the  user.        
769                    Serv erConnecti on serverC onnect = n ew ServerC onnection( );        
770                    Serv erConnecti on.Configu ration con fig = serv erConnect. GetServerC onfigurati on();        
771          
772                    Crea teProcessF romTemplat e app = ne w CreatePr ocessFromT emplate();        
773                    app. Run(config , true);        
774                }        
775                catch (F aultExcept ion<Micros oft.Xrm.Sd k.Organiza tionServic eFault> ex )        
776                {        
777                    Cons ole.WriteL ine("The a pplication  terminate d with an  error.");        
778                    Cons ole.WriteL ine("Times tamp: {0}" , ex.Detai l.Timestam p);        
779                    Cons ole.WriteL ine("Code:  {0}", ex. Detail.Err orCode);        
780                    Cons ole.WriteL ine("Messa ge: {0}",  ex.Detail. Message);        
781                    Cons ole.WriteL ine("Plugi n Trace: { 0}", ex.De tail.Trace Text);        
782                    Cons ole.WriteL ine("Inner  Fault: {0 }",        
783                         null == ex .Detail.In nerFault ?  "No Inner  Fault" :  "Has Inner  Fault");        
784                }        
785                catch (S ystem.Time outExcepti on ex)        
786                {        
787                    Cons ole.WriteL ine("The a pplication  terminate d with an  error.");        
788                    Cons ole.WriteL ine("Messa ge: {0}",  ex.Message );        
789                    Cons ole.WriteL ine("Stack  Trace: {0 }", ex.Sta ckTrace);        
790                    Cons ole.WriteL ine("Inner  Fault: {0 }",        
791                         null == ex .InnerExce ption.Mess age ? "No  Inner Faul t" : ex.In nerExcepti on.Message );        
792                }        
793                catch (S ystem.Exce ption ex)        
794                {        
795                    Cons ole.WriteL ine("The a pplication  terminate d with an  error.");        
796                    Cons ole.WriteL ine(ex.Mes sage);        
797          
798                    // D isplay the  details o f the inne r exceptio n.        
799                    if ( ex.InnerEx ception !=  null)        
800                    {        
801                         Console.Wr iteLine(ex .InnerExce ption.Mess age);        
802          
803                         FaultExcep tion<Micro soft.Xrm.S dk.Organiz ationServi ceFault> f e = ex.Inn erExceptio n        
804                             as Fau ltExceptio n<Microsof t.Xrm.Sdk. Organizati onServiceF ault>;        
805                         if (fe !=  null)        
806                         {        
807                             Consol e.WriteLin e("Timesta mp: {0}",  fe.Detail. Timestamp) ;        
808                             Consol e.WriteLin e("Code: { 0}", fe.De tail.Error Code);        
809                             Consol e.WriteLin e("Message : {0}", fe .Detail.Me ssage);        
810                             Consol e.WriteLin e("Plugin  Trace: {0} ", fe.Deta il.TraceTe xt);        
811                             Consol e.WriteLin e("Inner F ault: {0}" ,        
812                                 nu ll == fe.D etail.Inne rFault ? " No Inner F ault" : "H as Inner F ault");        
813                         }        
814                    }        
815                }        
816                // Addit ional exce ptions to  catch: Sec urityToken Validation Exception,  ExpiredSe curityToke nException ,        
817                // Secur ityAccessD eniedExcep tion, Mess ageSecurit yException , and Secu rityNegoti ationExcep tion.        
818          
819                finally        
820                {        
821                    Cons ole.WriteL ine("Press  <Enter> t o exit.");        
822                    Cons ole.ReadLi ne();        
823                }        
824           }        
825           #e ndregion M ain method        
826       }        
827   }        
828   //</snippe tCreatePro cessFromTe mplate>