-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.xaml
426 lines (426 loc) · 33.3 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
<Activity mc:Ignorable="sap sap2010" x:Class="PABARE_Framework" this:PABARE_Framework.in_ConfigurationPath="Data\Config.xlsx" 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: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:scc="clr-namespace:System.Collections.Concurrent;assembly=mscorlib" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib" xmlns:sn="clr-namespace:System.Net;assembly=System" xmlns:this="clr-namespace:" xmlns:ui="http://schemas.uipath.com/workflow/activities" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:Members>
<x:Property sap2010:Annotation.AnnotationText="Allows the Orchestrator queue name to be passed as an argument, instead of only being defined in the configuration file." Name="in_OrchestratorQueueName" Type="InArgument(x:String)" />
<x:Property Name="in_ConfigurationPath" Type="InArgument(x:String)" />
<x:Property Name="in_WorkerLimit" Type="InArgument(x:Int32)" />
</x:Members>
<mva:VisualBasic.Settings>
<x:Null />
</mva:VisualBasic.Settings>
<sap:VirtualizedContainerService.HintSize>654,783</sap:VirtualizedContainerService.HintSize>
<sap2010:WorkflowViewState.IdRef>Main2_1</sap2010:WorkflowViewState.IdRef>
<TextExpression.NamespacesForImplementation>
<sco:Collection x:TypeArguments="x:String">
<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.Collections.Concurrent</x:String>
</sco:Collection>
</TextExpression.NamespacesForImplementation>
<TextExpression.ReferencesForImplementation>
<sco:Collection x:TypeArguments="AssemblyReference">
<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.IntelligentOCR</AssemblyReference>
<AssemblyReference>UiPath.Python</AssemblyReference>
<AssemblyReference>UiPath.Excel</AssemblyReference>
<AssemblyReference>UiPath.UiAutomation.Activities</AssemblyReference>
<AssemblyReference>UiPath.System.Activities</AssemblyReference>
<AssemblyReference>System.ValueTuple</AssemblyReference>
</sco:Collection>
</TextExpression.ReferencesForImplementation>
<StateMachine InitialState="{x:Reference __ReferenceID2}" sap2010:Annotation.AnnotationText="[Process title]
[Process description]
[Additional information (e.g., author, contact information and applications involved and required external setup)]
" DisplayName="Parallel Background Business Process" sap:VirtualizedContainerService.HintSize="634,723" 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">310,0</av:Point>
<x:Double x:Key="StateContainerWidth">600</x:Double>
<x:Double x:Key="StateContainerHeight">600</x:Double>
<av:PointCollection x:Key="ConnectorLocation">340,75 340,118.5</av:PointCollection>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<State x:Name="__ReferenceID1" sap2010:Annotation.AnnotationText="Initialisize Worker and process transaction data." DisplayName="Worker Processing" sap:VirtualizedContainerService.HintSize="264,103" sap2010:WorkflowViewState.IdRef="State_4">
<State.Entry>
<ParallelForEach x:TypeArguments="x:Int32" sap2010:Annotation.AnnotationText="This foreach creates worker thread until BusinessProcess_ParallelExecutions is reached. The for each ends if all worker finished up." DisplayName="Create Workers based on BusinessProcess_ParallelExecutions" sap:VirtualizedContainerService.HintSize="426,515" sap2010:WorkflowViewState.IdRef="ParallelForEach`1_1" Values="[Enumerable.Range(1, cint(Config("BusinessProcess_ParallelExecutions")))]">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ActivityAction x:TypeArguments="x:Int32">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:Int32" Name="WorkerNumber" />
</ActivityAction.Argument>
<Sequence DisplayName="Per Worker" sap:VirtualizedContainerService.HintSize="376,310" 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>
<ui:LogMessage DisplayName="Log Message (Init Worker)" sap:VirtualizedContainerService.HintSize="334,91" sap2010:WorkflowViewState.IdRef="LogMessage_33" Level="Info" Message="[String.Format(Config("LogMessage_WorkerInitialized").ToString, WorkerNumber)]" />
<ui:InvokeWorkflowFile ContinueOnError="{x:Null}" DisplayName="Start the worker workflow" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="InvokeWorkflowFile_23" UnSafe="False" WorkflowFileName="Framework/Worker/Worker.xaml">
<ui:InvokeWorkflowFile.Arguments>
<InArgument x:TypeArguments="scg:Dictionary(x:String, x:Object)" x:Key="in_Config">[Config]</InArgument>
<InArgument x:TypeArguments="scg:Dictionary(x:String, sn:NetworkCredential)" x:Key="in_Credentials">[Credentials]</InArgument>
<InArgument x:TypeArguments="x:String" x:Key="in_WorkerID">["Worker " & WorkerNumber]</InArgument>
<InOutArgument x:TypeArguments="scg:Dictionary(x:String, x:Object)" x:Key="io_ProcessReferences">[ProcessReferences]</InOutArgument>
<InOutArgument x:TypeArguments="scc:ConcurrentQueue(x:Object)" x:Key="io_TransactionData">[TransactionData]</InOutArgument>
</ui:InvokeWorkflowFile.Arguments>
</ui:InvokeWorkflowFile>
</Sequence>
</ActivityAction>
</ParallelForEach>
</State.Entry>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:Point x:Key="ShapeLocation">30,258</av:Point>
<av:Size x:Key="ShapeSize">264,103</av:Size>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
<x:Double x:Key="StateContainerWidth">230</x:Double>
<x:Double x:Key="StateContainerHeight">25</x:Double>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<State.Transitions>
<Transition sap2010:Annotation.AnnotationText="This is a simple mecanism to stop the process.
In reallife scenario you can stop the process when there is no more data to process or on a schedule." DisplayName="No more data" sap:VirtualizedContainerService.HintSize="450,562" sap2010:WorkflowViewState.IdRef="Transition_7">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:PointCollection x:Key="ConnectorLocation">162,361 162,462.3 218,462.3</av:PointCollection>
<x:Int32 x:Key="SrcConnectionPointIndex">39</x:Int32>
<x:Int32 x:Key="DestConnectionPointIndex">45</x:Int32>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Transition.To>
<State x:Name="__ReferenceID0" sap2010:Annotation.AnnotationText="Dispose Process References and End Process" DisplayName="Process Finishing" sap:VirtualizedContainerService.HintSize="242,103" sap2010:WorkflowViewState.IdRef="State_1" IsFinal="True">
<State.Entry>
<TryCatch DisplayName="Try to dispose Process References" sap:VirtualizedContainerService.HintSize="438,314" sap2010:WorkflowViewState.IdRef="TryCatch_4">
<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:InvokeWorkflowFile ContinueOnError="{x:Null}" DisplayName="Invoke DisposeProcessData workflow" sap:VirtualizedContainerService.HintSize="334,87" sap2010:WorkflowViewState.IdRef="InvokeWorkflowFile_26" UnSafe="False" WorkflowFileName="Framework\Process\DisposeProcessData.xaml">
<ui:InvokeWorkflowFile.Arguments>
<InArgument x:TypeArguments="scg:Dictionary(x:String, x:Object)" x:Key="in_Config">[Config]</InArgument>
<InArgument x:TypeArguments="scg:Dictionary(x:String, sn:NetworkCredential)" x:Key="in_Credentials">[Credentials]</InArgument>
<InOutArgument x:TypeArguments="scg:Dictionary(x:String, x:Object)" x:Key="io_ProcessReferences">[ProcessReferences]</InOutArgument>
</ui:InvokeWorkflowFile.Arguments>
</ui:InvokeWorkflowFile>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="404,21" 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>
<Sequence DisplayName="Failed to dispose process data. set it to nothing" sap:VirtualizedContainerService.HintSize="376,283" sap2010:WorkflowViewState.IdRef="Sequence_26">
<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:LogMessage DisplayName="Log message (Failed to close applications)" sap:VirtualizedContainerService.HintSize="334,91" sap2010:WorkflowViewState.IdRef="LogMessage_31" Level="Warn" Message="[String.Format(Config("LogMessage_DisposingProcessDataException").ToString, exception.Message, exception.Source)]" />
<Assign DisplayName="Empty the Dictionary" sap:VirtualizedContainerService.HintSize="334,60" sap2010:WorkflowViewState.IdRef="Assign_23">
<Assign.To>
<OutArgument x:TypeArguments="scg:Dictionary(x:String, x:Object)">[ProcessReferences]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="scg:Dictionary(x:String, x:Object)">[New Dictionary(Of String, Object)]</InArgument>
</Assign.Value>
</Assign>
</Sequence>
</ActivityAction>
</Catch>
</TryCatch.Catches>
<TryCatch.Finally>
<If Condition="[SystemError IsNot Nothing]" DisplayName="If an error during the initialization occured" sap:VirtualizedContainerService.HintSize="484,227" sap2010:WorkflowViewState.IdRef="If_13">
<If.Then>
<Throw sap2010:Annotation.AnnotationText="Throw the occured error to mark the process in Orchestrator asd faulted" DisplayName="Throw Init Exception" Exception="[SystemError]" sap:VirtualizedContainerService.HintSize="200,79" sap2010:WorkflowViewState.IdRef="Throw_1">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</Throw>
</If.Then>
</If>
</TryCatch.Finally>
</TryCatch>
</State.Entry>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:Point x:Key="ShapeLocation">218,400.5</av:Point>
<av:Size x:Key="ShapeSize">242,103</av:Size>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
<x:Double x:Key="StateContainerWidth">208</x:Double>
<x:Double x:Key="StateContainerHeight">25</x:Double>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</State>
</Transition.To>
<Transition.Action>
<ui:LogMessage DisplayName="Log message (No more transations available)" sap:VirtualizedContainerService.HintSize="334,91" sap2010:WorkflowViewState.IdRef="LogMessage_30" Level="Info" Message="[Config("LogMessage_WorkerFinished").ToString]" />
</Transition.Action>
<Transition.Condition>True</Transition.Condition>
</Transition>
</State.Transitions>
</State>
<x:Reference>__ReferenceID0</x:Reference>
<State x:Name="__ReferenceID2" sap2010:Annotation.AnnotationText="Read configuration file and initialize process references used in the process." DisplayName="Process Initialization" sap:VirtualizedContainerService.HintSize="254,103" sap2010:WorkflowViewState.IdRef="State_2">
<State.Entry>
<TryCatch DisplayName="Try initializing settings and applications" sap:VirtualizedContainerService.HintSize="434,363" 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="Load configurations and open applications" sap:VirtualizedContainerService.HintSize="781,1615" sap2010:WorkflowViewState.IdRef="Sequence_4">
<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>
<Assign DisplayName="Assign SystemError (initialization)" sap:VirtualizedContainerService.HintSize="739,60" sap2010:WorkflowViewState.IdRef="Assign_5">
<Assign.To>
<OutArgument x:TypeArguments="s:Exception">[SystemError]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="s:Exception">[Nothing]</InArgument>
</Assign.Value>
</Assign>
<If sap2010:Annotation.AnnotationText="An uninitialized Config dictionary indicates that this is the first run of the process." Condition="[Config is Nothing]" DisplayName="If first run, read local configuration file" sap:VirtualizedContainerService.HintSize="739,1363" sap2010:WorkflowViewState.IdRef="If_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>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<Sequence DisplayName="First run" sap:VirtualizedContainerService.HintSize="580,1188" sap2010:WorkflowViewState.IdRef="Sequence_17">
<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:InvokeWorkflowFile ContinueOnError="{x:Null}" DisplayName="Invoke InitAllSettings workflow" sap:VirtualizedContainerService.HintSize="538,87" sap2010:WorkflowViewState.IdRef="InvokeWorkflowFile_12" UnSafe="False" WorkflowFileName="Framework/Settings/InitSettingsFromExcel.xaml">
<ui:InvokeWorkflowFile.Arguments>
<InArgument x:TypeArguments="x:String" x:Key="in_ConfigFile">[in_ConfigurationPath]</InArgument>
<InArgument x:TypeArguments="s:String[]" x:Key="in_ConfigSheets">[{"Settings", "Constants", "Messages"}]</InArgument>
<OutArgument x:TypeArguments="scg:Dictionary(x:String, x:Object)" x:Key="out_Config">[Config]</OutArgument>
<OutArgument x:TypeArguments="scg:Dictionary(x:String, sn:NetworkCredential)" x:Key="out_Credentials">[Credentials]</OutArgument>
</ui:InvokeWorkflowFile.Arguments>
</ui:InvokeWorkflowFile>
<If sap2010:Annotation.AnnotationText="Overwrite queue name from in configuration file in case the argument OrchestratorQueueName is specified.
This provides backward compatibility with < 2018.3 and allows default values to come from Config.xlsx" Condition="[Not string.IsNullOrEmpty(in_OrchestratorQueueName)]" DisplayName="If OrchestratorQueueName is specified" sap:VirtualizedContainerService.HintSize="538,198" 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>
<Assign DisplayName="Assign OrchestratorQueueName" sap:VirtualizedContainerService.HintSize="262,60" sap2010:WorkflowViewState.IdRef="Assign_20">
<Assign.To>
<OutArgument x:TypeArguments="x:Object">[Config("OrchestratorQueueName")]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:Object">[in_OrchestratorQueueName]</InArgument>
</Assign.Value>
</Assign>
</If.Then>
</If>
<If sap2010:Annotation.AnnotationText="Overwrite Worker_Limit from in configuration file in case the argument in_WorkerLimit is specified." Condition="[in_WorkerLimit <> 0]" DisplayName="If WorkerLimit is specified" sap:VirtualizedContainerService.HintSize="538,250" sap2010:WorkflowViewState.IdRef="If_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>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<Assign DisplayName="Assign BusinessProcess_ParallelExecutions" sap:VirtualizedContainerService.HintSize="262,60" sap2010:WorkflowViewState.IdRef="Assign_22">
<Assign.To>
<OutArgument x:TypeArguments="x:Object">[Config("BusinessProcess_ParallelExecutions")]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:Object">[in_WorkerLimit]</InArgument>
</Assign.Value>
</Assign>
</If.Then>
</If>
<ui:AddLogFields sap2010:Annotation.AnnotationText="Add the process name to the logs generated after this point. 
This log field can be used to create reports and visualizations about the process." DisplayName="Add Log Fields (BusinessProcessName)" sap:VirtualizedContainerService.HintSize="538,139" sap2010:WorkflowViewState.IdRef="AddLogFields_2">
<ui:AddLogFields.Fields>
<InArgument x:TypeArguments="x:String" x:Key="logF_BusinessProcessName">[Config("logF_BusinessProcessName").ToString]</InArgument>
</ui:AddLogFields.Fields>
<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:AddLogFields>
<If sap2010:Annotation.AnnotationText="if we work with queues, no transaction data need to be initialized. " Condition="[Not cbool(Config("Framework_UseOrchestratorQueue"))]" DisplayName="If we work with local datastructures like DataTable" sap:VirtualizedContainerService.HintSize="538,262" sap2010:WorkflowViewState.IdRef="If_12">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<ui:InvokeWorkflowFile ContinueOnError="{x:Null}" DisplayName="Invoke InitTransactionData workflow" sap:VirtualizedContainerService.HintSize="379,87" sap2010:WorkflowViewState.IdRef="InvokeWorkflowFile_24" UnSafe="False" WorkflowFileName="Framework/Transaction/DataStructure/InitTransactionData.xaml">
<ui:InvokeWorkflowFile.Arguments>
<InArgument x:TypeArguments="scg:Dictionary(x:String, x:Object)" x:Key="in_Config">[Config]</InArgument>
<InArgument x:TypeArguments="scg:Dictionary(x:String, sn:NetworkCredential)" x:Key="in_Credentials">[Credentials]</InArgument>
<OutArgument x:TypeArguments="scc:ConcurrentQueue(x:Object)" x:Key="out_TransactionData">[TransactionData]</OutArgument>
</ui:InvokeWorkflowFile.Arguments>
</ui:InvokeWorkflowFile>
</If.Then>
</If>
</Sequence>
</If.Then>
</If>
<ui:InvokeWorkflowFile ContinueOnError="{x:Null}" DisplayName="Invoke InitProcessData workflow" sap:VirtualizedContainerService.HintSize="739,87" sap2010:WorkflowViewState.IdRef="InvokeWorkflowFile_25" UnSafe="False" WorkflowFileName="Framework\Process\InitProcessData.xaml">
<ui:InvokeWorkflowFile.Arguments>
<InArgument x:TypeArguments="scg:Dictionary(x:String, x:Object)" x:Key="in_Config">[Config]</InArgument>
<InArgument x:TypeArguments="scg:Dictionary(x:String, sn:NetworkCredential)" x:Key="in_Credentials">[Credentials]</InArgument>
<InOutArgument x:TypeArguments="scg:Dictionary(x:String, x:Object)" x:Key="io_ProcessReferences">[ProcessReferences]</InOutArgument>
</ui:InvokeWorkflowFile.Arguments>
</ui:InvokeWorkflowFile>
</Sequence>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="400,201" 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>
<Assign sap2010:Annotation.AnnotationText="Failures during the initialization are considered SystemError and will lead to the End Process state, thus finalizing the execution." DisplayName="Assign SystemError" sap:VirtualizedContainerService.HintSize="262,132" sap2010:WorkflowViewState.IdRef="Assign_21">
<Assign.To>
<OutArgument x:TypeArguments="s:Exception">[SystemError]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="s:Exception">[Exception]</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>
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</State.Entry>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:Point x:Key="ShapeLocation">213,118.5</av:Point>
<av:Size x:Key="ShapeSize">254,103</av:Size>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
<x:Double x:Key="StateContainerWidth">220</x:Double>
<x:Double x:Key="StateContainerHeight">25</x:Double>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<State.Transitions>
<Transition DisplayName="Initialized" sap:VirtualizedContainerService.HintSize="450,505" sap2010:WorkflowViewState.IdRef="Transition_2">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Int32 x:Key="SrcConnectionPointIndex">37</x:Int32>
<x:Int32 x:Key="DestConnectionPointIndex">38</x:Int32>
<av:PointCollection x:Key="ConnectorLocation">213,170 162,170 162,258</av:PointCollection>
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Transition.To>
<x:Reference>__ReferenceID1</x:Reference>
</Transition.To>
<Transition.Condition>[SystemError is Nothing]</Transition.Condition>
</Transition>
<Transition DisplayName="Startup Error" sap:VirtualizedContainerService.HintSize="450,505" sap2010:WorkflowViewState.IdRef="Transition_3">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:PointCollection x:Key="ConnectorLocation">467,170 497,170 497,457.15 460,457.15</av:PointCollection>
<x:Int32 x:Key="SrcConnectionPointIndex">36</x:Int32>
<x:Int32 x:Key="DestConnectionPointIndex">40</x:Int32>
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Transition.To>
<x:Reference>__ReferenceID0</x:Reference>
</Transition.To>
<Transition.Action>
<ui:LogMessage DisplayName="Log Message (initialization failure)" sap:VirtualizedContainerService.HintSize="334,91" sap2010:WorkflowViewState.IdRef="LogMessage_26" Level="Fatal" Message="["System error at initialization: " + SystemError.Message + " at Source: " + SystemError.Source]" />
</Transition.Action>
<Transition.Condition>[SystemError isNot Nothing]</Transition.Condition>
</Transition>
</State.Transitions>
</State>
<StateMachine.Variables>
<Variable x:TypeArguments="s:Exception" sap2010:Annotation.AnnotationText="Exception variable that is used during transitions between states." Name="SystemError" />
<Variable x:TypeArguments="scg:Dictionary(x:String, x:Object)" sap2010:Annotation.AnnotationText="Dictionary structure to store configuration data. When passing configuration data between different states, it is recommended to add the data to this structure instead of creating new variables and arguments." Name="Config" />
<Variable x:TypeArguments="scc:ConcurrentQueue(x:Object)" sap2010:Annotation.AnnotationText="This variable can be used in case transactions are stored in a DataTable (for example, after being retrieved from a spreadsheet)." Name="TransactionData" />
<Variable x:TypeArguments="scg:Dictionary(x:String, sn:NetworkCredential)" sap2010:Annotation.AnnotationText="Dictionary structure to store credential data." Name="Credentials" />
<Variable x:TypeArguments="scg:Dictionary(x:String, x:Object)" Default="[New Dictionary(of String, Object)]" Name="ProcessReferences" />
</StateMachine.Variables>
</StateMachine>
</Activity>