-
Notifications
You must be signed in to change notification settings - Fork 560
Expand file tree
/
Copy pathGetAppCredentials.xaml
More file actions
195 lines (195 loc) · 12.6 KB
/
GetAppCredentials.xaml
File metadata and controls
195 lines (195 loc) · 12.6 KB
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
<Activity mc:Ignorable="sap sap2010 sads" x:Class="GetCredentials" this:GetCredentials.Credential="TestRobot-Credential"
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:s="clr-namespace:System;assembly=mscorlib"
xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
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:ss="clr-namespace:System.Security;assembly=mscorlib"
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 Name="Username" Type="OutArgument(x:String)" />
<x:Property Name="Credential" Type="InArgument(x:String)" />
<x:Property Name="Password" Type="OutArgument(ss:SecureString)" />
</x:Members>
<mva:VisualBasic.Settings>
<x:Null />
</mva:VisualBasic.Settings>
<sap2010:WorkflowViewState.IdRef>GetCredentials_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.Framework.Activities</x:String>
<x:String>System.Windows.Markup</x:String>
<x:String>System.Security</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>UiPath.Core</AssemblyReference>
<AssemblyReference>UiPath.Framework.Activities</AssemblyReference>
<AssemblyReference>PresentationFramework</AssemblyReference>
<AssemblyReference>WindowsBase</AssemblyReference>
<AssemblyReference>PresentationCore</AssemblyReference>
<AssemblyReference>System.Xaml</AssemblyReference>
<AssemblyReference>System.ServiceModel</AssemblyReference>
<AssemblyReference>System.ComponentModel.Composition</AssemblyReference>
<AssemblyReference>TimeSpan2</AssemblyReference>
</sco:Collection>
</TextExpression.ReferencesForImplementation>
<TryCatch sap2010:Annotation.AnnotationText="Retrieve credentials from Orchestrator assets or from Credential Manager, asking for them from user if not found

