Skip to content

Commit b24c71f

Browse files
committed
Update ValidateExistenceSubFolders Module
1 parent d8fa5a6 commit b24c71f

File tree

5 files changed

+70
-44
lines changed

5 files changed

+70
-44
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"OpenedDocuments":"[{\"DocumentPath\":\"ValidateExistenceSubFolders.xaml\",\"FactoryId\":\"{ACB8E7BA-F093-44C1-9B50-33ECA51AAE16}\"}]","ProjectBreakpoints":"{\"CodeBreakpoints\":{},\"Value\":{}}","ProjectActivitiesViewState":"{\"ValidateExistenceSubFolders.xaml\":[{\"ActivityIdRef\":\"LogMessage_1\",\"IsAdvancedOptionsExpanded\":false,\"Widgets\":{}},{\"ActivityIdRef\":\"LogMessage_4\",\"IsAdvancedOptionsExpanded\":false,\"Widgets\":{}},{\"ActivityIdRef\":\"If_1\",\"IsAdvancedOptionsExpanded\":false,\"Widgets\":{\"Then\":{\"ShowExpanded\":false},\"Else\":{\"ShowExpanded\":false}}},{\"ActivityIdRef\":\"LogMessage_2\",\"IsAdvancedOptionsExpanded\":false,\"Widgets\":{}},{\"ActivityIdRef\":\"LogMessage_3\",\"IsAdvancedOptionsExpanded\":false,\"Widgets\":{}},{\"ActivityIdRef\":\"Throw_1\",\"IsAdvancedOptionsExpanded\":false,\"Widgets\":{}},{\"ActivityIdRef\":\"LogMessage_5\",\"IsAdvancedOptionsExpanded\":false,\"Widgets\":{}},{\"ActivityIdRef\":\"LogMessage_6\",\"IsAdvancedOptionsExpanded\":false,\"Widgets\":{}}]}"}
1+
{"OpenedDocuments":"[{\"DocumentPath\":\"ValidateExistenceSubFolders.xaml\",\"FactoryId\":\"{ACB8E7BA-F093-44C1-9B50-33ECA51AAE16}\"}]","ProjectBreakpoints":"{\"CodeBreakpoints\":{},\"Value\":{}}","ProjectActivitiesViewState":"{\"ValidateExistenceSubFolders.xaml\":[{\"ActivityIdRef\":\"LogMessage_1\",\"IsAdvancedOptionsExpanded\":false,\"Widgets\":{}},{\"ActivityIdRef\":\"LogMessage_4\",\"IsAdvancedOptionsExpanded\":false,\"Widgets\":{}},{\"ActivityIdRef\":\"If_1\",\"IsAdvancedOptionsExpanded\":false,\"Widgets\":{\"Then\":{\"ShowExpanded\":false},\"Else\":{\"ShowExpanded\":false}}},{\"ActivityIdRef\":\"LogMessage_2\",\"IsAdvancedOptionsExpanded\":false,\"Widgets\":{}},{\"ActivityIdRef\":\"LogMessage_3\",\"IsAdvancedOptionsExpanded\":false,\"Widgets\":{}},{\"ActivityIdRef\":\"Throw_1\",\"IsAdvancedOptionsExpanded\":false,\"Widgets\":{}},{\"ActivityIdRef\":\"LogMessage_5\",\"IsAdvancedOptionsExpanded\":false,\"Widgets\":{}},{\"ActivityIdRef\":\"LogMessage_6\",\"IsAdvancedOptionsExpanded\":false,\"Widgets\":{}},{\"ActivityIdRef\":\"ForEach`1_1\",\"IsAdvancedOptionsExpanded\":false,\"Categories\":{\"\":true},\"Widgets\":{\"Body\":{\"ShowExpanded\":true}}}]}"}

Diff for: Folders/ValidateExistenceSubFolders/.local/dataManagerElementsOrder.json

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"SortBy": 0,
1414
"VariablesSectionElementsOrder": [],
1515
"ArgumentsSectionElementsOrder": [
16+
"in_int_RetryValidateSubFolders",
1617
"in_str_ListSubFoldersName",
1718
"in_str_MainFolderPath"
1819
],
-8 KB
Binary file not shown.

