-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.xaml
479 lines (479 loc) · 33.4 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
<Activity mc:Ignorable="sap sap2010" x:Class="Main" sap2010:ExpressionActivityEditor.ExpressionActivityEditor="C#" sap:VirtualizedContainerService.HintSize="1385,3884" sap2010:WorkflowViewState.IdRef="ActivityBuilder_1" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mca="clr-namespace:Microsoft.CSharp.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:sc="clr-namespace:System.Collections;assembly=mscorlib" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib" xmlns:ui="http://schemas.uipath.com/workflow/activities" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<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.Text</x:String>
<x:String>System.Xml.Linq</x:String>
<x:String>UiPath.Core</x:String>
<x:String>UiPath.Core.Activities</x:String>
<x:String>System.Windows.Markup</x:String>
<x:String>System.Collections.ObjectModel</x:String>
<x:String>System.Activities.DynamicUpdate</x:String>
<x:String>System.Runtime.Serialization</x:String>
<x:String>System.Linq.Expressions</x:String>
<x:String>System.Reflection</x:String>
<x:String>System.Runtime.InteropServices</x:String>
<x:String>System.ComponentModel</x:String>
<x:String>System.Xml.Serialization</x:String>
</sco:Collection>
</TextExpression.NamespacesForImplementation>
<TextExpression.ReferencesForImplementation>
<sco:Collection x:TypeArguments="AssemblyReference">
<AssemblyReference>Microsoft.Bcl.AsyncInterfaces</AssemblyReference>
<AssemblyReference>Microsoft.CSharp</AssemblyReference>
<AssemblyReference>Microsoft.VisualBasic</AssemblyReference>
<AssemblyReference>mscorlib</AssemblyReference>
<AssemblyReference>PresentationCore</AssemblyReference>
<AssemblyReference>PresentationFramework</AssemblyReference>
<AssemblyReference>System</AssemblyReference>
<AssemblyReference>System.Activities</AssemblyReference>
<AssemblyReference>System.ComponentModel.Composition</AssemblyReference>
<AssemblyReference>System.ComponentModel.TypeConverter</AssemblyReference>
<AssemblyReference>System.Core</AssemblyReference>
<AssemblyReference>System.Data</AssemblyReference>
<AssemblyReference>System.Data.DataSetExtensions</AssemblyReference>
<AssemblyReference>System.Drawing</AssemblyReference>
<AssemblyReference>System.Linq</AssemblyReference>
<AssemblyReference>System.Memory</AssemblyReference>
<AssemblyReference>System.Memory.Data</AssemblyReference>
<AssemblyReference>System.ObjectModel</AssemblyReference>
<AssemblyReference>System.Runtime.Serialization</AssemblyReference>
<AssemblyReference>System.ServiceModel</AssemblyReference>
<AssemblyReference>System.ServiceModel.Activities</AssemblyReference>
<AssemblyReference>System.ValueTuple</AssemblyReference>
<AssemblyReference>System.Xaml</AssemblyReference>
<AssemblyReference>System.Xml</AssemblyReference>
<AssemblyReference>System.Xml.Linq</AssemblyReference>
<AssemblyReference>UiPath.OCR.Activities.Design</AssemblyReference>
<AssemblyReference>UiPath.System.Activities</AssemblyReference>
<AssemblyReference>UiPath.System.Activities.Design</AssemblyReference>
<AssemblyReference>UiPath.UiAutomation.Activities</AssemblyReference>
<AssemblyReference>UiPath.UIAutomationCore</AssemblyReference>
<AssemblyReference>WindowsBase</AssemblyReference>
</sco:Collection>
</TextExpression.ReferencesForImplementation>
<Sequence sap2010:Annotation.AnnotationText="Specification:
Calculate the combined weight of the packages sent to one city

Consider the database of a shipping company containing people and the packages they are sending to certain cities across the world, along with their weight. The database is a Dictionary with the key of String type (the names of the persons) and the values of Dictionary (String/Cities, Double/Weight) type.

Please calculate the overall weight for one city destination. Once this is done, the user should be presented with an input dialog containing the distinct list of cities present in the input data dictionary. If the user chooses no value from the input dialog, print "Nothing chosen by the user"; otherwise you can print "The combined weight of the packages sent to <ChosenCity> is x.xx" (use double digits)." DisplayName="Sequence Main" sap:VirtualizedContainerService.HintSize="1395,3819" sap2010:WorkflowViewState.IdRef="Sequence_1">
<Sequence.Variables>
<Variable x:TypeArguments="scg:Dictionary(x:String, scg:Dictionary(x:String, x:Double))" Name="database" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Assign sap2010:Annotation.AnnotationText="I chose to initialize inline instead of the Variable pane for iteration and troubleshooting ease.

