-
Notifications
You must be signed in to change notification settings - Fork 0
/
SharePoint Excel Activities.xaml
792 lines (792 loc) · 67.4 KB
/
SharePoint Excel Activities.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
<Activity mc:Ignorable="sap sap2010" x:Class="Main" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mg="clr-namespace:Microsoft.Graph;assembly=Microsoft.Graph" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sd="clr-namespace:System.Data;assembly=System.Data" xmlns:ui="http://schemas.uipath.com/workflow/activities" xmlns:uma="clr-namespace:UiPath.MicrosoftOffice365.Activities;assembly=UiPath.MicrosoftOffice365.Activities" xmlns:umae="clr-namespace:UiPath.MicrosoftOffice365.Activities.Excel;assembly=UiPath.MicrosoftOffice365.Activities" xmlns:umaf="clr-namespace:UiPath.MicrosoftOffice365.Activities.Files;assembly=UiPath.MicrosoftOffice365.Activities" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:Members>
<x:Property sap2010:Annotation.AnnotationText="Full file name must be provided if you want to read , write , append or download one File, if you want to download many files leave it empty" Name="FileName" Type="InArgument(x:String)" />
<x:Property sap2010:Annotation.AnnotationText="Folder where your file stored on Sharepoint" Name="SharePointFolder" Type="InArgument(x:String)">
<x:Property.Attributes>
<RequiredArgumentAttribute />
</x:Property.Attributes>
</x:Property>
<x:Property sap2010:Annotation.AnnotationText="Path where you want the file /s to be downloaded, provide value only if you want to download file/s" Name="LocalFilePath" Type="InArgument(x:String)" />
<x:Property sap2010:Annotation.AnnotationText="Specify activity name you want to do on SharePoint Excel as a string must be one of these activities : for Downloading file(s) by intializing word (one,many) for other activities (Read Range,Write Range,Append Range)" Name="RequiredExcelActivity" Type="InArgument(x:String)">
<x:Property.Attributes>
<RequiredArgumentAttribute />
</x:Property.Attributes>
</x:Property>
<x:Property sap2010:Annotation.AnnotationText="Range to Read from Excel file, if no range specified the whole sheet will be read" Name="RangeToRead" Type="InArgument(x:String)" />
<x:Property sap2010:Annotation.AnnotationText="Sheet Name to read, write or append" Name="SheetName" Type="InArgument(x:String)" />
<x:Property sap2010:Annotation.AnnotationText="The Datatable which will be retrieved from Read Range activity" Name="DataTableOut" Type="OutArgument(sd:DataTable)" />
<x:Property sap2010:Annotation.AnnotationText="Site URL where folder is located on Sharepoint" Name="SiteURL" Type="InArgument(x:String)">
<x:Property.Attributes>
<RequiredArgumentAttribute />
</x:Property.Attributes>
</x:Property>
<x:Property sap2010:Annotation.AnnotationText="The Starting cell where data will be written, only provide value if you want to use activity Write Range, if empty "A1" will be used as default value" Name="StartingCellToWrite" Type="InArgument(x:String)" />
<x:Property sap2010:Annotation.AnnotationText="DataTable which will be written / append into Excel file, only provide value if you want to use Write Range or Append Range activity" Name="DataTableToWrite" Type="InArgument(sd:DataTable)" />
</x:Members>
<mva:VisualBasic.Settings>
<x:Null />
</mva:VisualBasic.Settings>
<sap:VirtualizedContainerService.HintSize>894,1371</sap:VirtualizedContainerService.HintSize>
<sap2010:WorkflowViewState.IdRef>ActivityBuilder_1</sap2010:WorkflowViewState.IdRef>
<TextExpression.NamespacesForImplementation>
<scg:List x:TypeArguments="x:String" Capacity="40">
<x:String>System.Activities</x:String>
<x:String>System.Activities.Statements</x:String>
<x:String>System.Activities.Expressions</x:String>
<x:String>System.Activities.Validation</x:String>
<x:String>System.Activities.XamlIntegration</x:String>
<x:String>Microsoft.VisualBasic</x:String>
<x:String>Microsoft.VisualBasic.Activities</x:String>
<x:String>System</x:String>
<x:String>System.Collections</x:String>
<x:String>System.Collections.Generic</x:String>
<x:String>System.Data</x:String>
<x:String>System.Diagnostics</x:String>
<x:String>System.Drawing</x:String>
<x:String>System.IO</x:String>
<x:String>System.Linq</x:String>
<x:String>System.Net.Mail</x:String>
<x:String>System.Xml</x:String>
<x:String>System.Xml.Linq</x:String>
<x:String>UiPath.Core</x:String>
<x:String>UiPath.Core.Activities</x:String>
<x:String>System.Windows.Markup</x:String>
<x:String>System.Collections.ObjectModel</x:String>
<x:String>System.Activities.DynamicUpdate</x:String>
<x:String>Microsoft.Graph</x:String>
<x:String>System.Security</x:String>
<x:String>UiPath.MicrosoftOffice365.Enums</x:String>
<x:String>UiPath.MicrosoftOffice365.Activities</x:String>
<x:String>UiPath.Shared.Activities</x:String>
<x:String>UiPath.MicrosoftOffice365.Activities.Files</x:String>
<x:String>System.ComponentModel</x:String>
<x:String>System.Runtime.Serialization</x:String>
<x:String>System.Xml.Serialization</x:String>
<x:String>UiPath.Shared.Activities.Business</x:String>
<x:String>System.Reflection</x:String>
<x:String>System.Runtime.InteropServices</x:String>
<x:String>UiPath.MicrosoftOffice365.Models</x:String>
<x:String>UiPath.MicrosoftOffice365.Activities.Mail</x:String>
<x:String>UiPath.MicrosoftOffice365.Activities.Excel</x:String>
<x:String>UiPath.MicrosoftOffice365.Activities.Calendar</x:String>
<x:String>Microsoft.VisualBasic.CompilerServices</x:String>
</scg:List>
</TextExpression.NamespacesForImplementation>
<TextExpression.ReferencesForImplementation>
<scg:List x:TypeArguments="AssemblyReference" Capacity="68">
<AssemblyReference>System.Activities</AssemblyReference>
<AssemblyReference>Microsoft.VisualBasic</AssemblyReference>
<AssemblyReference>mscorlib</AssemblyReference>
<AssemblyReference>System.Data</AssemblyReference>
<AssemblyReference>System</AssemblyReference>
<AssemblyReference>System.Drawing</AssemblyReference>
<AssemblyReference>System.Core</AssemblyReference>
<AssemblyReference>System.Xml</AssemblyReference>
<AssemblyReference>System.Xml.Linq</AssemblyReference>
<AssemblyReference>PresentationFramework</AssemblyReference>
<AssemblyReference>WindowsBase</AssemblyReference>
<AssemblyReference>PresentationCore</AssemblyReference>
<AssemblyReference>System.Xaml</AssemblyReference>
<AssemblyReference>UiPath.System.Activities</AssemblyReference>
<AssemblyReference>UiPath.UiAutomation.Activities</AssemblyReference>
<AssemblyReference>Microsoft.Graph.Core</AssemblyReference>
<AssemblyReference>Microsoft.Graph</AssemblyReference>
<AssemblyReference>UiPath.MicrosoftOffice365</AssemblyReference>
<AssemblyReference>UiPath.MicrosoftOffice365.Activities</AssemblyReference>
<AssemblyReference>UiPath.Excel.Activities</AssemblyReference>
<AssemblyReference>UiPath.Mail.Activities</AssemblyReference>
<AssemblyReference>UiPath.OCR.Activities</AssemblyReference>
<AssemblyReference>System.Runtime.Serialization</AssemblyReference>
<AssemblyReference>System.ValueTuple</AssemblyReference>
<AssemblyReference>UiPath.Mail</AssemblyReference>
<AssemblyReference>System.Memory</AssemblyReference>
<AssemblyReference>UiPath.MicrosoftOffice365.Activities.Design</AssemblyReference>
<AssemblyReference>UiPath.Excel</AssemblyReference>
<AssemblyReference>Microsoft.Bcl.AsyncInterfaces</AssemblyReference>
<AssemblyReference>UiPath.OCR.Activities.Design</AssemblyReference>
<AssemblyReference>UiPath.UIAutomationCore</AssemblyReference>
<AssemblyReference>System.Collections.Immutable</AssemblyReference>
<AssemblyReference>System.ServiceModel</AssemblyReference>
<AssemblyReference>UiPath.System.Activities.Design</AssemblyReference>
<AssemblyReference>System.Data.DataSetExtensions</AssemblyReference>
</scg:List>
</TextExpression.ReferencesForImplementation>
<Sequence sap2010:Annotation.AnnotationText="Using API through Microsoft Graph services to do below 5 activities on Sharepoint Sites :
- Download one file.
- Download many files.
- Read Range.
- Write Range.
- Append Range." DisplayName="SharePoint activities" sap:VirtualizedContainerService.HintSize="904,1306" sap2010:WorkflowViewState.IdRef="Sequence_7">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="appSecret" />
<Variable x:TypeArguments="x:String" Name="str_tenantID" />
<Variable x:TypeArguments="x:String" Name="str_AppID" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<TryCatch DisplayName="Try Catch" sap:VirtualizedContainerService.HintSize="862,1112" sap2010:WorkflowViewState.IdRef="TryCatch_2">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<TryCatch.Try>
<Sequence DisplayName="Main Sequence" sap:VirtualizedContainerService.HintSize="824,886" sap2010:WorkflowViewState.IdRef="Sequence_12">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<uma:Office365ApplicationScope CertificateAsBase64="{x:Null}" CertificatePassword="{x:Null}" ContinueOnError="{x:Null}" Password="{x:Null}" SecureApplicationSecret="{x:Null}" SecurePassword="{x:Null}" Timeout="{x:Null}" Username="{x:Null}" sap2010:Annotation.AnnotationText="Retrieve file/s from sharepoint folder using query as file name , Folder name and Site URL.