Diff for: Folders/ValidateExistenceSubFolders/.local/install/CodedWorkflow.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public partial class CodedWorkflow : CodedWorkflowBase
2121
{
2222
public CodedWorkflow()
2323
{
24-
_ = new System.Type[]{typeof(UiPath.UIAutomationNext.API.Contracts.IUiAutomationAppService), typeof(UiPath.Testing.API.ITestingService), typeof(UiPath.Mail.Activities.Api.IMailService), typeof(UiPath.Core.Activities.API.ISystemService)};
24+
_ = new System.Type[]{typeof(UiPath.Testing.API.ITestingService), typeof(UiPath.Core.Activities.API.ISystemService), typeof(UiPath.UIAutomationNext.API.Contracts.IUiAutomationAppService), typeof(UiPath.Mail.Activities.Api.IMailService)};
2525
}
2626

2727
protected UiPath.Mail.Activities.Api.IMailService mail { get => serviceContainer.Resolve<UiPath.Mail.Activities.Api.IMailService>(); }

Diff for: Folders/ValidateExistenceSubFolders/ValidateExistenceSubFolders.xaml

+67-42
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<x:Members>
33
<x:Property Name="in_str_MainFolderPath" Type="InArgument(x:String)" />
44
<x:Property Name="in_str_ListSubFoldersName" Type="InArgument(x:String)" />
5+
<x:Property Name="in_int_RetryValidateSubFolders" Type="InArgument(x:Int32)" />
56
</x:Members>
67
<VisualBasic.Settings>
78
<x:Null />
@@ -93,7 +94,7 @@
9394
<AssemblyReference>System.Runtime.Serialization.Primitives</AssemblyReference>
9495
</sco:Collection>
9596
</TextExpression.ReferencesForImplementation>
96-
<Sequence sap2010:Annotation.AnnotationText="[ValidateExistenceSubFolders]&#xD;&#xA;[Validate the existence of subfolders in the main folder.]&#xD;&#xA;[Arguments:&#xD;&#xA;&#xD;&#xA;IN:&#xD;&#xA;&#xD;&#xA;OUT: N/A.&#xD;&#xA;&#xD;&#xA;IN/OUT: N/A.]" DisplayName="ValidateExistenceSubFolders" sap:VirtualizedContainerService.HintSize="507.2,493.6" sap2010:WorkflowViewState.IdRef="Sequence_1">
97+
<Sequence sap2010:Annotation.AnnotationText="[ValidateExistenceSubFolders]&#xA;[Validate the existence of subfolders in the main folder.]&#xA;[Arguments:&#xA;&#xA;IN:&#xD;&#xA;&#xD;&#xA;- in_int_RetryValidateSubFolders (Int32): Stores the number of retries to validate the existence of subfolders;&#xD;&#xA;&#xD;&#xA;- in_str_ListSubFoldersName (String): Stores the list of subfolders' names to validate their existence;&#xD;&#xA;&#xD;&#xA;- in_str_MainFolderPath (String): Stores the full path of the mian folder.&#xA;&#xA;OUT: N/A.&#xA;&#xA;IN/OUT: N/A.]" DisplayName="ValidateExistenceSubFolders" sap:VirtualizedContainerService.HintSize="507.2,541.6" sap2010:WorkflowViewState.IdRef="Sequence_1">
9798
<sap:WorkflowViewStateService.ViewState>
9899
<scg:Dictionary x:TypeArguments="x:String, x:Object">
99100
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
@@ -135,56 +136,80 @@
135136
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
136137
</scg:Dictionary>
137138
</sap:WorkflowViewStateService.ViewState>
138-
<If Condition="[Directory.Exists(String.Format(&quot;{0}/{1}&quot;, in_str_MainFolderPath.TrimStart.TrimEnd, CurrentFolder.TrimStart.TrimEnd))]" DisplayName="Verify if Current Folder Exists in the Main Folder" sap:VirtualizedContainerService.HintSize="256.8,52.8" sap2010:WorkflowViewState.IdRef="If_1">
139-
<sap:WorkflowViewStateService.ViewState>
140-
<scg:Dictionary x:TypeArguments="x:String, x:Object">
141-
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
142-
<x:Boolean x:Key="IsPinned">False</x:Boolean>
143-
</scg:Dictionary>
144-
</sap:WorkflowViewStateService.ViewState>
145-
<If.Then>
146-
<Sequence sap:VirtualizedContainerService.HintSize="300,142.4" sap2010:WorkflowViewState.IdRef="Sequence_3">
147-
<sap:WorkflowViewStateService.ViewState>
148-
<scg:Dictionary x:TypeArguments="x:String, x:Object">
149-
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
150-
</scg:Dictionary>
151-
</sap:WorkflowViewStateService.ViewState>
152-
<ui:LogMessage DisplayName="Log Message: Current Folder Exists" sap:VirtualizedContainerService.HintSize="256.8,52.8" sap2010:WorkflowViewState.IdRef="LogMessage_2" Level="[UiPath.Core.Activities.LogLevel.Info]" Message="[String.Format(&quot;The {0} subfolder exists in the Main Folder...&quot;, CurrentFolder.TrimStart.TrimEnd)]">
139+
<ui:RetryScope DisplayName="Retry Scope: Retry the Validation of the Existence of SubFolders" sap:VirtualizedContainerService.HintSize="256.8,52.8" sap2010:WorkflowViewState.IdRef="RetryScope_1" NumberOfRetries="[in_int_RetryValidateSubFolders]">
140+
<ui:RetryScope.ActivityBody>
141+
<ActivityAction>
142+
<If Condition="[Directory.Exists(String.Format(&quot;{0}/{1}&quot;, in_str_MainFolderPath.TrimStart.TrimEnd, CurrentFolder.TrimStart.TrimEnd))]" DisplayName="Verify if Current Folder Exists in the Main Folder" sap:VirtualizedContainerService.HintSize="200,52.8" sap2010:WorkflowViewState.IdRef="If_1">
153143
<sap:WorkflowViewStateService.ViewState>
154144
<scg:Dictionary x:TypeArguments="x:String, x:Object">
155145
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
156146
<x:Boolean x:Key="IsPinned">False</x:Boolean>
157147
</scg:Dictionary>
158148
</sap:WorkflowViewStateService.ViewState>
159-
</ui:LogMessage>
160-
</Sequence>
161-
</If.Then>
162-
<If.Else>
163-
<Sequence sap:VirtualizedContainerService.HintSize="300,235.2" sap2010:WorkflowViewState.IdRef="Sequence_4">
164-
<sap:WorkflowViewStateService.ViewState>
165-
<scg:Dictionary x:TypeArguments="x:String, x:Object">
166-
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
167-
</scg:Dictionary>
168-
</sap:WorkflowViewStateService.ViewState>
169-
<ui:LogMessage DisplayName="Log Message: Current Folder No Exists" sap:VirtualizedContainerService.HintSize="256.8,52.8" sap2010:WorkflowViewState.IdRef="LogMessage_3" Level="[UiPath.Core.Activities.LogLevel.Error]" Message="[String.Format(&quot;The {0} subfolder does not exist in the Main Folder...&quot;, CurrentFolder.TrimStart.TrimEnd)]">
149+
<If.Then>
150+
<Sequence sap:VirtualizedContainerService.HintSize="300,142.4" sap2010:WorkflowViewState.IdRef="Sequence_3">
151+
<sap:WorkflowViewStateService.ViewState>
152+
<scg:Dictionary x:TypeArguments="x:String, x:Object">
153+
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
154+
</scg:Dictionary>
155+
</sap:WorkflowViewStateService.ViewState>
156+
<ui:LogMessage DisplayName="Log Message: Current Folder Exists" sap:VirtualizedContainerService.HintSize="256.8,52.8" sap2010:WorkflowViewState.IdRef="LogMessage_2" Level="[UiPath.Core.Activities.LogLevel.Info]" Message="[String.Format(&quot;The {0} subfolder exists in the Main Folder...&quot;, CurrentFolder.TrimStart.TrimEnd)]">
157+
<sap:WorkflowViewStateService.ViewState>
158+
<scg:Dictionary x:TypeArguments="x:String, x:Object">
159+
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
160+
<x:Boolean x:Key="IsPinned">False</x:Boolean>
161+
</scg:Dictionary>
162+
</sap:WorkflowViewStateService.ViewState>
163+
</ui:LogMessage>
164+
</Sequence>
165+
</If.Then>
166+
<If.Else>
167+
<Sequence sap:VirtualizedContainerService.HintSize="300,235.2" sap2010:WorkflowViewState.IdRef="Sequence_4">
168+
<sap:WorkflowViewStateService.ViewState>
169+
<scg:Dictionary x:TypeArguments="x:String, x:Object">
170+
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
171+
</scg:Dictionary>
172+
</sap:WorkflowViewStateService.ViewState>
173+
<ui:LogMessage DisplayName="Log Message: Current Folder No Exists" sap:VirtualizedContainerService.HintSize="256.8,52.8" sap2010:WorkflowViewState.IdRef="LogMessage_3" Level="[UiPath.Core.Activities.LogLevel.Error]" Message="[String.Format(&quot;The {0} subfolder does not exist in the Main Folder...&quot;, CurrentFolder.TrimStart.TrimEnd)]">
174+
<sap:WorkflowViewStateService.ViewState>
175+
<scg:Dictionary x:TypeArguments="x:String, x:Object">
176+
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
177+
<x:Boolean x:Key="IsPinned">False</x:Boolean>
178+
</scg:Dictionary>
179+
</sap:WorkflowViewStateService.ViewState>
180+
</ui:LogMessage>
181+
<Throw DisplayName="Throw SE Current Folder Not Exists" Exception="[New SystemException(String.Format(&quot;The {0} subfolder does not exist in the Main Folder...&quot;, CurrentFolder.TrimStart.TrimEnd))]" sap:VirtualizedContainerService.HintSize="256.8,52.8" sap2010:WorkflowViewState.IdRef="Throw_1">
182+
<sap:WorkflowViewStateService.ViewState>
183+
<scg:Dictionary x:TypeArguments="x:String, x:Object">
184+
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
185+
<x:Boolean x:Key="IsPinned">False</x:Boolean>
186+
</scg:Dictionary>
187+
</sap:WorkflowViewStateService.ViewState>
188+
</Throw>
189+
</Sequence>
190+
</If.Else>
191+
</If>
192+
</ActivityAction>
193+
</ui:RetryScope.ActivityBody>
194+
<ui:RetryScope.Condition>
195+
<ActivityFunc x:TypeArguments="x:Boolean">
196+
<ui:CheckTrue ErrorMessage="{x:Null}" DisplayName="Check True: Check the Existence of SubFolders" Expression="[Directory.Exists(String.Format(&quot;{0}/{1}&quot;, in_str_MainFolderPath.TrimStart.TrimEnd, CurrentFolder.TrimStart.TrimEnd))]" sap:VirtualizedContainerService.HintSize="332,52.8" sap2010:WorkflowViewState.IdRef="CheckTrue_1">
170197
<sap:WorkflowViewStateService.ViewState>
171198
<scg:Dictionary x:TypeArguments="x:String, x:Object">
172199
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
173200
<x:Boolean x:Key="IsPinned">False</x:Boolean>
174201
</scg:Dictionary>
175202
</sap:WorkflowViewStateService.ViewState>
176-
</ui:LogMessage>
177-
<Throw DisplayName="Throw SE Current Folder Not Exists" Exception="[New SystemException(String.Format(&quot;The {0} subfolder does not exist in the Main Folder...&quot;, CurrentFolder.TrimStart.TrimEnd))]" sap:VirtualizedContainerService.HintSize="256.8,52.8" sap2010:WorkflowViewState.IdRef="Throw_1">
178-
<sap:WorkflowViewStateService.ViewState>
179-
<scg:Dictionary x:TypeArguments="x:String, x:Object">
180-
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
181-
<x:Boolean x:Key="IsPinned">False</x:Boolean>
182-
</scg:Dictionary>
183-
</sap:WorkflowViewStateService.ViewState>
184-
</Throw>
185-
</Sequence>
186-
</If.Else>
187-
</If>
203+
</ui:CheckTrue>
204+
</ActivityFunc>
205+
</ui:RetryScope.Condition>
206+
<sap:WorkflowViewStateService.ViewState>
207+
<scg:Dictionary x:TypeArguments="x:String, x:Object">
208+
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
209+
<x:Boolean x:Key="IsPinned">False</x:Boolean>
210+
</scg:Dictionary>
211+
</sap:WorkflowViewStateService.ViewState>
212+
</ui:RetryScope>
188213
</Sequence>
189214
</ActivityAction>
190215
</ui:ForEach.Body>
@@ -206,7 +231,7 @@
206231
</Sequence>
207232
</TryCatch.Try>
208233
<TryCatch.Catches>
209-
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="411.2,22.4" sap2010:WorkflowViewState.IdRef="Catch`1_1">
234+
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="452.8,22.4" sap2010:WorkflowViewState.IdRef="Catch`1_1">
210235
<sap:WorkflowViewStateService.ViewState>
211236
<scg:Dictionary x:TypeArguments="x:String, x:Object">
212237
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
@@ -227,10 +252,10 @@
227252
</ui:LogMessage>
228253
</ActivityAction>
229254
</Catch>
230-
<Catch x:TypeArguments="ui:BusinessRuleException" sap:VirtualizedContainerService.HintSize="411.2,123.2" sap2010:WorkflowViewState.IdRef="Catch`1_2">
255+
<Catch x:TypeArguments="ui:BusinessRuleException" sap:VirtualizedContainerService.HintSize="452.8,22.4" sap2010:WorkflowViewState.IdRef="Catch`1_2">
231256
<sap:WorkflowViewStateService.ViewState>
232257
<scg:Dictionary x:TypeArguments="x:String, x:Object">
233-
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
258+
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
234259
<x:Boolean x:Key="IsPinned">False</x:Boolean>
235260
</scg:Dictionary>
236261
</sap:WorkflowViewStateService.ViewState>

0 commit comments

Comments
 (0)