For this complex initialization, I started by initializing one item in the dictionary inside the dictionary format.
Once that was agreeable with the compiler, I filled in four items of the same values to mirror the four person entries. Again, I then sorted out the syntax issues.
Finally, I updated all the values to be different/meaningful." sap:VirtualizedContainerService.HintSize="1333,230" sap2010:WorkflowViewState.IdRef="Assign_1">
<Assign.To>
<OutArgument x:TypeArguments="scg:Dictionary(x:String, scg:Dictionary(x:String, x:Double))">
<mca:CSharpReference x:TypeArguments="scg:Dictionary(x:String, scg:Dictionary(x:String, x:Double))" sap2010:WorkflowViewState.IdRef="CSharpReference`1_1">database</mca:CSharpReference>
</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="scg:Dictionary(x:String, scg:Dictionary(x:String, x:Double))">
<mca:CSharpValue x:TypeArguments="scg:Dictionary(x:String, scg:Dictionary(x:String, x:Double))" sap2010:WorkflowViewState.IdRef="CSharpValue`1_265" xml:space="preserve">new Dictionary<string, Dictionary<string, double>>
{
{
"John Carmack",
new Dictionary<string, double>
{
{"Madrid", 2.1},
{"Paris", 1.1}
}
},
{
"Bjarne Stroustrup",
new Dictionary<string, double>
{
{"New York", 2.1},
{"Paris", 3.3},
{"Berlin", 0.8}
}
},
{
"Guido van Rossum",
new Dictionary<string, double>
{
{"San Francisco", 2.8},
{"New York", 1.1}
}
},
{
"Linus Torvalds",
new Dictionary<string, double>
{
{"New York", 2.1},
{"Paris", 3.3},
{"Cairo", 1.3},
{"Chicago", 1.9}
}
}
};</mca:CSharpValue>
</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>
<TryCatch DisplayName="Try Catch Main" sap:VirtualizedContainerService.HintSize="1333,3314" sap2010:WorkflowViewState.IdRef="TryCatch_1">
<TryCatch.Variables>
<Variable x:TypeArguments="scg:Dictionary(x:String, x:Double)" Name="cityWeightTotal">
<Variable.Default>
<mca:CSharpValue x:TypeArguments="scg:Dictionary(x:String, x:Double)" sap2010:WorkflowViewState.IdRef="CSharpValue`1_225">new Dictionary<string, double>()</mca:CSharpValue>
</Variable.Default>
</Variable>
</TryCatch.Variables>
<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="Sequence TryCatch Main" sap:VirtualizedContainerService.HintSize="1295,3086" sap2010:WorkflowViewState.IdRef="Sequence_2">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="dataName" />
<Variable x:TypeArguments="scg:List(x:String)" Name="listNames">
<Variable.Default>
<mca:CSharpValue x:TypeArguments="scg:List(x:String)" sap2010:WorkflowViewState.IdRef="CSharpValue`1_114">new List<string>{};</mca:CSharpValue>
</Variable.Default>
</Variable>
</Sequence.Variables>
<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="x:Object" CurrentIndex="{x:Null}" sap2010:Annotation.AnnotationText="Constraint the database result by setting the parameter to database.Keys" DisplayName="For Each Keys - ListNames" sap:VirtualizedContainerService.HintSize="1233,515" sap2010:WorkflowViewState.IdRef="ForEach`1_1">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="x:Object">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:Object" Name="item" />
</ActivityAction.Argument>
<Sequence DisplayName="Body Keys" sap:VirtualizedContainerService.HintSize="496,358" sap2010:WorkflowViewState.IdRef="Sequence_10">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="dataCity" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Assign sap2010:Annotation.AnnotationText="This dataName will be each name, duplicates not considered" DisplayName="Assign Key" sap:VirtualizedContainerService.HintSize="434,113" sap2010:WorkflowViewState.IdRef="Assign_5">
<Assign.To>
<OutArgument x:TypeArguments="x:String">
<mca:CSharpReference x:TypeArguments="x:String" sap2010:WorkflowViewState.IdRef="CSharpReference`1_29">dataName</mca:CSharpReference>
</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">
<mca:CSharpValue x:TypeArguments="x:String" sap2010:WorkflowViewState.IdRef="CSharpValue`1_104">item.ToString()</mca:CSharpValue>
</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>
<AddToCollection x:TypeArguments="x:String" sap2010:Annotation.AnnotationText="Add the name to a list. This will be used to iterate throught the dictionary values." DisplayName="Add To Collection Name" sap:VirtualizedContainerService.HintSize="434,97" sap2010:WorkflowViewState.IdRef="AddToCollection`1_3">
<AddToCollection.Item>
<InArgument x:TypeArguments="x:String">
<mca:CSharpValue x:TypeArguments="x:String" sap2010:WorkflowViewState.IdRef="CSharpValue`1_106">dataName</mca:CSharpValue>
</InArgument>
</AddToCollection.Item>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<InArgument x:TypeArguments="scg:ICollection(x:String)">
<mca:CSharpValue x:TypeArguments="scg:ICollection(x:String)" sap2010:WorkflowViewState.IdRef="CSharpValue`1_105">listNames</mca:CSharpValue>
</InArgument>
</AddToCollection>
</Sequence>
</ActivityAction>
</ui:ForEach.Body>
<ui:ForEach.Values>
<InArgument x:TypeArguments="sc:IEnumerable">
<mca:CSharpValue x:TypeArguments="sc:IEnumerable" sap2010:WorkflowViewState.IdRef="CSharpValue`1_54">database.Keys</mca:CSharpValue>
</InArgument>
</ui:ForEach.Values>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:ForEach>
<ui:ForEach x:TypeArguments="x:String" CurrentIndex="{x:Null}" sap2010:Annotation.AnnotationText="Iterates over the names in the list." DisplayName="For Each ListNames" sap:VirtualizedContainerService.HintSize="1233,1212" sap2010:WorkflowViewState.IdRef="ForEach`1_16">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="x:String">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:String" Name="item" />
</ActivityAction.Argument>
<Sequence DisplayName="Body ListNames" sap:VirtualizedContainerService.HintSize="1197,1055" sap2010:WorkflowViewState.IdRef="Sequence_24">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="city" />
<Variable x:TypeArguments="x:Double" Name="weight" />
</Sequence.Variables>
<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="scg:KeyValuePair(x:String, x:Double)" CurrentIndex="{x:Null}" DisplayName="For Each CityWeight" sap:VirtualizedContainerService.HintSize="1135,947" sap2010:WorkflowViewState.IdRef="ForEach`1_26">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="scg:KeyValuePair(x:String, x:Double)">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="scg:KeyValuePair(x:String, x:Double)" Name="itemCityWeight" />
</ActivityAction.Argument>
<Sequence sap2010:Annotation.AnnotationText="itemCityWeight.Key.ToString() &
itemCityWeight.Value.ToString() can be used to get the elements in the dictionary in the dictionary.
Next, store the totals per city." DisplayName="Body CityWeight" sap:VirtualizedContainerService.HintSize="1099,821" sap2010:WorkflowViewState.IdRef="Sequence_22">
<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>
<Assign sap2010:Annotation.AnnotationText="These variable are purely for convenience." DisplayName="Assign City" sap:VirtualizedContainerService.HintSize="1037,113" sap2010:WorkflowViewState.IdRef="Assign_10">
<Assign.To>
<OutArgument x:TypeArguments="x:String">
<mca:CSharpReference x:TypeArguments="x:String" sap2010:WorkflowViewState.IdRef="CSharpReference`1_31">city</mca:CSharpReference>
</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">
<mca:CSharpValue x:TypeArguments="x:String" sap2010:WorkflowViewState.IdRef="CSharpValue`1_206">itemCityWeight.Key.ToString()</mca:CSharpValue>
</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>
<Assign DisplayName="Assign Weight" sap:VirtualizedContainerService.HintSize="1037,82" sap2010:WorkflowViewState.IdRef="Assign_11">
<Assign.To>
<OutArgument x:TypeArguments="x:Double">
<mca:CSharpReference x:TypeArguments="x:Double" sap2010:WorkflowViewState.IdRef="CSharpReference`1_32">weight</mca:CSharpReference>
</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:Double">
<mca:CSharpValue x:TypeArguments="x:Double" sap2010:WorkflowViewState.IdRef="CSharpValue`1_207">itemCityWeight.Value</mca:CSharpValue>
</InArgument>
</Assign.Value>
</Assign>
<If sap2010:Annotation.AnnotationText="cityWeightTotal is the 'target' print dictionary. This check is to see if an element with the city exists." DisplayName="If City Exists" sap:VirtualizedContainerService.HintSize="1037,381" sap2010:WorkflowViewState.IdRef="If_1">
<If.Condition>
<InArgument x:TypeArguments="x:Boolean">
<mca:CSharpValue x:TypeArguments="x:Boolean" sap2010:WorkflowViewState.IdRef="CSharpValue`1_218">cityWeightTotal.ContainsKey(city)</mca:CSharpValue>
</InArgument>
</If.Condition>
<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>
<Sequence DisplayName="Sequence City Exists" sap:VirtualizedContainerService.HintSize="496,190" 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>
<Assign sap:VirtualizedContainerService.HintSize="434,82" sap2010:WorkflowViewState.IdRef="Assign_15">
<Assign.To>
<OutArgument x:TypeArguments="x:Double">
<mca:CSharpReference x:TypeArguments="x:Double" sap2010:WorkflowViewState.IdRef="CSharpReference`1_23">cityWeightTotal[city]</mca:CSharpReference>
</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:Double">
<mca:CSharpValue x:TypeArguments="x:Double" sap2010:WorkflowViewState.IdRef="CSharpValue`1_221">cityWeightTotal[city] + weight</mca:CSharpValue>
</InArgument>
</Assign.Value>
</Assign>
</Sequence>
</If.Then>
<If.Else>
<Sequence DisplayName="Sequence New City" sap:VirtualizedContainerService.HintSize="496,190" sap2010:WorkflowViewState.IdRef="Sequence_27">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Assign DisplayName="Assign New City" sap:VirtualizedContainerService.HintSize="434,82" sap2010:WorkflowViewState.IdRef="Assign_16">
<Assign.To>
<OutArgument x:TypeArguments="x:Double">
<mca:CSharpReference x:TypeArguments="x:Double" sap2010:WorkflowViewState.IdRef="CSharpReference`1_24">cityWeightTotal[city]</mca:CSharpReference>
</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:Double">
<mca:CSharpValue x:TypeArguments="x:Double" sap2010:WorkflowViewState.IdRef="CSharpValue`1_223">weight</mca:CSharpValue>
</InArgument>
</Assign.Value>
</Assign>
</Sequence>
</If.Else>
</If>
</Sequence>
</ActivityAction>
</ui:ForEach.Body>
<ui:ForEach.Values>
<InArgument x:TypeArguments="sc:IEnumerable">
<mca:CSharpValue x:TypeArguments="sc:IEnumerable" sap2010:WorkflowViewState.IdRef="CSharpValue`1_198">database[item.ToString()]</mca:CSharpValue>
</InArgument>
</ui:ForEach.Values>
</ui:ForEach>
</Sequence>
</ActivityAction>
</ui:ForEach.Body>
<ui:ForEach.Values>
<InArgument x:TypeArguments="sc:IEnumerable">
<mca:CSharpValue x:TypeArguments="sc:IEnumerable" sap2010:WorkflowViewState.IdRef="CSharpValue`1_166">listNames</mca:CSharpValue>
</InArgument>
</ui:ForEach.Values>
<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:ForEach>
<Sequence DisplayName="Sequence Input Dialog" sap:VirtualizedContainerService.HintSize="1233,1171" sap2010:WorkflowViewState.IdRef="Sequence_37">
<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:InputDialog OptionsString="{x:Null}" DisplayName="Input Dialog Prompt" sap:VirtualizedContainerService.HintSize="789,292" sap2010:WorkflowViewState.IdRef="InputDialog_1" IsPassword="False" Title="City Select">
<ui:InputDialog.Label>
<InArgument x:TypeArguments="x:String">
<mca:CSharpValue x:TypeArguments="x:String" sap2010:WorkflowViewState.IdRef="CSharpValue`1_263">"Select the city to get the combined weight." + Environment.NewLine + "Leave selector blank to print all items."</mca:CSharpValue>
</InArgument>
</ui:InputDialog.Label>
<ui:InputDialog.Options>
<InArgument x:TypeArguments="s:String[]">
<mca:CSharpValue x:TypeArguments="s:String[]" sap2010:WorkflowViewState.IdRef="CSharpValue`1_251">cityWeightTotal.Keys.ToArray()</mca:CSharpValue>
</InArgument>
</ui:InputDialog.Options>
<ui:InputDialog.Result>
<OutArgument x:TypeArguments="x:String">
<mca:CSharpReference x:TypeArguments="x:String" sap2010:WorkflowViewState.IdRef="CSharpReference`1_30">dataName</mca:CSharpReference>
</OutArgument>
</ui:InputDialog.Result>
</ui:InputDialog>
<If sap2010:Annotation.AnnotationText="The blank option was selected." DisplayName="If No Select Check" sap:VirtualizedContainerService.HintSize="789,728" sap2010:WorkflowViewState.IdRef="If_2">
<If.Condition>
<InArgument x:TypeArguments="x:Boolean">
<mca:CSharpValue x:TypeArguments="x:Boolean" sap2010:WorkflowViewState.IdRef="CSharpValue`1_257">dataName == ""</mca:CSharpValue>
</InArgument>
</If.Condition>
<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>
<Sequence DisplayName="Sequence No Selection Print All" sap:VirtualizedContainerService.HintSize="514,537" sap2010:WorkflowViewState.IdRef="Sequence_41">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<WriteLine DisplayName="Write Line No Select" sap:VirtualizedContainerService.HintSize="452,62" sap2010:WorkflowViewState.IdRef="WriteLine_17">
<InArgument x:TypeArguments="x:String">
<mca:CSharpValue x:TypeArguments="x:String" sap2010:WorkflowViewState.IdRef="CSharpValue`1_264">"Nothing chosen by the user." + Environment.NewLine + "Printing all items."</mca:CSharpValue>
</InArgument>
</WriteLine>
<ui:ForEach x:TypeArguments="scg:KeyValuePair(x:String, x:Double)" CurrentIndex="{x:Null}" sap2010:Annotation.AnnotationText="Print all of the cities and the weights." DisplayName="For Each Print All Values" sap:VirtualizedContainerService.HintSize="452,327" sap2010:WorkflowViewState.IdRef="ForEach`1_29">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="scg:KeyValuePair(x:String, x:Double)">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="scg:KeyValuePair(x:String, x:Double)" Name="item" />
</ActivityAction.Argument>
<Sequence DisplayName="Body Print All" sap:VirtualizedContainerService.HintSize="416,170" sap2010:WorkflowViewState.IdRef="Sequence_35">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<WriteLine DisplayName="Write Line" sap:VirtualizedContainerService.HintSize="354,62" sap2010:WorkflowViewState.IdRef="WriteLine_16">
<InArgument x:TypeArguments="x:String">
<mca:CSharpValue x:TypeArguments="x:String" sap2010:WorkflowViewState.IdRef="CSharpValue`1_248">item.Key.ToString() + " " + item.Value.ToString()</mca:CSharpValue>
</InArgument>
</WriteLine>
</Sequence>
</ActivityAction>
</ui:ForEach.Body>
<ui:ForEach.Values>
<InArgument x:TypeArguments="sc:IEnumerable">
<mca:CSharpValue x:TypeArguments="sc:IEnumerable" sap2010:WorkflowViewState.IdRef="CSharpValue`1_245">cityWeightTotal</mca:CSharpValue>
</InArgument>
</ui:ForEach.Values>
<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:ForEach>
</Sequence>
</If.Then>
<If.Else>
<WriteLine sap2010:Annotation.AnnotationText="Print the selected city and the weight." DisplayName="Write Line Weight Print" sap:VirtualizedContainerService.HintSize="230,104" sap2010:WorkflowViewState.IdRef="WriteLine_18">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<InArgument x:TypeArguments="x:String">
<mca:CSharpValue x:TypeArguments="x:String" sap2010:WorkflowViewState.IdRef="CSharpValue`1_259" xml:space="preserve">"The combined weight of the packages sent to " + dataName + " is " + cityWeightTotal[dataName].ToString() + "."</mca:CSharpValue>
</InArgument>
</WriteLine>
</If.Else>
</If>
</Sequence>
</Sequence>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="1299,21" sap2010:WorkflowViewState.IdRef="Catch`1_1">
<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>
<WriteLine DisplayName="Write Line" sap:VirtualizedContainerService.HintSize="230,62" sap2010:WorkflowViewState.IdRef="WriteLine_1">
<InArgument x:TypeArguments="x:String">
<mca:CSharpValue x:TypeArguments="x:String" sap2010:WorkflowViewState.IdRef="CSharpValue`1_26">"There was an exception:" + exception</mca:CSharpValue>
</InArgument>
</WriteLine>
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</Sequence>
</Activity>