According to required activity string argument provided by the developer go to the activity state (Read - Write - Append - Download one / many files)." ApplicationId="[str_AppID]" ApplicationSecret="[appSecret]" AuthenticationType="ApplicationIdAndSecret" DisplayName="Microsoft Office 365 Scope" Environment="Global" sap:VirtualizedContainerService.HintSize="782,794" sap2010:WorkflowViewState.IdRef="Office365ApplicationScope_2" OAuthApplication="UiPath" Services="Files, Shared" Tenant="[str_tenantID]">
<uma:Office365ApplicationScope.Body>
<ActivityAction x:TypeArguments="mg:GraphServiceClient">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="mg:GraphServiceClient" Name="ParentScope" />
</ActivityAction.Argument>
<StateMachine InitialState="{x:Reference __ReferenceID7}" DisplayName="State Machine" sap:VirtualizedContainerService.HintSize="748,636" sap2010:WorkflowViewState.IdRef="StateMachine_3">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
<av:Point x:Key="ShapeLocation">300,0</av:Point>
<x:Double x:Key="StateContainerWidth">714</x:Double>
<x:Double x:Key="StateContainerHeight">600</x:Double>
<av:PointCollection x:Key="ConnectorLocation">334,75 334,105 333.3,105 333.3,127.5</av:PointCollection>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<State x:Name="__ReferenceID7" DisplayName="Find File/s" sap:VirtualizedContainerService.HintSize="134,61" sap2010:WorkflowViewState.IdRef="State_15">
<State.Entry>
<Sequence sap2010:Annotation.AnnotationText="Search for file/s on the specified Site URL and Folder.

