-
Notifications
You must be signed in to change notification settings - Fork 0
/
GetCommonDataDirectory.xaml
241 lines (241 loc) · 18.5 KB
/
GetCommonDataDirectory.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
<Activity mc:Ignorable="sap sap2010" x:Class="GetCommonDataDirectory" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" 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: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">
<x:Members>
<x:Property sap2010:Annotation.AnnotationText="The full path to the common data directory" Name="CommonDataDirectory" Type="OutArgument(x:String)" />
</x:Members>
<mva:VisualBasic.Settings>
<x:Null />
</mva:VisualBasic.Settings>
<sap2010:Annotation.AnnotationText>UPTF0000015CeyI8SGVscExpbms+a19fQmFja2luZ0ZpZWxkIjoiaHR0cHM6XC9cL2dpdGh1Yi5jb21cL2ZsaW5kZXJzdW5pXC9ycGEtRmxpbmRlcnMuRm91bmRhdGlvblwvd2lraVwvR2V0Q29tbW9uRGF0YURpcmVjdG9yeSIsIjxJbml0aWFsVG9vbHRpcD5rX19CYWNraW5nRmllbGQiOiJEZXRlcm1pbmUgdGhlIGNvbW1vbiBkYXRhIGRpcmVjdG9yeSBmb3IgdXNlIGJ5IGFsbCBGbGluZGVycyBSUEEgcHJvamVjdHMuICIsIjxWZXJzaW9uPmtfX0JhY2tpbmdGaWVsZCI6MX0=</sap2010:Annotation.AnnotationText>
<sap:VirtualizedContainerService.HintSize>1205,2272</sap:VirtualizedContainerService.HintSize>
<sap2010:WorkflowViewState.IdRef>ActivityBuilder_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>System.Windows.Markup</x:String>
<x:String>UiPath.Core</x:String>
<x:String>UiPath.Core.Activities</x:String>
<x:String>System.Collections.ObjectModel</x:String>
<x:String>System.Activities.DynamicUpdate</x:String>
<x:String>System.Runtime.Serialization</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.Data.DataSetExtensions</AssemblyReference>
<AssemblyReference>System</AssemblyReference>
<AssemblyReference>System.Drawing</AssemblyReference>
<AssemblyReference>System.Core</AssemblyReference>
<AssemblyReference>System.Xml</AssemblyReference>
<AssemblyReference>System.Xml.Linq</AssemblyReference>
<AssemblyReference>PresentationFramework</AssemblyReference>
<AssemblyReference>WindowsBase</AssemblyReference>
<AssemblyReference>PresentationCore</AssemblyReference>
<AssemblyReference>System.Xaml</AssemblyReference>
<AssemblyReference>UiPath.System.Activities</AssemblyReference>
<AssemblyReference>UiPath.UiAutomation.Activities</AssemblyReference>
<AssemblyReference>System.ServiceModel</AssemblyReference>
<AssemblyReference>System.ValueTuple</AssemblyReference>
<AssemblyReference>UiPath.Cryptography</AssemblyReference>
<AssemblyReference>System.Runtime.Serialization</AssemblyReference>
</sco:Collection>
</TextExpression.ReferencesForImplementation>
<Sequence sap2010:Annotation.AnnotationText="Determine the common data directory for use by all Flinders RPA projects. " DisplayName="GetCommonDataDirectory" sap:VirtualizedContainerService.HintSize="949,2107" sap2010:WorkflowViewState.IdRef="Sequence_1">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" sap2010:Annotation.AnnotationText="Store the path to the common data directory" Name="rpaCommonDataDir" />
<Variable x:TypeArguments="x:String" sap2010:Annotation.AnnotationText="Store the dectect RPA environment" Name="rpaEnvironment" />
<Variable x:TypeArguments="x:Boolean" sap2010:Annotation.AnnotationText="Flag indicating if the detected path exists" Name="pathExists" />
<Variable x:TypeArguments="x:String" sap2010:Annotation.AnnotationText="The name of the asset in Orchestrator that contains the path to the CommonDataDirectory" Name="rpaDataDirectoryAssetName" />
</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>
<ui:InvokeWorkflowFile ContinueOnError="{x:Null}" sap2010:Annotation.AnnotationText="Detect which environment is being used" DisplayName="Invoke Workflow File" sap:VirtualizedContainerService.HintSize="907,143" sap2010:WorkflowViewState.IdRef="InvokeWorkflowFile_1" UnSafe="False" WorkflowFileName="DetectEnvironment.xaml">
<ui:InvokeWorkflowFile.Arguments>
<OutArgument x:TypeArguments="x:String" x:Key="DetectedEnvironment">[rpaEnvironment]</OutArgument>
<OutArgument x:TypeArguments="x:Boolean" x:Key="ValidEnvironmentName" />
<OutArgument x:TypeArguments="x:Boolean" x:Key="ValidEnvironmentValue" />
<InArgument x:TypeArguments="x:String" x:Key="RpaEnvironmentName" />
</ui:InvokeWorkflowFile.Arguments>
<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:InvokeWorkflowFile>
<If sap2010:Annotation.AnnotationText="Is this a development environment?" Condition="[rpaEnvironment.Equals("development") = True]" sap:VirtualizedContainerService.HintSize="907,841" sap2010:WorkflowViewState.IdRef="If_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>
<If.Then>
<Sequence sap2010:Annotation.AnnotationText="When running in a development environment on a development workstation eturn the default path to the UiPath folder in the local "MyDocuments" directory rather than getting the path on the server hosting Orchestrator." sap:VirtualizedContainerService.HintSize="376,540" sap2010:WorkflowViewState.IdRef="Sequence_2">
<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:GetEnvironmentFolder DisplayName="Get Environment Folder" FolderPath="[rpaCommonDataDir]" sap:VirtualizedContainerService.HintSize="334,61" sap2010:WorkflowViewState.IdRef="GetEnvironmentFolder_1" SpecialFolder="MyDocuments" />
<Assign sap2010:Annotation.AnnotationText="Add the standard 'UiPath' folder to the 'MyDocuments' path" sap:VirtualizedContainerService.HintSize="334,102" sap2010:WorkflowViewState.IdRef="Assign_1">
<Assign.To>
<OutArgument x:TypeArguments="x:String">[rpaCommonDataDir]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">[System.IO.Path.GetFullPath(System.IO.Path.Combine(rpaCommonDataDir, ".\UiPath\"))]</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:LogMessage sap2010:Annotation.AnnotationText="Log that RPA is running in a development environment so the local 'MyDocuments' directory is used." DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,133" sap2010:WorkflowViewState.IdRef="LogMessage_2" Level="Trace" Message="[String.Format("Determining host of RPA data directory variable: RPA is running in a '{0}' environment, using local development environment's 'MyDocuments' directory", rpaEnvironment)]">
<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:LogMessage>
</Sequence>
</If.Then>
<If.Else>
<Sequence sap2010:Annotation.AnnotationText="Get the expected path to the common data directory from the asset in Orchestrator" sap:VirtualizedContainerService.HintSize="486,662" sap2010:WorkflowViewState.IdRef="Sequence_5">
<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="Specify name of asset in Orchestrator to obtain the RPA data directory variable from." sap:VirtualizedContainerService.HintSize="444,117" sap2010:WorkflowViewState.IdRef="Assign_3">
<Assign.To>
<OutArgument x:TypeArguments="x:String">[rpaDataDirectoryAssetName]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">RPADataDirectory</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:GetRobotAsset TimeoutMS="{x:Null}" sap2010:Annotation.AnnotationText="Get the RPA data directory variable from the 'RPADataDirectory' asset in Orchestrator." AssetName="[rpaDataDirectoryAssetName]" DisplayName="Get Asset" sap:VirtualizedContainerService.HintSize="444,179" sap2010:WorkflowViewState.IdRef="GetRobotAsset_1">
<ui:GetRobotAsset.Value>
<OutArgument x:TypeArguments="x:String">[rpaCommonDataDir]</OutArgument>
</ui:GetRobotAsset.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>
</ui:GetRobotAsset>
<ui:LogMessage sap2010:Annotation.AnnotationText="Log that RPA is running in a non-development environment so the directory path, which will be on the server running Orchestrator, will be obtained from Orchestrator." DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="444,163" sap2010:WorkflowViewState.IdRef="LogMessage_3" Level="Trace" Message="[String.Format("Determining host of RPA data directory: RPA is running in a '{0}' environment, obtaining data directory from '{1}' asset in Orchestrator, the directory will be located on the server hosting Orchestrator", rpaEnvironment, rpaDataDirectoryAssetName )]">
<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:LogMessage>
</Sequence>
</If.Else>
</If>
<ui:LogMessage sap2010:Annotation.AnnotationText="Log that path of RPA data directory was found." DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="907,122" sap2010:WorkflowViewState.IdRef="LogMessage_1" Level="Trace" Message="[String.Format("Determining path of RPA data directory: detected common data directory '{0}'", rpaCommonDataDir)]">
<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:LogMessage>
<ui:PathExists sap2010:Annotation.AnnotationText="Check to ensure the path exists" DisplayName="Path Exists" Exists="[pathExists]" sap:VirtualizedContainerService.HintSize="907,120" sap2010:WorkflowViewState.IdRef="PathExists_1" Path="[rpaCommonDataDir]" PathType="Folder">
<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:PathExists>
<If sap2010:Annotation.AnnotationText="Check to make sure the detected path exists, if it does not throw an exception." Condition="[pathExists = True]" sap:VirtualizedContainerService.HintSize="907,598" sap2010:WorkflowViewState.IdRef="If_2">
<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 sap2010:Annotation.AnnotationText="Expected path exists, assign the appropriate return value and log a trace message." sap:VirtualizedContainerService.HintSize="376,409" sap2010:WorkflowViewState.IdRef="Sequence_6">
<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="Return the validated RPA data directory as an outgoing argument." sap:VirtualizedContainerService.HintSize="334,102" sap2010:WorkflowViewState.IdRef="Assign_2">
<Assign.To>
<OutArgument x:TypeArguments="x:String">[CommonDataDirectory]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">[rpaCommonDataDir]</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:LogMessage sap2010:Annotation.AnnotationText="Log that the directory specified by the RPA data directory variable is valid." DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,133" sap2010:WorkflowViewState.IdRef="LogMessage_4" Level="Trace" Message="[String.Format( "Validating value of RPA data directory variable: path '{0}' exists", CommonDataDirectory )]">
<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:LogMessage>
</Sequence>
</If.Then>
<If.Else>
<Sequence sap2010:Annotation.AnnotationText="Expected path does not exist, log a message and throw an exception" sap:VirtualizedContainerService.HintSize="376,419" sap2010:WorkflowViewState.IdRef="Sequence_7">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ui:LogMessage sap2010:Annotation.AnnotationText="Log that the directory specified by the RPA data directory variable does not exist." DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,133" sap2010:WorkflowViewState.IdRef="LogMessage_5" Level="Trace" Message="[String.Format( "Validating value of RPA data directory variable: non-existant path '{0}', exception thrown:", rpaCommonDataDir )]">
<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:LogMessage>
<ui:InvokeWorkflowFile ContinueOnError="{x:Null}" DisplayName="Invoke Workflow File" sap:VirtualizedContainerService.HintSize="334,112" sap2010:WorkflowViewState.IdRef="InvokeWorkflowFile_2" UnSafe="False" WorkflowFileName="ThrowConfigurationException.xaml">
<ui:InvokeWorkflowFile.Arguments>
<InArgument x:TypeArguments="x:String" x:Key="Message">[String.Format("The expected common data directory '{0}' does not exist.", rpaCommonDataDir)]</InArgument>
</ui:InvokeWorkflowFile.Arguments>
</ui:InvokeWorkflowFile>
</Sequence>
</If.Else>
</If>
</Sequence>
</Activity>