-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.xaml
1828 lines (1828 loc) · 166 KB
/
Main.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
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<Activity mc:Ignorable="sap sap2010" x:Class="Main" mva:VisualBasic.Settings="{x:Null}" sap:VirtualizedContainerService.HintSize="654,793" sap2010:WorkflowViewState.IdRef="Main2_1" 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:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:njl="clr-namespace:Newtonsoft.Json.Linq;assembly=Newtonsoft.Json" 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.Diagnostics;assembly=System" xmlns:si="clr-namespace:System.IO;assembly=mscorlib" xmlns:snm="clr-namespace:System.Net.Mail;assembly=System" xmlns:ui="http://schemas.uipath.com/workflow/activities" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<TextExpression.NamespacesForImplementation>
<scg:List x:TypeArguments="x:String" Capacity="27">
<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.Xml.Serialization</x:String>
<x:String>Newtonsoft.Json.Linq</x:String>
<x:String>Newtonsoft.Json</x:String>
<x:String>Microsoft.VisualBasic.CompilerServices</x:String>
<x:String>System.Net</x:String>
<x:String>System.Text</x:String>
</scg:List>
</TextExpression.NamespacesForImplementation>
<TextExpression.ReferencesForImplementation>
<scg:List x:TypeArguments="AssemblyReference" Capacity="25">
<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>System.ComponentModel.Composition</AssemblyReference>
<AssemblyReference>System.ServiceModel</AssemblyReference>
<AssemblyReference>Microsoft.VisualStudio.Services.Common</AssemblyReference>
<AssemblyReference>System.Data.DataSetExtensions</AssemblyReference>
<AssemblyReference>Newtonsoft.Json</AssemblyReference>
<AssemblyReference>UiPath.System.Activities</AssemblyReference>
<AssemblyReference>UiPath.UiAutomation.Activities</AssemblyReference>
<AssemblyReference>System.Collections.Immutable</AssemblyReference>
<AssemblyReference>UiPath.Excel</AssemblyReference>
<AssemblyReference>UiPath.Mail</AssemblyReference>
<AssemblyReference>System.ValueTuple</AssemblyReference>
<AssemblyReference>UiPath.Studio.Plugin.Workflow</AssemblyReference>
</scg:List>
</TextExpression.ReferencesForImplementation>
<StateMachine InitialState="{x:Reference __ReferenceID2}" sap2010:Annotation.AnnotationText="TranscriereSed - robot recunoastere vocala ce foloseste Google Cloud Speech-to-Text. Robotul transforma, de asemenea, fisierele PDF in text (OCR) cu ajutorul daemon-ului genocrd de pe masina virtuala de Linux. Activitatile sau secventele sunt comentate, de regula, numai la prima lor aparitie dupa Start." DisplayName="Main" sap:VirtualizedContainerService.HintSize="634,693" sap2010:WorkflowViewState.IdRef="StateMachine_1">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<av:Point x:Key="ShapeLocation">70,32.4</av:Point>
<x:Double x:Key="StateContainerWidth">600</x:Double>
<x:Double x:Key="StateContainerHeight">600</x:Double>
<av:PointCollection x:Key="ConnectorLocation">130,47.4 160,47.4 160,46.6 273,46.6</av:PointCollection>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<State x:Name="__ReferenceID0" sap2010:Annotation.AnnotationText="O tranzactie fie are succes, fie esueaza cu SystemError. In caz de succes, se trece la urmatoarea tranzactie; in caz de SystemError, se revine la Init." DisplayName="Process Transaction" sap:VirtualizedContainerService.HintSize="231,157" sap2010:WorkflowViewState.IdRef="State_3">
<State.Entry>
<TryCatch DisplayName="Process Transaction" sap:VirtualizedContainerService.HintSize="438,1437" sap2010:WorkflowViewState.IdRef="TryCatch_1">
<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="Proceseaza tranzactia curenta" sap:VirtualizedContainerService.HintSize="242,1210" sap2010:WorkflowViewState.IdRef="Sequence_2">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<TryCatch sap2010:Annotation.AnnotationText="Verifica casuta de email care contine mesaje noi cu fisiere audio sau PDF de procesat" DisplayName="Verifica casuta de email" sap:VirtualizedContainerService.HintSize="200,108" sap2010:WorkflowViewState.IdRef="TryCatch_8">
<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>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<TryCatch.Try>
<Sequence DisplayName="Verifica email" sap:VirtualizedContainerService.HintSize="689,1726" sap2010:WorkflowViewState.IdRef="Sequence_23">
<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>
<Assign DisplayName="Init variabile" sap:VirtualizedContainerService.HintSize="647,60" sap2010:WorkflowViewState.IdRef="Assign_18">
<Assign.To>
<OutArgument x:TypeArguments="scg:List(snm:MailMessage)">[messages]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="scg:List(snm:MailMessage)">[new List(of System.Net.Mail.MailMessage)]</InArgument>
</Assign.Value>
</Assign>
<ui:GetIMAPMailMessages TimeoutMS="{x:Null}" Top="{x:Null}" DeleteMessages="False" DisplayName="Get IMAP mail messages" Email="[Config("UsernameEmail")]" EnableSSL="True" sap:VirtualizedContainerService.HintSize="647,22" sap2010:WorkflowViewState.IdRef="GetIMAPMailMessages_1" MailFolder="Inbox" MarkAsRead="True" Messages="[messages]" OnlyUnreadMessages="True" Password="[Config("PasswordEmail")]" Port="[Convert.ToInt32(Config("PortEmail").Trim)]" SecureConnection="None" Server="[Config("IPEmail")]" />
<ui:ForEach x:TypeArguments="snm:MailMessage" CurrentIndex="{x:Null}" DisplayName="For Each" sap:VirtualizedContainerService.HintSize="647,1472" sap2010:WorkflowViewState.IdRef="ForEach`1_1" Values="[messages]">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="snm:MailMessage">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="snm:MailMessage" Name="mail" />
</ActivityAction.Argument>
<Sequence DisplayName="Body" sap:VirtualizedContainerService.HintSize="611,1338" sap2010:WorkflowViewState.IdRef="Sequence_22">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If sap2010:Annotation.AnnotationText="Robotul foloseste LINQ pentru a afla daca expeditorul se afla in lista agreata. In caz contrar, se ignora email-ul. De regula, sunt agreate adresele de email de pe just.ro si de pe adresa Config("EmailAdmin")." Condition="[{"@", "just.ro", Config("EmailAdmin")}.Any(Function (x) mail.From.ToString.Contains(x))]" DisplayName="Daca expeditorul nu este din lista agreata" sap:VirtualizedContainerService.HintSize="569,183" sap2010:WorkflowViewState.IdRef="If_33">
<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>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Else>
<ui:Continue sap:VirtualizedContainerService.HintSize="200,22" sap2010:WorkflowViewState.IdRef="Continue_4" />
</If.Else>
</If>
<If sap2010:Annotation.AnnotationText="Daca email-ul nu are atasamente, se trimite un mesaj email expeditorului, informandu-l despre eroare." Condition="[mail.Attachments.Count = 0]" DisplayName="Daca emailul nu are atasamente PDF" sap:VirtualizedContainerService.HintSize="569,123" sap2010:WorkflowViewState.IdRef="If_10">
<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>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<TryCatch DisplayName="Send SMTP Mail Message - Try Catch" sap:VirtualizedContainerService.HintSize="438,372" sap2010:WorkflowViewState.IdRef="TryCatch_9">
<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>
<ui:SendMail Cc="{x:Null}" MailMessage="{x:Null}" TimeoutMS="{x:Null}" Bcc="[Config("DestCopieTranscriere")]" Body="["Stimata Doamna/Stimate Domn,"+Environment.NewLine+Environment.NewLine+"Solicitarea dumneavoastra nu poate fi procesata, deoarece mesajul e-mail pe care l-ati trimis nu are niciun fisier atasat."+Environment.NewLine+Environment.NewLine+"Robot Transcrieri"+Environment.NewLine+"Dezvoltat de Curtea de Apel Galati"]" DisplayName="Send SMTP Mail Message" Email="[Config("UsernameSmtp")]" EnableSSL="True" From="[Config("UsernameSmtp")]" sap:VirtualizedContainerService.HintSize="334,145" sap2010:WorkflowViewState.IdRef="SendMail_2" IsBodyHtml="False" Name="Robot Transcrieri" Password="[Config("PasswordSmtp")]" Port="[Convert.ToInt32(Config("PortSmtp").Trim)]" SecureConnection="None" Server="[Config("IPsmtp")]" Subject="Eroare - transcrierea fisierului audio sau PDF" To="[mail.From.ToString.Split({"<",">"}, StringSplitOptions.None)(1)]">
<ui:SendMail.Files>
<scg:List x:TypeArguments="InArgument(x:String)" Capacity="4" />
</ui:SendMail.Files>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:SendMail>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="404,21" sap2010:WorkflowViewState.IdRef="Catch`1_10">
<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>
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</If.Then>
</If>
<Assign sap2010:Annotation.AnnotationText="Daca email-ul are mai multe atasamente (de ex., are atasament, pe langa fisierul audio, imaginea logo dintr-o semnatura), se prelucreaza numai fisierul cu dimensiunea cea mai mare" sap:VirtualizedContainerService.HintSize="569,147" sap2010:WorkflowViewState.IdRef="Assign_54">
<Assign.To>
<OutArgument x:TypeArguments="x:Int32">[index]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:Int32">[mail.Attachments.IndexOf(mail.Attachments.OrderByDescending(Function (x) x.ContentStream.Length).First)]</InArgument>
</Assign.Value>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</Assign>
<If Condition="[Path.GetExtension(mail.Attachments(index).Name).ToLower = ".pdf"]" DisplayName="Salveaza diferit in functie de extensia fisierului" sap:VirtualizedContainerService.HintSize="569,325" sap2010:WorkflowViewState.IdRef="If_48">
<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>
<Assign sap2010:Annotation.AnnotationText="Fisierul PDF este salvat in FolderOCR sub forma adresa email expeditor__nume fisier__3 caractere aleatorii.extensie . Denumirea este folosita ulterior pentru a extrage adresa de email a expeditorului si a ii transmite rezultatul transcrierii sau mesajele de eroare. " DisplayName="Daca este fisier PDF - Create FileStream" sap:VirtualizedContainerService.HintSize="262,177" sap2010:WorkflowViewState.IdRef="Assign_76">
<Assign.To>
<OutArgument x:TypeArguments="si:FileStream">[fs]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="si:FileStream">[file.Create(Config("FolderOCR")+"\"+mail.From.ToString.Split({"<",">"}, StringSplitOptions.None)(1)+"__"+System.Uri.EscapeUriString(Path.GetFileNameWithoutExtension(mail.Attachments(index).Name).Replace("[", "pp").Replace("]", "pp").Replace("#", "diez")).Replace("%20", " ").Replace("__", "--")+"__"+Left(Path.GetRandomFileName(),3)+Path.GetExtension(mail.Attachments(index).Name).ToLower)]</InArgument>
</Assign.Value>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</Assign>
</If.Then>
<If.Else>
<Assign sap2010:Annotation.AnnotationText="Fisierul audio este salvat in FolderTransformare sub forma adresa email expeditor__nume fisier__3 caractere aleatorii.extensie . Denumirea este folosita ulterior pentru a extrage adresa de email a expeditorului si a ii transmite rezultatul transcrierii sau mesajele de eroare. " DisplayName="Daca este fisier audio - Create FileStream" sap:VirtualizedContainerService.HintSize="262,177" sap2010:WorkflowViewState.IdRef="Assign_77">
<Assign.To>
<OutArgument x:TypeArguments="si:FileStream">[fs]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="si:FileStream">[file.Create(Config("FolderTransformare")+"\"+mail.From.ToString.Split({"<",">"}, StringSplitOptions.None)(1)+"__"+System.Uri.EscapeUriString(Path.GetFileNameWithoutExtension(mail.Attachments(index).Name).Replace("[", "pp").Replace("]", "pp").Replace("#", "diez")).Replace("%20", " ").Replace("__", "--")+"__"+Left(Path.GetRandomFileName(),3)+Path.GetExtension(mail.Attachments(index).Name))]</InArgument>
</Assign.Value>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</Assign>
</If.Else>
</If>
<InvokeMethod DisplayName="Invoke method" sap:VirtualizedContainerService.HintSize="569,134" sap2010:WorkflowViewState.IdRef="InvokeMethod_13" MethodName="CopyTo">
<InvokeMethod.TargetObject>
<InArgument x:TypeArguments="si:Stream">[mail.Attachments(index).ContentStream]</InArgument>
</InvokeMethod.TargetObject>
<InArgument x:TypeArguments="si:FileStream">[fs]</InArgument>
</InvokeMethod>
<InvokeMethod DisplayName="Invoke method" sap:VirtualizedContainerService.HintSize="569,134" sap2010:WorkflowViewState.IdRef="InvokeMethod_14" MethodName="Close">
<InvokeMethod.TargetObject>
<InArgument x:TypeArguments="si:FileStream">[fs]</InArgument>
</InvokeMethod.TargetObject>
</InvokeMethod>
</Sequence>
</ActivityAction>
</ui:ForEach.Body>
</ui:ForEach>
</Sequence>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="404,21" sap2010:WorkflowViewState.IdRef="Catch`1_9">
<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>
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
<Sequence sap2010:Annotation.AnnotationText="Google Cloud Speech-to-Text accepta numai fisiere WAV sau FLAC. Alte formate de fisiere sunt convertite in FLAC cu ajutorul aplicatiei FFmpeg." DisplayName="Conversie audio in FLAC" sap:VirtualizedContainerService.HintSize="200,153" sap2010:WorkflowViewState.IdRef="Sequence_43">
<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>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Assign DisplayName="Initializare" sap:VirtualizedContainerService.HintSize="412,60" sap2010:WorkflowViewState.IdRef="Assign_22">
<Assign.To>
<OutArgument x:TypeArguments="s:String[]">[filesList]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="s:String[]">[new string(){}]</InArgument>
</Assign.Value>
</Assign>
<Assign sap2010:Annotation.AnnotationText="Robotul poate procesa si fisiere care nu sunt sosite prin email, dar sunt in acest(e) folder(e)." sap:VirtualizedContainerService.HintSize="412,117" sap2010:WorkflowViewState.IdRef="Assign_23">
<Assign.To>
<OutArgument x:TypeArguments="s:String[]">[filesList]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="s:String[]">[Directory.GetFiles(Config("FolderTransformare"), "*.*")]</InArgument>
</Assign.Value>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</Assign>
<ui:ForEach x:TypeArguments="x:String" CurrentIndex="{x:Null}" DisplayName="For each" sap:VirtualizedContainerService.HintSize="412,586" sap2010:WorkflowViewState.IdRef="ForEach`1_3" Values="[filesList]">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="x:String">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:String" Name="file" />
</ActivityAction.Argument>
<Sequence DisplayName="Body" sap:VirtualizedContainerService.HintSize="376,452" sap2010:WorkflowViewState.IdRef="Sequence_29">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If Condition="[Path.GetExtension(file).ToLower = ".wav"]" DisplayName="Sari conversia daca fisierul este WAV" sap:VirtualizedContainerService.HintSize="334,51" sap2010:WorkflowViewState.IdRef="If_42">
<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>
<Sequence sap:VirtualizedContainerService.HintSize="426,311" sap2010:WorkflowViewState.IdRef="Sequence_66">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ui:MoveFile ContinueOnError="{x:Null}" Destination="[Config("FolderLucru")]" DisplayName="Move File" sap:VirtualizedContainerService.HintSize="384,157" sap2010:WorkflowViewState.IdRef="MoveFile_11" Overwrite="True" Path="[file]" />
<ui:Continue sap:VirtualizedContainerService.HintSize="384,22" sap2010:WorkflowViewState.IdRef="Continue_6" />
</Sequence>
</If.Then>
</If>
<ui:StartProcess WorkingDirectory="{x:Null}" Arguments="[" -nostdin -y -i """+file+""" -af ""highpass=f=200, lowpass=f=4000"",silenceremove=stop_periods=-1:stop_duration=2:stop_threshold=-40dB,anlmdn,atempo=0.9 -ac 1 -ar 44100 """+Config("FolderLucru")+"\"+Path.GetFileNameWithoutExtension(file)+".flac"""]" DisplayName="Converteste in FLAC cu aplicatia "FFmpeg"" FileName="[Config("CaleFFmpeg")]" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="StartProcess_1" />
<ui:ForEach x:TypeArguments="sd:Process" CurrentIndex="{x:Null}" DisplayName="Asteapta inchidere "FFmpeg"" sap:VirtualizedContainerService.HintSize="334,51" sap2010:WorkflowViewState.IdRef="ForEach`1_25" Values="[System.Diagnostics.Process.GetProcessesByName("ffmpeg")]">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="sd:Process">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="sd:Process" Name="process" />
</ActivityAction.Argument>
<InvokeMethod DisplayName="Invoke Method" sap:VirtualizedContainerService.HintSize="238,132" sap2010:WorkflowViewState.IdRef="InvokeMethod_4" MethodName="WaitForExit">
<InvokeMethod.TargetObject>
<InArgument x:TypeArguments="sd:Process">[process]</InArgument>
</InvokeMethod.TargetObject>
</InvokeMethod>
</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>
<If Condition="[System.IO.File.Exists(Config("FolderLucru")+"\"+Path.GetFileNameWithoutExtension(file)+".flac")]" DisplayName="Verifica succesul conversiei si muta fisierul audio initial" sap:VirtualizedContainerService.HintSize="334,51" sap2010:WorkflowViewState.IdRef="If_23">
<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>
<If Condition="[(new System.IO.FileInfo(Config("FolderLucru")+"\"+Path.GetFileNameWithoutExtension(file)+".flac").Length) <= 100]" DisplayName="Daca exista FLAC dar este prea mic (corupt)/daca totul e OK" sap:VirtualizedContainerService.HintSize="855,550" sap2010:WorkflowViewState.IdRef="If_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>
<If.Then>
<Sequence sap:VirtualizedContainerService.HintSize="426,402" sap2010:WorkflowViewState.IdRef="Sequence_50">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<TryCatch DisplayName="Send SMTP Mail Message - Try Catch" sap:VirtualizedContainerService.HintSize="384,51" sap2010:WorkflowViewState.IdRef="TryCatch_10">
<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>
<TryCatch.Try>
<ui:SendMail Cc="{x:Null}" MailMessage="{x:Null}" Bcc="[Config("DestCopieTranscriere")]" Body="["Stimata Doamna/Stimate Domn,"+Environment.NewLine+Environment.NewLine+"Solicitarea dumneavoastra nu a putut fi procesata, deoarece fisierul primit nu este un fisier audio, contine erori ori nu este intr-un format audio acceptat. Retrimiteti un fisier in format MP3 si, daca nu functioneaza, contactati Compartimentul IT."+Environment.NewLine+Environment.NewLine+"Robot Transcrieri"+Environment.NewLine+"Dezvoltat de Curtea de Apel Galati"]" DisplayName="Send SMTP Mail Message" Email="[Config("UsernameSmtp")]" EnableSSL="True" From="[Config("UsernameSmtp")]" sap:VirtualizedContainerService.HintSize="334,145" sap2010:WorkflowViewState.IdRef="SendMail_9" IsBodyHtml="False" Name="Robot Transcrieri" Password="[Config("PasswordSmtp")]" Port="[Convert.ToInt32(Config("PortSmtp").Trim)]" SecureConnection="None" Server="[Config("IPsmtp")]" Subject="Eroare - transcrierea fisierului audio" TimeoutMS="3000" To="[Path.GetFileNameWithoutExtension(file).Split({"__"}, StringSplitOptions.None)(0)]">
<ui:SendMail.Files>
<scg:List x:TypeArguments="InArgument(x:String)" Capacity="4" />
</ui:SendMail.Files>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:SendMail>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="490,366" sap2010:WorkflowViewState.IdRef="Catch`1_11">
<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>
<If Condition="[Config("EmailAdmin").Trim <> ""]" sap:VirtualizedContainerService.HintSize="484,293" sap2010:WorkflowViewState.IdRef="If_43">
<If.Then>
<ui:SendMail Bcc="{x:Null}" Cc="{x:Null}" MailMessage="{x:Null}" Body="["Stimata Doamna/Stimate Domn,"+Environment.NewLine+Environment.NewLine+"Solicitarea dumneavoastra nu a putut fi procesata, deoarece fisierul primit nu este un fisier audio, contine erori ori nu este intr-un format audio acceptat. Retrimiteti un fisier in format MP3 si, daca nu functioneaza, contactati Compartimentul IT."+Environment.NewLine+Environment.NewLine+"Robot Transcrieri"+Environment.NewLine+"Dezvoltat de Curtea de Apel Galati"]" DisplayName="Send SMTP Mail Message" Email="[Config("UsernameSmtp")]" EnableSSL="True" From="[Config("UsernameSmtp")]" sap:VirtualizedContainerService.HintSize="334,145" sap2010:WorkflowViewState.IdRef="SendMail_16" IsBodyHtml="False" Name="Robot Transcrieri" Password="[Config("PasswordSmtp")]" Port="[Convert.ToInt32(Config("PortSmtp").Trim)]" SecureConnection="None" Server="[Config("IPsmtp")]" Subject="Eroare - transcrierea fisierului audio" TimeoutMS="3000" To="[Config("EmailAdmin")]">
<ui:SendMail.Files>
<scg:List x:TypeArguments="InArgument(x:String)" Capacity="4" />
</ui:SendMail.Files>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:SendMail>
</If.Then>
</If>
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
<ui:Delete ContinueOnError="True" sap:VirtualizedContainerService.HintSize="384,22" sap2010:WorkflowViewState.IdRef="Delete_1" Path="[Config("FolderLucru")+"\"+Path.GetFileNameWithoutExtension(file)+".flac"]" />
<ui:MoveFile ContinueOnError="{x:Null}" Destination="[Config("FolderPrelucrate")]" DisplayName="Move File" sap:VirtualizedContainerService.HintSize="384,157" sap2010:WorkflowViewState.IdRef="MoveFile_9" Overwrite="True" Path="[file]" />
</Sequence>
</If.Then>
<If.Else>
<ui:MoveFile ContinueOnError="{x:Null}" Destination="[Config("FolderPrelucrate")]" DisplayName="Move File" sap:VirtualizedContainerService.HintSize="384,157" sap2010:WorkflowViewState.IdRef="MoveFile_12" Overwrite="True" Path="[file]" />
</If.Else>
</If>
</If.Then>
<If.Else>
<Sequence DisplayName="Daca conversia a esuat si nu s-a creat fisier FLAC" sap:VirtualizedContainerService.HintSize="426,340" sap2010:WorkflowViewState.IdRef="Sequence_52">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<TryCatch DisplayName="Send SMTP Mail Message - Try Catch" sap:VirtualizedContainerService.HintSize="438,372" sap2010:WorkflowViewState.IdRef="TryCatch_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>
<TryCatch.Try>
<ui:SendMail Cc="{x:Null}" MailMessage="{x:Null}" Bcc="[Config("DestCopieTranscriere")]" Body="["Stimata Doamna/Stimate Domn,"+Environment.NewLine+Environment.NewLine+"Solicitarea dumneavoastra nu a putut fi procesata, deoarece fisierul primit nu este un fisier audio, contine erori ori nu este intr-un format audio acceptat. Retrimiteti un fisier in format MP3 si, daca nu functioneaza, contactati Compartimentul IT."+Environment.NewLine+Environment.NewLine+"Robot Transcrieri"+Environment.NewLine+"Dezvoltat de Curtea de Apel Galati"]" DisplayName="Send SMTP Mail Message" Email="[Config("UsernameSmtp")]" EnableSSL="True" From="[Config("UsernameSmtp")]" sap:VirtualizedContainerService.HintSize="334,145" sap2010:WorkflowViewState.IdRef="SendMail_10" IsBodyHtml="False" Name="Robot Transcrieri" Password="[Config("PasswordSmtp")]" Port="[Convert.ToInt32(Config("PortSmtp").Trim)]" SecureConnection="None" Server="[Config("IPsmtp")]" Subject="Eroare - transcrierea fisierului audio" TimeoutMS="3000" To="[Path.GetFileNameWithoutExtension(file).Split({"__"}, StringSplitOptions.None)(0)]">
<ui:SendMail.Files>
<scg:List x:TypeArguments="InArgument(x:String)" Capacity="4" />
</ui:SendMail.Files>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:SendMail>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="404,21" sap2010:WorkflowViewState.IdRef="Catch`1_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>
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
</ActivityAction.Argument>
<If Condition="[Config("EmailAdmin").Trim <> ""]" sap:VirtualizedContainerService.HintSize="484,293" sap2010:WorkflowViewState.IdRef="If_44">
<If.Then>
<ui:SendMail Bcc="{x:Null}" Cc="{x:Null}" MailMessage="{x:Null}" Body="["Stimata Doamna/Stimate Domn,"+Environment.NewLine+Environment.NewLine+"Solicitarea dumneavoastra nu a putut fi procesata, deoarece fisierul primit nu este un fisier audio, contine erori ori nu este intr-un format audio acceptat. Retrimiteti un fisier in format MP3 si, daca nu functioneaza, contactati Compartimentul IT."+Environment.NewLine+Environment.NewLine+"Robot Transcrieri"+Environment.NewLine+"Dezvoltat de Curtea de Apel Galati"]" DisplayName="Send SMTP Mail Message" Email="[Config("UsernameSmtp")]" EnableSSL="True" From="[Config("UsernameSmtp")]" sap:VirtualizedContainerService.HintSize="334,145" sap2010:WorkflowViewState.IdRef="SendMail_17" IsBodyHtml="False" Name="Robot Transcrieri" Password="[Config("PasswordSmtp")]" Port="[Convert.ToInt32(Config("PortSmtp").Trim)]" SecureConnection="None" Server="[Config("IPsmtp")]" Subject="Eroare - transcrierea fisierului audio" TimeoutMS="3000" To="[Config("EmailAdmin")]">
<ui:SendMail.Files>
<scg:List x:TypeArguments="InArgument(x:String)" Capacity="4" />
</ui:SendMail.Files>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:SendMail>
</If.Then>
</If>
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
<ui:MoveFile ContinueOnError="{x:Null}" Destination="[Config("FolderPrelucrate")]" DisplayName="Move File" sap:VirtualizedContainerService.HintSize="384,157" sap2010:WorkflowViewState.IdRef="MoveFile_10" Overwrite="True" Path="[file]" />
</Sequence>
</If.Else>
</If>
</Sequence>
</ActivityAction>
</ui:ForEach.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>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:ForEach>
</Sequence>
<Sequence sap2010:Annotation.AnnotationText="Fisierul FLAC sau WAV este urcat in bucket-ul din Google Cloud Storage, se verifica urcarea cu succes, apoi este lansata comanda de recunoastere cu Google Cloud Speech-to-Text." DisplayName="Upload si transforma fisierele FLAC sau WAV in text" sap:VirtualizedContainerService.HintSize="200,183" sap2010:WorkflowViewState.IdRef="Sequence_44">
<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>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Assign DisplayName="Initializare" sap:VirtualizedContainerService.HintSize="462,60" sap2010:WorkflowViewState.IdRef="Assign_24">
<Assign.To>
<OutArgument x:TypeArguments="s:String[]">[filesList]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="s:String[]">[new string(){}]</InArgument>
</Assign.Value>
</Assign>
<Assign sap2010:Annotation.AnnotationText="Listeaza fisierele FLAC si WAV" sap:VirtualizedContainerService.HintSize="462,91" sap2010:WorkflowViewState.IdRef="Assign_25">
<Assign.To>
<OutArgument x:TypeArguments="s:String[]">[filesList]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="s:String[]">[Directory.GetFiles(Config("FolderLucru"), "*.flac").Union(Directory.GetFiles(Config("FolderLucru"), "*.wav")).ToArray()]</InArgument>
</Assign.Value>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</Assign>
<ui:ForEach x:TypeArguments="x:String" CurrentIndex="{x:Null}" DisplayName="For each" sap:VirtualizedContainerService.HintSize="462,2348" sap2010:WorkflowViewState.IdRef="ForEach`1_4" Values="[filesList]">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="x:String">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:String" Name="file" />
</ActivityAction.Argument>
<Sequence DisplayName="Body" sap:VirtualizedContainerService.HintSize="426,2214" sap2010:WorkflowViewState.IdRef="Sequence_30">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Sequence DisplayName="Initializare variabile" sap:VirtualizedContainerService.HintSize="384,66" sap2010:WorkflowViewState.IdRef="Sequence_37">
<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>
<Assign sap:VirtualizedContainerService.HintSize="262,60" sap2010:WorkflowViewState.IdRef="Assign_41">
<Assign.To>
<OutArgument x:TypeArguments="x:String">[stringResult]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">
<Literal x:TypeArguments="x:String" Value="" />
</InArgument>
</Assign.Value>
</Assign>
<Assign sap:VirtualizedContainerService.HintSize="262,60" sap2010:WorkflowViewState.IdRef="Assign_42">
<Assign.To>
<OutArgument x:TypeArguments="x:Int32">[statusCode]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:Int32">0</InArgument>
</Assign.Value>
</Assign>
<Assign sap:VirtualizedContainerService.HintSize="262,60" sap2010:WorkflowViewState.IdRef="Assign_43">
<Assign.To>
<OutArgument x:TypeArguments="njl:JObject">[jsonResult]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="njl:JObject">[new JObject]</InArgument>
</Assign.Value>
</Assign>
<Assign sap:VirtualizedContainerService.HintSize="262,60" sap2010:WorkflowViewState.IdRef="Assign_53">
<Assign.To>
<OutArgument x:TypeArguments="scg:Dictionary(x:String, x:String)">[pereche]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="scg:Dictionary(x:String, x:String)">[new Dictionary(of String, String)]</InArgument>
</Assign.Value>
</Assign>
</Sequence>
<If sap2010:Annotation.AnnotationText="Token-ul OAuth2 este valabil 60 minute. Daca au trecut mai mult de 50 minute de la ultima generare, se va genera un token nou cu ajutorul aplicatiei gcloud." Condition="[(DateTime.Now - Convert.ToDateTime(dataToken)).TotalMinutes >= 50]" DisplayName="Genereaza token nou (daca este cazul)" sap:VirtualizedContainerService.HintSize="384,153" sap2010:WorkflowViewState.IdRef="If_39">
<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>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<Sequence sap:VirtualizedContainerService.HintSize="336,592" sap2010:WorkflowViewState.IdRef="Sequence_63">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ui:ForEach x:TypeArguments="sd:Process" CurrentIndex="{x:Null}" DisplayName="Inchidere "cmd"" sap:VirtualizedContainerService.HintSize="314,51" sap2010:WorkflowViewState.IdRef="ForEach`1_30" Values="[System.Diagnostics.Process.GetProcessesByName("cmd")]">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="sd:Process">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="sd:Process" Name="process" />
</ActivityAction.Argument>
<ui:KillProcess ContinueOnError="{x:Null}" ProcessName="{x:Null}" DisplayName="Kill Process" sap:VirtualizedContainerService.HintSize="200,22" sap2010:WorkflowViewState.IdRef="KillProcess_2" Process="[process]" />
</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:StartProcess WorkingDirectory="{x:Null}" Arguments="[" auth application-default print-access-token > """+Config("FolderLucru")+"\token.txt"""]" DisplayName="Genereaza token nou" FileName="[Config("CaleGoogleSDKbin")+"\gcloud.cmd"]" sap:VirtualizedContainerService.HintSize="314,87" sap2010:WorkflowViewState.IdRef="StartProcess_7" />
<ui:ForEach x:TypeArguments="sd:Process" CurrentIndex="{x:Null}" DisplayName="Asteapta inchidere "gcloud"" sap:VirtualizedContainerService.HintSize="314,51" sap2010:WorkflowViewState.IdRef="ForEach`1_31" Values="[System.Diagnostics.Process.GetProcessesByName("cmd")]">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="sd:Process">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="sd:Process" Name="process" />
</ActivityAction.Argument>
<InvokeMethod DisplayName="Invoke Method" sap:VirtualizedContainerService.HintSize="218,132" sap2010:WorkflowViewState.IdRef="InvokeMethod_10" MethodName="WaitForExit">
<InvokeMethod.TargetObject>
<InArgument x:TypeArguments="sd:Process">[process]</InArgument>
</InvokeMethod.TargetObject>
</InvokeMethod>
</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:ReadTextFile Content="[token]" DisplayName="Read Text File" FileName="[Config("FolderLucru")+"\token.txt"]" sap:VirtualizedContainerService.HintSize="314,59" sap2010:WorkflowViewState.IdRef="ReadTextFile_2" />
<Assign sap:VirtualizedContainerService.HintSize="314,60" sap2010:WorkflowViewState.IdRef="Assign_65">
<Assign.To>
<OutArgument x:TypeArguments="x:String">[dataToken]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">[DateTime.Now.ToString]</InArgument>
</Assign.Value>
</Assign>
</Sequence>
</If.Then>
</If>
<ui:StartProcess WorkingDirectory="{x:Null}" sap2010:Annotation.AnnotationText="Fisierul este urcat in Google Cloud Storage cu ajutorul aplicatiei gsutil" Arguments="[" -h ""Content-Type:audio/"+Path.GetExtension(file).TrimStart("."c)+""" cp """+file+""" gs://"+Config("BucketName")+"/"]" DisplayName="Upload FLAC/WAV in Google Cloud" FileName="[Config("CaleGoogleSDKbin")+"\gsutil.cmd"]" sap:VirtualizedContainerService.HintSize="384,129" sap2010:WorkflowViewState.IdRef="StartProcess_5">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:StartProcess>
<ui:ForEach x:TypeArguments="sd:Process" CurrentIndex="{x:Null}" DisplayName="Asteapta inchidere "gsutil"" sap:VirtualizedContainerService.HintSize="384,51" sap2010:WorkflowViewState.IdRef="ForEach`1_27" Values="[System.Diagnostics.Process.GetProcessesByName("cmd")]">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="sd:Process">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="sd:Process" Name="process" />
</ActivityAction.Argument>
<InvokeMethod DisplayName="Invoke Method" sap:VirtualizedContainerService.HintSize="238,132" sap2010:WorkflowViewState.IdRef="InvokeMethod_8" MethodName="WaitForExit">
<InvokeMethod.TargetObject>
<InArgument x:TypeArguments="sd:Process">[process]</InArgument>
</InvokeMethod.TargetObject>
</InvokeMethod>
</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>
<If sap2010:Annotation.AnnotationText="Daca urcarea a durat foarte mult, este posibil sa fi expirat token-ul OAuth2. Daca a trecut prea mult timp, se genereaza un token nou cu ajutorul aplicatiei gcloud." Condition="[(DateTime.Now - Convert.ToDateTime(dataToken)).TotalMinutes >= 50]" DisplayName="Genereaza token nou (daca este cazul)" sap:VirtualizedContainerService.HintSize="384,153" sap2010:WorkflowViewState.IdRef="If_40">
<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>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<Sequence sap:VirtualizedContainerService.HintSize="376,560" sap2010:WorkflowViewState.IdRef="Sequence_64">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ui:ForEach x:TypeArguments="sd:Process" CurrentIndex="{x:Null}" DisplayName="Inchidere "cmd"" sap:VirtualizedContainerService.HintSize="334,51" sap2010:WorkflowViewState.IdRef="ForEach`1_32" Values="[System.Diagnostics.Process.GetProcessesByName("cmd")]">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="sd:Process">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="sd:Process" Name="process" />
</ActivityAction.Argument>
<ui:KillProcess ContinueOnError="{x:Null}" ProcessName="{x:Null}" DisplayName="Kill Process" sap:VirtualizedContainerService.HintSize="200,22" sap2010:WorkflowViewState.IdRef="KillProcess_3" Process="[process]" />
</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:StartProcess WorkingDirectory="{x:Null}" Arguments="[" auth application-default print-access-token > """+Config("FolderLucru")+"\token.txt"""]" DisplayName="Genereaza token nou" FileName="[Config("CaleGoogleSDKbin")+"\gcloud.cmd"]" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="StartProcess_8" />
<ui:ForEach x:TypeArguments="sd:Process" CurrentIndex="{x:Null}" DisplayName="Asteapta inchidere "gcloud"" sap:VirtualizedContainerService.HintSize="334,51" sap2010:WorkflowViewState.IdRef="ForEach`1_33" Values="[System.Diagnostics.Process.GetProcessesByName("cmd")]">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="sd:Process">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="sd:Process" Name="process" />
</ActivityAction.Argument>
<InvokeMethod DisplayName="Invoke Method" sap:VirtualizedContainerService.HintSize="218,132" sap2010:WorkflowViewState.IdRef="InvokeMethod_11" MethodName="WaitForExit">
<InvokeMethod.TargetObject>
<InArgument x:TypeArguments="sd:Process">[process]</InArgument>
</InvokeMethod.TargetObject>
</InvokeMethod>
</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:ReadTextFile Content="[token]" DisplayName="Read Text File" FileName="[Config("FolderLucru")+"\token.txt"]" sap:VirtualizedContainerService.HintSize="334,59" sap2010:WorkflowViewState.IdRef="ReadTextFile_3" />
<Assign sap:VirtualizedContainerService.HintSize="334,60" sap2010:WorkflowViewState.IdRef="Assign_66">
<Assign.To>
<OutArgument x:TypeArguments="x:String">[dataToken]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">[DateTime.Now.ToString]</InArgument>
</Assign.Value>
</Assign>
</Sequence>
</If.Then>
</If>
<ui:HttpClient Body="{x:Null}" ConsumerKey="{x:Null}" ConsumerSecret="{x:Null}" ContinueOnError="{x:Null}" OAuth1Token="{x:Null}" OAuth1TokenSecret="{x:Null}" Password="{x:Null}" ResourcePath="{x:Null}" ResponseHeaders="{x:Null}" Username="{x:Null}" AcceptFormat="JSON" sap2010:Annotation.AnnotationText="Se verifica daca urcarea in Google Cloud Storage a avut succes." BodyFormat="application/xml" ClientCertificate="[Nothing]" ClientCertificatePassword="[Nothing]" DisplayName="Verifica upload HTTP Request" EndPoint="https://www.googleapis.com/storage/v1/b/{BUCKET_NAME}/o/{OBJECT_NAME}" sap:VirtualizedContainerService.HintSize="384,79" sap2010:WorkflowViewState.IdRef="HttpClient_17" Method="GET" OAuth2Token="[token]" Result="[stringResult]" StatusCode="[statusCode]" TimeoutMS="6000">
<ui:HttpClient.Attachments>
<scg:Dictionary x:TypeArguments="x:String, InArgument(x:String)" />
</ui:HttpClient.Attachments>
<ui:HttpClient.Cookies>
<scg:Dictionary x:TypeArguments="x:String, InArgument(x:String)" />
</ui:HttpClient.Cookies>
<ui:HttpClient.Headers>
<scg:Dictionary x:TypeArguments="x:String, InArgument(x:String)" />
</ui:HttpClient.Headers>
<ui:HttpClient.Parameters>
<scg:Dictionary x:TypeArguments="x:String, InArgument(x:String)" />
</ui:HttpClient.Parameters>
<ui:HttpClient.UrlSegments>
<InArgument x:TypeArguments="x:String" x:Key="BUCKET_NAME">[Config("BucketName")]</InArgument>
<InArgument x:TypeArguments="x:String" x:Key="OBJECT_NAME">[Path.GetFileName(file)]</InArgument>
</ui:HttpClient.UrlSegments>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:HttpClient>
<If sap2010:Annotation.AnnotationText="Daca urcarea a esuat, se trimite un mesaj email expeditorului." Condition="[statusCode<> HttpStatusCode.OK]" DisplayName="Daca upload a esuat" sap:VirtualizedContainerService.HintSize="384,108" sap2010:WorkflowViewState.IdRef="If_22">
<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>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<Sequence sap:VirtualizedContainerService.HintSize="426,402" sap2010:WorkflowViewState.IdRef="Sequence_49">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<TryCatch DisplayName="Send SMTP Mail Message - Try Catch" sap:VirtualizedContainerService.HintSize="384,51" sap2010:WorkflowViewState.IdRef="TryCatch_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>
<TryCatch.Try>
<ui:SendMail Cc="{x:Null}" MailMessage="{x:Null}" Bcc="[Config("DestCopieTranscriere")]" Body="["Stimata Doamna/Stimate Domn,"+Environment.NewLine+Environment.NewLine+"Solicitarea dumneavoastra nu a putut fi procesata, deoarece nu am reusit sa urc fisierul audio in Google Cloud. Contactati Compartimentul IT."+Environment.NewLine+Environment.NewLine+"Robot Transcrieri"+Environment.NewLine+"Dezvoltat de Curtea de Apel Galati"]" DisplayName="Send SMTP Mail Message" Email="[Config("UsernameSmtp")]" EnableSSL="True" From="[Config("UsernameSmtp")]" sap:VirtualizedContainerService.HintSize="334,145" sap2010:WorkflowViewState.IdRef="SendMail_4" IsBodyHtml="False" Name="Robot Transcrieri" Password="[Config("PasswordSmtp")]" Port="[Convert.ToInt32(Config("PortSmtp").Trim)]" SecureConnection="None" Server="[Config("IPsmtp")]" Subject="Eroare - transcrierea fisierului audio" TimeoutMS="3000" To="[Path.GetFileNameWithoutExtension(file).Split({"__"}, StringSplitOptions.None)(0)]">
<ui:SendMail.Files>
<scg:List x:TypeArguments="InArgument(x:String)" Capacity="4" />
</ui:SendMail.Files>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:SendMail>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="404,21" sap2010:WorkflowViewState.IdRef="Catch`1_13">
<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>
<If Condition="[Config("EmailAdmin").Trim <> ""]" sap:VirtualizedContainerService.HintSize="484,293" sap2010:WorkflowViewState.IdRef="If_45">
<If.Then>
<ui:SendMail Bcc="{x:Null}" Cc="{x:Null}" MailMessage="{x:Null}" Body="["Stimata Doamna/Stimate Domn,"+Environment.NewLine+Environment.NewLine+"Solicitarea dumneavoastra nu a putut fi procesata, deoarece nu am reusit sa urc fisierul audio in Google Cloud. Contactati Compartimentul IT."+Environment.NewLine+Environment.NewLine+"Robot Transcrieri"+Environment.NewLine+"Dezvoltat de Curtea de Apel Galati"]" DisplayName="Send SMTP Mail Message" Email="[Config("UsernameSmtp")]" EnableSSL="True" From="[Config("UsernameSmtp")]" sap:VirtualizedContainerService.HintSize="334,145" sap2010:WorkflowViewState.IdRef="SendMail_18" IsBodyHtml="False" Name="Robot Transcrieri" Password="[Config("PasswordSmtp")]" Port="[Convert.ToInt32(Config("PortSmtp").Trim)]" SecureConnection="None" Server="[Config("IPsmtp")]" Subject="Eroare - transcrierea fisierului audio" TimeoutMS="3000" To="[Config("EmailAdmin")]">
<ui:SendMail.Files>
<scg:List x:TypeArguments="InArgument(x:String)" Capacity="4" />
</ui:SendMail.Files>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:SendMail>
</If.Then>
</If>
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
<ui:MoveFile ContinueOnError="{x:Null}" Destination="[Config("FolderPrelucrate")+"\"+ Path.GetFileNameWithoutExtension(file)+"__NEURCAT"+Path.GetExtension(file)]" DisplayName="Move FLAC/WAV File" sap:VirtualizedContainerService.HintSize="384,157" sap2010:WorkflowViewState.IdRef="MoveFile_7" Overwrite="True" Path="[file]" />
<ui:Continue sap:VirtualizedContainerService.HintSize="384,22" sap2010:WorkflowViewState.IdRef="Continue_2" />
</Sequence>
</If.Then>
<If.Else>
<Assign sap:VirtualizedContainerService.HintSize="262,60" sap2010:WorkflowViewState.IdRef="Assign_55">
<Assign.To>
<OutArgument x:TypeArguments="x:Int32">[statusCode]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:Int32">0</InArgument>
</Assign.Value>
</Assign>
</If.Else>
</If>
<ui:HttpClient ClientCertificate="{x:Null}" ClientCertificatePassword="{x:Null}" ConsumerKey="{x:Null}" ConsumerSecret="{x:Null}" ContinueOnError="{x:Null}" OAuth1Token="{x:Null}" OAuth1TokenSecret="{x:Null}" Password="{x:Null}" ResourcePath="{x:Null}" ResponseHeaders="{x:Null}" Username="{x:Null}" AcceptFormat="JSON" sap2010:Annotation.AnnotationText="Se lanseaza comanda de recunoastere Speech-to-Text." Body="["{""config"":{""maxAlternatives"": 1, ""languageCode"":""ro-RO"", ""enableWordTimeOffsets"": false, ""profanityFilter"": true, ""enableAutomaticPunctuation"": true}, ""audio"": {""uri"":""gs://"+Config("BucketName")+"/"+Path.GetFileName(file)+"""}}"]" BodyFormat="application/json" DisplayName="Speech Recognition HTTP Request" EndPoint="https://speech.googleapis.com/v1p1beta1/speech:longrunningrecognize" sap:VirtualizedContainerService.HintSize="384,64" sap2010:WorkflowViewState.IdRef="HttpClient_2" Method="POST" OAuth2Token="[token]" Result="[stringResult]" StatusCode="[statusCode]" TimeoutMS="6000">
<ui:HttpClient.Attachments>
<scg:Dictionary x:TypeArguments="x:String, InArgument(x:String)" />
</ui:HttpClient.Attachments>
<ui:HttpClient.Cookies>
<scg:Dictionary x:TypeArguments="x:String, InArgument(x:String)" />
</ui:HttpClient.Cookies>
<ui:HttpClient.Headers>
<scg:Dictionary x:TypeArguments="x:String, InArgument(x:String)" />
</ui:HttpClient.Headers>
<ui:HttpClient.Parameters>
<scg:Dictionary x:TypeArguments="x:String, InArgument(x:String)" />
</ui:HttpClient.Parameters>
<ui:HttpClient.UrlSegments>
<scg:Dictionary x:TypeArguments="x:String, InArgument(x:String)" />
</ui:HttpClient.UrlSegments>
<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:HttpClient>
<ui:DeserializeJson x:TypeArguments="njl:JObject" sap2010:Annotation.AnnotationText="Rezultatul comenzii anterioare se transforma (deserializeaza) din variabila sir de caractere intr-un obiect JSON JObject similar unui dictionar." DisplayName="Deserialize JSON" sap:VirtualizedContainerService.HintSize="384,117" sap2010:WorkflowViewState.IdRef="DeserializeJson`1_1" JsonObject="[jsonResult]" JsonString="[stringResult]">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:DeserializeJson>
<WriteLine DisplayName="Write Line" sap:VirtualizedContainerService.HintSize="384,61" sap2010:WorkflowViewState.IdRef="WriteLine_3" Text="["URL transcriere:"+Environment.NewLine+"https://speech.googleapis.com/v1p1beta1/operations/"+jsonResult("name").ToString+"/"]" />
<ui:MoveFile ContinueOnError="{x:Null}" sap2010:Annotation.AnnotationText="Se muta fisierul FLAC sau WAV in alt folder, pentru a nu fi prelucrat inca o data." Destination="[Config("FolderPrelucrate")+"\"+ Path.GetFileNameWithoutExtension(file)+"__"+jsonResult("name").ToString+Path.GetExtension(file)]" DisplayName="Move FLAC/WAV File" sap:VirtualizedContainerService.HintSize="384,199" sap2010:WorkflowViewState.IdRef="MoveFile_5" Overwrite="True" Path="[file]">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:MoveFile>
<If sap2010:Annotation.AnnotationText="Se trimite un mesaj email expeditorului, daca lansarea recunoasterii a esuat." Condition="[statusCode<> HttpStatusCode.OK]" DisplayName="Daca comanda Speech Recognition a esuat" sap:VirtualizedContainerService.HintSize="384,108" sap2010:WorkflowViewState.IdRef="If_24">
<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>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<Sequence sap:VirtualizedContainerService.HintSize="242,205" sap2010:WorkflowViewState.IdRef="Sequence_51">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<TryCatch DisplayName="Send SMTP Mail Message - Try Catch" sap:VirtualizedContainerService.HintSize="524,528" sap2010:WorkflowViewState.IdRef="TryCatch_13">
<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>
<TryCatch.Try>
<ui:SendMail Cc="{x:Null}" MailMessage="{x:Null}" Bcc="[Config("DestCopieTranscriere")]" Body="["Stimata Doamna/Stimate Domn,"+Environment.NewLine+Environment.NewLine+"Solicitarea dumneavoastra nu a putut fi procesata, deoarece nu am reusit sa lansez comanda de transcriere audio din Google Speech-to-Text API. Contactati Compartimentul IT."+Environment.NewLine+Environment.NewLine+"Robot Transcrieri"+Environment.NewLine+"Dezvoltat de Curtea de Apel Galati"]" DisplayName="Send SMTP Mail Message" Email="[Config("UsernameSmtp")]" EnableSSL="True" From="[Config("UsernameSmtp")]" sap:VirtualizedContainerService.HintSize="334,145" sap2010:WorkflowViewState.IdRef="SendMail_6" IsBodyHtml="False" Name="Robot Transcrieri" Password="[Config("PasswordSmtp")]" Port="[Convert.ToInt32(Config("PortSmtp").Trim)]" SecureConnection="None" Server="[Config("IPsmtp")]" Subject="Eroare - transcrierea fisierului audio" TimeoutMS="3000" To="[Path.GetFileNameWithoutExtension(file).Split({"__"}, StringSplitOptions.None)(0)]">
<ui:SendMail.Files>
<scg:List x:TypeArguments="InArgument(x:String)" Capacity="4" />
</ui:SendMail.Files>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:SendMail>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="490,366" sap2010:WorkflowViewState.IdRef="Catch`1_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>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
</ActivityAction.Argument>
<If Condition="[Config("EmailAdmin").Trim <> ""]" sap:VirtualizedContainerService.HintSize="484,293" sap2010:WorkflowViewState.IdRef="If_46">
<If.Then>
<ui:SendMail Bcc="{x:Null}" Cc="{x:Null}" MailMessage="{x:Null}" Body="["Stimata Doamna/Stimate Domn,"+Environment.NewLine+Environment.NewLine+"Solicitarea dumneavoastra nu a putut fi procesata, deoarece nu am reusit sa lansez comanda de transcriere audio din Google Speech-to-Text API. Contactati Compartimentul IT."+Environment.NewLine+Environment.NewLine+"Robot Transcrieri"+Environment.NewLine+"Dezvoltat de Curtea de Apel Galati"]" DisplayName="Send SMTP Mail Message" Email="[Config("UsernameSmtp")]" EnableSSL="True" From="[Config("UsernameSmtp")]" sap:VirtualizedContainerService.HintSize="334,145" sap2010:WorkflowViewState.IdRef="SendMail_19" IsBodyHtml="False" Name="Robot Transcrieri" Password="[Config("PasswordSmtp")]" Port="[Convert.ToInt32(Config("PortSmtp").Trim)]" SecureConnection="None" Server="[Config("IPsmtp")]" Subject="Eroare - transcrierea fisierului audio" TimeoutMS="3000" To="[Config("EmailAdmin")]">
<ui:SendMail.Files>
<scg:List x:TypeArguments="InArgument(x:String)" Capacity="4" />
</ui:SendMail.Files>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:SendMail>
</If.Then>
</If>
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
<ui:Continue sap:VirtualizedContainerService.HintSize="200,22" sap2010:WorkflowViewState.IdRef="Continue_3" />
</Sequence>
</If.Then>
</If>
<Assign sap:VirtualizedContainerService.HintSize="384,60" sap2010:WorkflowViewState.IdRef="Assign_26">
<Assign.To>
<OutArgument x:TypeArguments="x:String">[pereche("OPERATION_NAME")]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">[jsonResult("name").ToString]</InArgument>
</Assign.Value>
</Assign>
<Assign sap:VirtualizedContainerService.HintSize="384,60" sap2010:WorkflowViewState.IdRef="Assign_27">
<Assign.To>
<OutArgument x:TypeArguments="x:String">[pereche("CaleFisier")]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">[Config("FolderPrelucrate")+"\"+ Path.GetFileNameWithoutExtension(file)+"__"+jsonResult("name").ToString+Path.GetExtension(file)]</InArgument>
</Assign.Value>
</Assign>
<AddToCollection x:TypeArguments="scg:Dictionary(x:String, x:String)" sap2010:Annotation.AnnotationText="Fiecare pereche {OPERATION_NAME - CaleFisier} se adauga intr-o lista cu operatii in curs de desfasurare, care va fi verificata ulterior, pentru a se vedea care din operatii sunt finalizate." Collection="[ListaOperatii]" DisplayName="Add To Collection" sap:VirtualizedContainerService.HintSize="384,154" sap2010:WorkflowViewState.IdRef="AddToCollection`1_1" Item="[pereche]">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</AddToCollection>
</Sequence>
</ActivityAction>
</ui:ForEach.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>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:ForEach>
</Sequence>
<ui:ForEach x:TypeArguments="scg:Dictionary(x:String, x:String)" CurrentIndex="{x:Null}" sap2010:Annotation.AnnotationText="Pentru fiecare operatie (pereche) din lista, se verifica daca este finalizata, iar, in caz afirmativ, se salveaza rezultatul si se trimite expeditorului. Lista este prelucrata in sens invers, pentru ca altfel nu se pot sterge elemente dintr-o lista in timp ce este iterata." DisplayName="Obtine rezultatele recunoasterii" sap:VirtualizedContainerService.HintSize="200,213" sap2010:WorkflowViewState.IdRef="ForEach`1_24" Values="[ListaOperatii.Cast(of Dictionary (of String,String)).Reverse()]">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="scg:Dictionary(x:String, x:String)">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="scg:Dictionary(x:String, x:String)" Name="pereche" />
</ActivityAction.Argument>
<Sequence DisplayName="Body" sap:VirtualizedContainerService.HintSize="376,1616" sap2010:WorkflowViewState.IdRef="Sequence_61">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Sequence DisplayName="Initializare variabile" sap:VirtualizedContainerService.HintSize="334,66" sap2010:WorkflowViewState.IdRef="Sequence_60">
<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>
<Assign sap:VirtualizedContainerService.HintSize="242,60" sap2010:WorkflowViewState.IdRef="Assign_59">
<Assign.To>