retrieve result in array of DriveItems" DisplayName="Find file on Share point" sap:VirtualizedContainerService.HintSize="376,480" sap2010:WorkflowViewState.IdRef="Sequence_23">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_10" Level="Info" Message="["Start Activity " + RequiredExcelActivity]" />
<umaf:FindFilesAndFolders DriveName="{x:Null}" First="{x:Null}" DisplayName="Find Files And Folders" sap:VirtualizedContainerService.HintSize="334,82" sap2010:WorkflowViewState.IdRef="FindFilesAndFolders_7" Query="[FileName]" Results="[arr_driveItems]" SiteUrl="[SiteURL]" Subfolder="[SharePointFolder]">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</umaf:FindFilesAndFolders>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_40" Level="Info" Message="["Query retrieved " + arr_driveItems.Count.ToString+ " file/s"]" />
</Sequence>
</State.Entry>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:Point x:Key="ShapeLocation">273,127.5</av:Point>
<av:Size x:Key="ShapeSize">134,61</av:Size>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<State.Transitions>
<Transition DisplayName="Read" sap2010:WorkflowViewState.IdRef="Transition_17">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:PointCollection x:Key="ConnectorLocation">407,158 527,158</av:PointCollection>
<x:Int32 x:Key="SrcConnectionPointIndex">36</x:Int32>
<x:Int32 x:Key="DestConnectionPointIndex">37</x:Int32>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Transition.Condition>[RequiredExcelActivity.Replace(" ","").ToLower.Equals("readrange")]</Transition.Condition>
<Transition.To>
<State x:Name="__ReferenceID1" DisplayName="Read Range" sap:VirtualizedContainerService.HintSize="134,61" sap2010:WorkflowViewState.IdRef="State_12">
<State.Entry>
<TryCatch DisplayName="Try Catch" sap:VirtualizedContainerService.HintSize="434,312" sap2010:WorkflowViewState.IdRef="TryCatch_3">
<TryCatch.Try>
<If sap2010:Annotation.AnnotationText="If the result has only one file Read it.