Using Credential returns Username and Password" DisplayName="Private: Try Get Credential Asset" sap2010:WorkflowViewState.IdRef="TryCatch_2">
<TryCatch.Variables>
<Variable x:TypeArguments="x:String" Name="stringPassword" />
</TryCatch.Variables>
<TryCatch.Try>
<ui:GetRobotCredential TimeoutMS="{x:Null}" AssetName="[Credential]" DisplayName="Get Orchestrator Credential" sap2010:WorkflowViewState.IdRef="GetRobotCredential_2" Password="[Password]" Username="[Username]" />
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception" sap2010:WorkflowViewState.IdRef="Catch`1_2">
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
</ActivityAction.Argument>
<If Condition="[Username is Nothing or Password is Nothing]" DisplayName="Private: Fetch local" sap2010:WorkflowViewState.IdRef="If_4">
<If.Then>
<Sequence DisplayName="Private: Get from Credential Store" sap2010:WorkflowViewState.IdRef="Sequence_6">
<Sequence.Variables>
<Variable x:TypeArguments="x:Boolean" Name="credentialFound" />
</Sequence.Variables>
<ui:GetSecureCredential CredentialType="Generic" DisplayName="Get secure credential" sap2010:WorkflowViewState.IdRef="GetSecureCredential_1" Password="[Password]" PersistanceType="Enterprise" Result="[credentialFound]" Target="[Credential]" Username="[Username]" />
<If Condition="[credentialFound]" DisplayName="If locally found" sap2010:WorkflowViewState.IdRef="If_3">
<If.Else>
<Sequence DisplayName="Private: Request and Store Credentials" sap2010:WorkflowViewState.IdRef="Sequence_5">
<ui:RequestCredential DisplayName="Request Credential" sap2010:WorkflowViewState.IdRef="RequestCredential_2" Message="["Please provide """ + Credential + """ access credentials"]" Password="[stringPassword]" Result="[credentialFound]" Title="Hello! This is Robot" Username="[Username]" />
<If Condition="[Not credentialFound]" DisplayName="If cancelled" sap2010:WorkflowViewState.IdRef="If_5">
<If.Then>
<Throw DisplayName="Raise No Credentials" Exception="[new Exception("Credentials not supplied")]" sap2010:WorkflowViewState.IdRef="Throw_1" />
</If.Then>
<If.Else>
<ui:AddCredential CredentialType="Generic" DisplayName="Add Credential" sap2010:WorkflowViewState.IdRef="AddCredential_2" Password="[stringPassword]" PersistanceType="Enterprise" Target="[Credential]" Username="[Username]" />
</If.Else>
</If>
<Assign DisplayName="Make Secure Password" sap2010:WorkflowViewState.IdRef="Assign_15">
<Assign.To>
<OutArgument x:TypeArguments="ss:SecureString">[Password]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="ss:SecureString">[new SecureString()]</InArgument>
</Assign.Value>
</Assign>
<ui:ForEach x:TypeArguments="x:Char" DisplayName="For each<char>" sap2010:WorkflowViewState.IdRef="ForEach`1_4" Values="[stringPassword.ToCharArray]">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="x:Char">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:Char" Name="key" />
</ActivityAction.Argument>
<InvokeMethod DisplayName="Invoke AppendChar" sap2010:WorkflowViewState.IdRef="InvokeMethod_1" MethodName="AppendChar">
<InvokeMethod.TargetObject>
<InArgument x:TypeArguments="ss:SecureString">[Password]</InArgument>
</InvokeMethod.TargetObject>
<InArgument x:TypeArguments="x:Char">[key]</InArgument>
</InvokeMethod>
</ActivityAction>
</ui:ForEach.Body>
</ui:ForEach>
</Sequence>
</If.Else>
</If>
</Sequence>
</If.Then>
</If>
</ActivityAction>
</Catch>
</TryCatch.Catches>
<TryCatch.Finally>
<Sequence DisplayName="Return" sap2010:WorkflowViewState.IdRef="Sequence_8" />
</TryCatch.Finally>
<sads:DebugSymbol.Symbol>d0hDOlxDb2RlSHViXFVpUGF0aFxSZUZyYW1lV29ya1xQZXJmb3JtZXJcRnJhbWV3b3JrL0dldEFwcENyZWRlbnRpYWxzLnhhbWwoAWMBeAECSAOMAQ4CAQFNB03bAQIBN4kBB4kBVQIBNlULhAEQAgECTT1NSwIBPE3MAU3YAQIBOk22AU3CAQIBOFUZVUcCAQNXD4IBGgIBBlsRW5oCAgEtXBGBARYCAQdb8wFbgQICATRbiwJblwICATJb2AFb6wECATBbpwFbswECAS5cH1wyAgEIXhV/IAIBCl8XX98CAgEjYBdnHAIBF2gXbyACARNwF34kAgELX4wBX/IBAgErX9ACX9wCAgEpX5YCX6kCAgEnX7ACX8YCAgEmX/wBX44CAgEkYCVgPAIBGGIbYrMBAgEhZRtl/AECARptSW1dAgEWakpqVAIBFHCUAXCyAQIBEXYdeywCAQxiT2KGAQIBImXVAWXjAQIBH2XtAWX5AQIBHWWeAWWwAQIBG3pEekkCAQ94T3hZAgEN</sads:DebugSymbol.Symbol>
</TryCatch>
<sap2010:WorkflowViewState.ViewStateManager>
<sap2010:ViewStateManager>
<sap2010:ViewStateData Id="GetRobotCredential_2" sap:VirtualizedContainerService.HintSize="200,22" />
<sap2010:ViewStateData Id="GetSecureCredential_1" sap:VirtualizedContainerService.HintSize="611,22" />
<sap2010:ViewStateData Id="RequestCredential_2" sap:VirtualizedContainerService.HintSize="464,22" />
<sap2010:ViewStateData Id="Throw_1" sap:VirtualizedContainerService.HintSize="200,22" />
<sap2010:ViewStateData Id="AddCredential_2" sap:VirtualizedContainerService.HintSize="200,22" />
<sap2010:ViewStateData Id="If_5" sap:VirtualizedContainerService.HintSize="464,210" />
<sap2010:ViewStateData Id="Assign_15" sap:VirtualizedContainerService.HintSize="464,60" />
<sap2010:ViewStateData Id="InvokeMethod_1" sap:VirtualizedContainerService.HintSize="218.5,134" />
<sap2010:ViewStateData Id="ForEach`1_4" sap:VirtualizedContainerService.HintSize="464,269" />
<sap2010:ViewStateData Id="Sequence_5" sap:VirtualizedContainerService.HintSize="486,805">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="If_3" sap:VirtualizedContainerService.HintSize="611,955" />
<sap2010:ViewStateData Id="Sequence_6" sap:VirtualizedContainerService.HintSize="633,1141">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="If_4" sap:VirtualizedContainerService.HintSize="758,1291" />
<sap2010:ViewStateData Id="Catch`1_2" sap:VirtualizedContainerService.HintSize="764,1361">
<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>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="Sequence_8" sap:VirtualizedContainerService.HintSize="200,99">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="TryCatch_2" sap:VirtualizedContainerService.HintSize="778,1587">
<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>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="GetCredentials_1" sap:VirtualizedContainerService.HintSize="818,1667" />
</sap2010:ViewStateManager>
</sap2010:WorkflowViewState.ViewStateManager>
</Activity>