If it has no file or more than one file log warn message" Condition="[arr_driveItems.Count.Equals(1)]" sap:VirtualizedContainerService.HintSize="621,496" sap2010:WorkflowViewState.IdRef="If_5">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<Sequence DisplayName="Read Range" sap:VirtualizedContainerService.HintSize="376,393" sap2010:WorkflowViewState.IdRef="Sequence_27">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<umae:ReadRange AddHeaders="True" DataTable="[DataTableOut]" DisplayName="Read Range" sap:VirtualizedContainerService.HintSize="334,174" sap2010:WorkflowViewState.IdRef="ReadRange_3" Range="[RangeToRead]" SheetName="[SheetName]" ValuesType="Values" Workbook="[arr_driveItems(0)]" />
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_36" Level="Info" Message="["Sucessfully read "+arr_driveItems(0).name]" />
</Sequence>
</If.Then>
<If.Else>
<If Condition="[arr_driveItems.Count >1]" sap:VirtualizedContainerService.HintSize="200,49" sap2010:WorkflowViewState.IdRef="If_12">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_38" Level="Warn" Message="["query retrieved more than one file, please insert full file name , number of files found " + arr_driveItems.Count.ToString]" />
</If.Then>
<If.Else>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_39" Level="Warn" Message="["No files found , please make sure file name is correct or exist on the sharepoint site and folder"]" />
</If.Else>
</If>
</If.Else>
</If>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="400,158" sap2010:WorkflowViewState.IdRef="Catch`1_3">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
</ActivityAction.Argument>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_45" Level="Warn" Message="["Falied to Read file exception: " + exception.Message]" />
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</State.Entry>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:Point x:Key="ShapeLocation">527,127.5</av:Point>
<av:Size x:Key="ShapeSize">134,61</av:Size>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<State.Transitions>
<Transition DisplayName="Done" sap2010:WorkflowViewState.IdRef="Transition_16">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:PointCollection x:Key="ConnectorLocation">600.7,188.5 600.7,433 394,433</av:PointCollection>
<x:Int32 x:Key="SrcConnectionPointIndex">43</x:Int32>
<x:Int32 x:Key="DestConnectionPointIndex">36</x:Int32>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Transition.To>
<State x:Name="__ReferenceID0" DisplayName="Final State" sap:VirtualizedContainerService.HintSize="134,61" sap2010:WorkflowViewState.IdRef="State_11" IsFinal="True">
<State.Entry>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_24" Level="Info" Message="["Successfully finished API call for " + RequiredExcelActivity]" />
</State.Entry>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:Point x:Key="ShapeLocation">260,402.5</av:Point>
<av:Size x:Key="ShapeSize">134,61</av:Size>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</State>
</Transition.To>
</Transition>
</State.Transitions>
</State>
</Transition.To>
</Transition>
<Transition DisplayName="Write" sap:VirtualizedContainerService.HintSize="450,493" sap2010:WorkflowViewState.IdRef="Transition_19">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:PointCollection x:Key="ConnectorLocation">273,158 144,158</av:PointCollection>
<x:Int32 x:Key="SrcConnectionPointIndex">37</x:Int32>
<x:Int32 x:Key="DestConnectionPointIndex">36</x:Int32>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Transition.Condition>[RequiredExcelActivity.Replace(" ","").ToLower.Equals("writerange")]</Transition.Condition>
<Transition.To>
<State x:Name="__ReferenceID2" DisplayName="Write Range" sap:VirtualizedContainerService.HintSize="134,61" sap2010:WorkflowViewState.IdRef="State_13">
<State.Entry>
<TryCatch DisplayName="Try Catch" sap:VirtualizedContainerService.HintSize="434,174" sap2010:WorkflowViewState.IdRef="TryCatch_6">
<TryCatch.Try>
<If sap2010:Annotation.AnnotationText="If the result has only one file Write on it.

If it has no file or more than one file log warn message" Condition="[arr_driveItems.Count.Equals(1)]" sap:VirtualizedContainerService.HintSize="1134,496" sap2010:WorkflowViewState.IdRef="If_6">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<Sequence DisplayName="Write Range" sap:VirtualizedContainerService.HintSize="376,393" sap2010:WorkflowViewState.IdRef="Sequence_26">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<umae:WriteRange DataTable="[DataTableToWrite]" DisplayName="Write Range" sap:VirtualizedContainerService.HintSize="334,174" sap2010:WorkflowViewState.IdRef="WriteRange_6" IncludeHeaders="True" SheetName="[SheetName]" StartingCell="[StartingCellToWrite]" Workbook="[arr_driveItems(0)]" />
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_33" Level="Info" Message="["Sucessfully wrote Data on "+arr_driveItems(0).name]" />
</Sequence>
</If.Then>
<If.Else>
<If Condition="[arr_driveItems.Count >1]" sap:VirtualizedContainerService.HintSize="713,230" sap2010:WorkflowViewState.IdRef="If_10">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_29" Level="Warn" Message="["query retrieved more than one file, please insert full file name , number of files found " + arr_driveItems.Count.ToString]" />
</If.Then>
<If.Else>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_30" Level="Warn" Message="["No files found , please make sure file name is correct or exist on the sharepoint site and folder"]" />
</If.Else>
</If>
</If.Else>
</If>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="400,20" sap2010:WorkflowViewState.IdRef="Catch`1_6">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
</ActivityAction.Argument>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_48" Level="Warn" Message="["Falied to Write Datatable exception : " + exception.Message]" />
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</State.Entry>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:Point x:Key="ShapeLocation">10,127.5</av:Point>
<av:Size x:Key="ShapeSize">134,61</av:Size>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<State.Transitions>
<Transition DisplayName="Done" sap2010:WorkflowViewState.IdRef="Transition_18">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:PointCollection x:Key="ConnectorLocation">70.3,188.5 70.3,439.1 260,439.1</av:PointCollection>
<x:Int32 x:Key="SrcConnectionPointIndex">35</x:Int32>
<x:Int32 x:Key="DestConnectionPointIndex">45</x:Int32>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Transition.To>
<x:Reference>__ReferenceID0</x:Reference>
</Transition.To>
</Transition>
</State.Transitions>
</State>
</Transition.To>
</Transition>
<Transition DisplayName="Append" sap2010:WorkflowViewState.IdRef="Transition_21">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:PointCollection x:Key="ConnectorLocation">340,188.5 340,218.5 323.3,218.5 323.3,279.5</av:PointCollection>
<x:Int32 x:Key="SrcConnectionPointIndex">39</x:Int32>
<x:Int32 x:Key="DestConnectionPointIndex">34</x:Int32>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Transition.Condition>[RequiredExcelActivity.Replace(" ","").ToLower.Equals("appendrange")]</Transition.Condition>
<Transition.To>
<State x:Name="__ReferenceID3" DisplayName="Append Range" sap:VirtualizedContainerService.HintSize="134,61" sap2010:WorkflowViewState.IdRef="State_14">
<State.Entry>
<TryCatch DisplayName="Try Catch" sap:VirtualizedContainerService.HintSize="434,312" sap2010:WorkflowViewState.IdRef="TryCatch_7">
<TryCatch.Try>
<If sap2010:Annotation.AnnotationText="If the result has only one file Append it.

If it has no file or more than one file log warn message" Condition="[arr_driveItems.Count.Equals(1)]" sap:VirtualizedContainerService.HintSize="621,496" sap2010:WorkflowViewState.IdRef="If_7">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<Sequence DisplayName="Append Range" sap:VirtualizedContainerService.HintSize="376,393" sap2010:WorkflowViewState.IdRef="Sequence_28">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<umae:AppendRange DataTable="[DataTableToWrite]" DisplayName="Append Range" sap:VirtualizedContainerService.HintSize="334,174" sap2010:WorkflowViewState.IdRef="AppendRange_2" SheetName="[SheetName]" Workbook="[arr_driveItems(0)]" />
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_37" Level="Info" Message="["Sucessfully Append Data on "+arr_driveItems(0).name]" />
</Sequence>
</If.Then>
<If.Else>
<If Condition="[arr_driveItems.Count >1]" sap:VirtualizedContainerService.HintSize="200,49" sap2010:WorkflowViewState.IdRef="If_11">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_35" Level="Warn" Message="["query retrieved more than one file, please insert full file name , number of files found " + arr_driveItems.Count.ToString]" />
</If.Then>
<If.Else>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_32" Level="Warn" Message="["No files found , please make sure file name is correct or exist on the sharepoint site and folder"]" />
</If.Else>
</If>
</If.Else>
</If>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="400,158" sap2010:WorkflowViewState.IdRef="Catch`1_7">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
</ActivityAction.Argument>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_49" Level="Warn" Message="["Falied to Append datatable exception : " + exception.Message]" />
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</State.Entry>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:Point x:Key="ShapeLocation">263,279.5</av:Point>
<av:Size x:Key="ShapeSize">134,61</av:Size>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<State.Transitions>
<Transition DisplayName="Done" sap2010:WorkflowViewState.IdRef="Transition_20">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:PointCollection x:Key="ConnectorLocation">330,340.5 330,370.5 313.6,370.5 313.6,402.5</av:PointCollection>
<x:Int32 x:Key="SrcConnectionPointIndex">39</x:Int32>
<x:Int32 x:Key="DestConnectionPointIndex">30</x:Int32>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Transition.To>
<x:Reference>__ReferenceID0</x:Reference>
</Transition.To>
</Transition>
</State.Transitions>
</State>
</Transition.To>
</Transition>
<Transition DisplayName="Download one file" sap:VirtualizedContainerService.HintSize="450,493" sap2010:WorkflowViewState.IdRef="Transition_23">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:PointCollection x:Key="ConnectorLocation">407,142.75 437,142.75 437,27.75 530,27.75</av:PointCollection>
<x:Int32 x:Key="SrcConnectionPointIndex">16</x:Int32>
<x:Int32 x:Key="DestConnectionPointIndex">17</x:Int32>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Transition.Condition>[RequiredExcelActivity.Replace(" ","").ToLower.Equals("one")]</Transition.Condition>
<Transition.To>
<State x:Name="__ReferenceID4" DisplayName="One File" sap:VirtualizedContainerService.HintSize="134,61" sap2010:WorkflowViewState.IdRef="State_16">
<State.Entry>
<TryCatch DisplayName="Try Catch" sap:VirtualizedContainerService.HintSize="1172,714" sap2010:WorkflowViewState.IdRef="TryCatch_4">
<TryCatch.Try>
<If sap2010:Annotation.AnnotationText="If the result has only one file download it.

If it has no file or more than one file log warn message" Condition="[arr_driveItems.Count.Equals(1)]" sap:VirtualizedContainerService.HintSize="1134,496" sap2010:WorkflowViewState.IdRef="If_3">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<Sequence DisplayName="One file found" sap:VirtualizedContainerService.HintSize="376,301" sap2010:WorkflowViewState.IdRef="Sequence_24">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<umaf:DownloadFile DisplayName="Download File" File="[arr_driveItems(0)]" sap:VirtualizedContainerService.HintSize="334,82" sap2010:WorkflowViewState.IdRef="DownloadFile_3" LocalFilePath="[LocalFilePath]">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</umaf:DownloadFile>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_17" Level="Info" Message="[arr_driveItems(0).Name+" Downloaded"]" />
</Sequence>
</If.Then>
<If.Else>
<If Condition="[arr_driveItems.Count >1]" sap:VirtualizedContainerService.HintSize="713,230" sap2010:WorkflowViewState.IdRef="If_8">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_25" Level="Warn" Message="["query retrieved more than one file, please insert full file name"]" />
</If.Then>
<If.Else>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_26" Level="Warn" Message="["No files found , please make sure file name is correct or exist on the sharepoint site and folder"]" />
</If.Else>
</If>
</If.Else>
</If>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="1138,20" sap2010:WorkflowViewState.IdRef="Catch`1_4">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
</ActivityAction.Argument>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_46" Level="Warn" Message="["Falied to download file exception " + exception.Message]" />
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</State.Entry>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:Point x:Key="ShapeLocation">530,12.5</av:Point>
<av:Size x:Key="ShapeSize">134,61</av:Size>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<State.Transitions>
<Transition DisplayName="Done" sap2010:WorkflowViewState.IdRef="Transition_22">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:PointCollection x:Key="ConnectorLocation">664,33.85 694,33.85 694,414.7 394,414.7</av:PointCollection>
<x:Int32 x:Key="SrcConnectionPointIndex">24</x:Int32>
<x:Int32 x:Key="DestConnectionPointIndex">12</x:Int32>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Transition.To>
<x:Reference>__ReferenceID0</x:Reference>
</Transition.To>
</Transition>
</State.Transitions>
</State>
</Transition.To>
</Transition>
<Transition DisplayName="download many Files" sap:VirtualizedContainerService.HintSize="450,493" sap2010:WorkflowViewState.IdRef="Transition_25">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:PointCollection x:Key="ConnectorLocation">273,133.6 243,133.6 243,30.8 154,30.8</av:PointCollection>
<x:Int32 x:Key="SrcConnectionPointIndex">5</x:Int32>
<x:Int32 x:Key="DestConnectionPointIndex">20</x:Int32>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Transition.Condition>[RequiredExcelActivity.Replace(" ","").ToLower.Equals("many")]</Transition.Condition>
<Transition.To>
<State x:Name="__ReferenceID5" DisplayName="Many Files" sap:VirtualizedContainerService.HintSize="134,61" sap2010:WorkflowViewState.IdRef="State_17">
<State.Entry>
<TryCatch DisplayName="Try Catch" sap:VirtualizedContainerService.HintSize="793,733" sap2010:WorkflowViewState.IdRef="TryCatch_5">
<TryCatch.Try>
<If sap2010:Annotation.AnnotationText="If array DriveItems has one or more files download.

If there is no files log warn message" Condition="[arr_driveItems.Count>0]" sap:VirtualizedContainerService.HintSize="755,515" sap2010:WorkflowViewState.IdRef="If_14">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<Sequence sap2010:Annotation.AnnotationText="for each file in the array DriveItems download it.

log message how many files downloaded" DisplayName="Download one or more files" sap:VirtualizedContainerService.HintSize="376,320" sap2010:WorkflowViewState.IdRef="Sequence_31">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ui:ForEach x:TypeArguments="mg:DriveItem" CurrentIndex="{x:Null}" DisplayName="For Each" sap:VirtualizedContainerService.HintSize="334,49" sap2010:WorkflowViewState.IdRef="ForEach`1_2" Values="[arr_driveItems]">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="mg:DriveItem">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="mg:DriveItem" Name="file" />
</ActivityAction.Argument>
<Sequence DisplayName="Body" sap:VirtualizedContainerService.HintSize="376,400" sap2010:WorkflowViewState.IdRef="Sequence_30">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<umaf:DownloadFile DisplayName="Download File" File="[file]" sap:VirtualizedContainerService.HintSize="334,82" sap2010:WorkflowViewState.IdRef="DownloadFile_4" LocalFilePath="[LocalFilePath]">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</umaf:DownloadFile>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_42" Level="Info" Message="[file.Name +" Downloaded"]" />
<Assign sap:VirtualizedContainerService.HintSize="334,59" sap2010:WorkflowViewState.IdRef="Assign_2">
<Assign.To>
<OutArgument x:TypeArguments="x:Int32">[int_fileCounter]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:Int32">[int_fileCounter+1]</InArgument>
</Assign.Value>
</Assign>
</Sequence>
</ActivityAction>
</ui:ForEach.Body>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:ForEach>
<ui:LogMessage DisplayName="Log Message how many files downloaded" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_43" Level="Info" Message="[int_fileCounter.ToString + " File/s successfully downloaded"]">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:LogMessage>
</Sequence>
</If.Then>
<If.Else>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_44" Level="Warn" Message="["Could not find any files on the folder, please make sure of Site URL , Folder name"]" />
</If.Else>
</If>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="759,20" sap2010:WorkflowViewState.IdRef="Catch`1_5">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
</ActivityAction.Argument>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_47" Level="Warn" Message="["Falied to Download files exception : " + exception.Message]" />
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</State.Entry>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:Point x:Key="ShapeLocation">20,12.5</av:Point>
<av:Size x:Key="ShapeSize">134,61</av:Size>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<State.Transitions>
<Transition DisplayName="Done" sap:VirtualizedContainerService.HintSize="450,493" sap2010:WorkflowViewState.IdRef="Transition_24">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:PointCollection x:Key="ConnectorLocation">20,24.7 0,24.7 0,414.7 260,414.7</av:PointCollection>
<x:Int32 x:Key="SrcConnectionPointIndex">13</x:Int32>
<x:Int32 x:Key="DestConnectionPointIndex">13</x:Int32>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Transition.To>
<x:Reference>__ReferenceID0</x:Reference>
</Transition.To>
</Transition>
</State.Transitions>
</State>
</Transition.To>
</Transition>
<Transition DisplayName="Default" sap2010:WorkflowViewState.IdRef="Transition_27">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:PointCollection x:Key="ConnectorLocation">393.6,188.5 393.6,218.5 510.4,218.5 510.4,232.5</av:PointCollection>
<x:Int32 x:Key="SrcConnectionPointIndex">71</x:Int32>
<x:Int32 x:Key="DestConnectionPointIndex">46</x:Int32>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Transition.Condition>
<Literal x:TypeArguments="x:Boolean" sap2010:WorkflowViewState.IdRef="Literal`1_1" Value="True" />
</Transition.Condition>
<Transition.To>
<State x:Name="__ReferenceID6" DisplayName="Default" sap:VirtualizedContainerService.HintSize="134,61" sap2010:WorkflowViewState.IdRef="State_18">
<State.Entry>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_23" Level="Warn" Message="["process could not complete, check activity required to be one of the options specified or check file name and Site URL are correct"]" />
</State.Entry>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:Point x:Key="ShapeLocation">430,232.5</av:Point>
<av:Size x:Key="ShapeSize">134,61</av:Size>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<State.Transitions>
<Transition DisplayName="Done" sap2010:WorkflowViewState.IdRef="Transition_26">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:PointCollection x:Key="ConnectorLocation">517.1,293.5 517.1,448.25 394,448.25</av:PointCollection>
<x:Int32 x:Key="SrcConnectionPointIndex">51</x:Int32>
<x:Int32 x:Key="DestConnectionPointIndex">56</x:Int32>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Transition.To>
<x:Reference>__ReferenceID0</x:Reference>
</Transition.To>
</Transition>
</State.Transitions>
</State>
</Transition.To>
</Transition>
</State.Transitions>
</State>
<x:Reference>__ReferenceID1</x:Reference>
<x:Reference>__ReferenceID2</x:Reference>
<x:Reference>__ReferenceID0</x:Reference>
<x:Reference>__ReferenceID3</x:Reference>
<x:Reference>__ReferenceID4</x:Reference>
<x:Reference>__ReferenceID5</x:Reference>
<x:Reference>__ReferenceID6</x:Reference>
<StateMachine.Variables>
<Variable x:TypeArguments="x:Int32" Name="int_fileCounter" />
<Variable x:TypeArguments="mg:DriveItem[]" Name="arr_driveItems" />
</StateMachine.Variables>
</StateMachine>
</ActivityAction>
</uma:Office365ApplicationScope.Body>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</uma:Office365ApplicationScope>
</Sequence>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="826,20" sap2010:WorkflowViewState.IdRef="Catch`1_2">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
</ActivityAction.Argument>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="LogMessage_7" Level="Warn" Message="[exception.Message]" />
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</Sequence>
</Activity>