-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConfigUtility.xaml
159 lines (159 loc) · 27.5 KB
/
ConfigUtility.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
<Activity mc:Ignorable="sap sap2010" x:Class="ConfigUtility" mva:VisualBasic.Settings="{x:Null}" sap:VirtualizedContainerService.HintSize="1130.4,1556" sap2010:WorkflowViewState.IdRef="ConfigUtility_1" 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:njl="clr-namespace:Newtonsoft.Json.Linq;assembly=Newtonsoft.Json" xmlns:s="clr-namespace:System;assembly=System.Private.CoreLib" 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=System.Private.CoreLib" xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=System.Private.CoreLib" xmlns:ufa="clr-namespace:UiPath.Form.Activities;assembly=UiPath.Form.Activities" xmlns:ui="http://schemas.uipath.com/workflow/activities" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<TextExpression.NamespacesForImplementation>
<scg:List x:TypeArguments="x:String" Capacity="22">
<x:String>System.Activities</x:String>
<x:String>System.Activities.Statements</x:String>
<x:String>Microsoft.VisualBasic</x:String>
<x:String>System</x:String>
<x:String>System.Collections</x:String>
<x:String>System.Collections.Generic</x:String>
<x:String>UiPath.Core.Activities</x:String>
<x:String>System.Runtime.Serialization</x:String>
<x:String>System.Collections.ObjectModel</x:String>
<x:String>UiPath.Form.Activities</x:String>
<x:String>System.Activities.DynamicUpdate</x:String>
<x:String>System.ComponentModel</x:String>
<x:String>System.Reflection</x:String>
<x:String>System.Runtime.InteropServices</x:String>
<x:String>UiPath.Platform.ResourceHandling</x:String>
<x:String>Newtonsoft.Json</x:String>
<x:String>Newtonsoft.Json.Linq</x:String>
<x:String>System.Dynamic</x:String>
<x:String>System.Collections.Specialized</x:String>
<x:String>UiPath.Web.Activities</x:String>
<x:String>UiPath.Core</x:String>
<x:String>Microsoft.VisualBasic.CompilerServices</x:String>
</scg:List>
</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.Runtime.Serialization</AssemblyReference>
<AssemblyReference>UiPath.Form.Activities</AssemblyReference>
<AssemblyReference>System.Reflection.Metadata</AssemblyReference>
<AssemblyReference>System.Reflection.DispatchProxy</AssemblyReference>
<AssemblyReference>System.Memory</AssemblyReference>
<AssemblyReference>UiPath.Platform</AssemblyReference>
<AssemblyReference>System.ServiceModel</AssemblyReference>
<AssemblyReference>Microsoft.Bcl.AsyncInterfaces</AssemblyReference>
<AssemblyReference>System.ValueTuple</AssemblyReference>
<AssemblyReference>System.ComponentModel.Composition</AssemblyReference>
<AssemblyReference>NPOI</AssemblyReference>
<AssemblyReference>Newtonsoft.Json</AssemblyReference>
<AssemblyReference>UiPath.Web.Activities</AssemblyReference>
<AssemblyReference>UiPath.System.Activities.Design</AssemblyReference>
<AssemblyReference>UiPath.Studio.Constants</AssemblyReference>
</sco:Collection>
</TextExpression.ReferencesForImplementation>
<Sequence DisplayName="ConfigUtility" sap:VirtualizedContainerService.HintSize="635.2,1491.2" sap2010:WorkflowViewState.IdRef="Sequence_1">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="selectedButton" />
<Variable x:TypeArguments="x:String" Name="configJsonString" />
<Variable x:TypeArguments="scg:Dictionary(x:String, x:Object)" Default="[new dictionary(of string, object)]" Name="runConfig" />
</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:ReadTextFile File="{x:Null}" Content="[configJsonString]" DisplayName="Read Text File - ConfigUtility.json" FileName="Data\Supporting\ConfigUtility.json" sap:VirtualizedContainerService.HintSize="572.8,90.4" sap2010:WorkflowViewState.IdRef="ReadTextFile_5" />
<ufa:FormActivity CreateFormActivityFileName="{x:Null}" CreateFormActivityFilePath="{x:Null}" Dismissed="{x:Null}" IconPath="{x:Null}" LocalCSSFilePath="{x:Null}" TimeoutInSeconds="{x:Null}" WindowPositionLeft="{x:Null}" WindowPositionTop="{x:Null}" CreateFormId="928b18e0-60db-4ba7-9367-d2aabe2d5241" DisableMaximizeButton="False" DisableMinimizeButton="False" DisableSanitize="True" DisplayName="Config Utility" FormFieldsInputData="[configJsonString]" FormFieldsOutputData="[configJsonString]" FormHeight="800" FormSchema="%[{"label":"Table","cellAlignment":"right","key":"table1","type":"table","numRows":1,"numCols":8,"input":false,"tableView":false,"rows":[[{"components":[]},{"components":[]},{"components":[]},{"components":[]},{"components":[]},{"components":[]},{"components":[]},{"components":[{"label":"Reset all values","theme":"danger","tooltip":"Resets this form backs to the attended framework's starting field keys and values.","tableView":false,"key":"resetAllValues","input":true,"type":"button","isResetData":false}]}]]},{"components":[{"label":"Form Defaults","key":"formDefaults","components":[{"refreshOnChange":true,"content":"<br>\nIf you want certain fields in your input form to reset with a default value during each execution, please provide the field key and reset value here. The description is for your own reference.\n<br><br>\nFor example, I have a Folder Browse component with the field key \"outputFolderPath\" in my input form. If I want that field to be blank for each execution, I can include the field key here and just leave the value blank.","key":"label","input":false,"tableView":false,"label":"Label","type":"label"},{"label":"formDefaultsGrid","key":"formDefaultsGrid","type":"editgrid","input":true,"tableView":false,"components":[{"columns":[{"components":[{"label":"Field Key","tableView":true,"validate":{"required":true},"key":"formDefaultsFieldKey","type":"textfield","input":true,"hideOnChildrenHidden":false}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6},{"components":[{"label":"Value","tableView":true,"key":"formDefaultsGridValue","type":"textfield","input":true,"hideOnChildrenHidden":false}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6},{"components":[{"label":"Description","tableView":true,"key":"formDefaultsGridDescription","type":"textfield","input":true,"hideOnChildrenHidden":false}],"size":"md","width":10,"offset":0,"push":0,"pull":0,"currentWidth":10}],"autoAdjust":true,"key":"columns","type":"columns","input":false,"tableView":false,"label":"Columns"}]}]},{"label":"Exceptions","key":"exceptions","components":[{"refreshOnChange":true,"content":"<br>\nCreate your business rule exception language here so you don't need to hardcode the messages in your workflows.\n<br>\nThis allows you to easily change exception messages based on user feedback. Please note you still need to publish a new version of the automation for the changes to take effect.\n<br><br>\nFor example, I create a new business rule exception called \"noInputData\" with the message \"No data was found in your input file.\"\n<br> In your workflow, use the Throw activity accompanied by New BusinessRuleException(io_dict_Config(\"noInputData\").ToString)) to use the message.","key":"label1","input":false,"tableView":false,"label":"Label","type":"label"},{"label":"exceptionsGrid","hideLabel":true,"key":"exceptionsGrid","type":"editgrid","input":true,"tableView":false,"components":[{"columns":[{"components":[{"label":"Field Key","tableView":true,"validate":{"required":true},"key":"exceptionsGridFieldKey","type":"textfield","input":true,"hideOnChildrenHidden":false}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6},{"components":[{"label":"Value","tableView":true,"validate":{"required":true},"key":"exceptionsGridValue","type":"textfield","input":true,"hideOnChildrenHidden":false}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6},{"components":[{"label":"Description","tableView":true,"key":"exceptionsGridDescription","type":"textfield","input":true,"hideOnChildrenHidden":false}],"size":"md","width":10,"offset":0,"push":0,"pull":0,"currentWidth":10}],"autoAdjust":true,"key":"columns","type":"columns","input":false,"tableView":false,"label":"Columns"}]}]},{"label":"Settings","key":"settings","components":[{"refreshOnChange":true,"content":"<br>\nAt a minimum, you'll want to edit the following keys:\n<br>\n<ul>\n <li>logF_BusinessProcessName</li>\n <li>userGuideUrl</li>\n <li>automationDescription</li>\n </ul>","key":"label2","input":false,"tableView":false,"label":"Label","type":"label"},{"label":"settingsGrid","hideLabel":true,"key":"settingsGrid","type":"editgrid","input":true,"tableView":false,"components":[{"columns":[{"components":[{"label":"Field Key","tableView":true,"validate":{"required":true},"key":"settingsGridFieldKey","type":"textfield","input":true,"hideOnChildrenHidden":false}],"width":15,"push":0,"pull":0,"size":"md","offset":0,"currentWidth":15},{"components":[{"label":"Value","tableView":true,"key":"settingsGridValue","type":"textfield","input":true,"hideOnChildrenHidden":false}],"width":15,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":15},{"components":[{"label":"Description","tableView":true,"key":"settingsGridDescription","type":"textfield","input":true,"hideOnChildrenHidden":false}],"size":"md","width":10,"offset":0,"push":0,"pull":0,"currentWidth":10}],"autoAdjust":true,"key":"columns","type":"columns","input":false,"tableView":false,"label":"Columns"}]}]},{"label":"Constants","key":"constants","components":[{"refreshOnChange":true,"content":"<br>\nAdjust the formTitle value to set the title of your input and result forms.","key":"label3","input":false,"tableView":false,"label":"Label","type":"label"},{"label":"constantsGrid","hideLabel":true,"key":"constantsGrid","type":"editgrid","input":true,"tableView":false,"components":[{"columns":[{"components":[{"label":"Field Key","tableView":true,"validate":{"required":true},"key":"constantsGridFieldKey","type":"textfield","input":true,"hideOnChildrenHidden":false}],"width":10,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":10},{"components":[{"label":"Value","tableView":true,"validate":{"required":true},"key":"constantsGridValue","type":"textfield","input":true,"hideOnChildrenHidden":false}],"width":10,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":10},{"components":[{"label":"Description","tableView":true,"key":"constantsGridDescription","type":"textfield","input":true,"hideOnChildrenHidden":false}],"size":"md","width":10,"offset":0,"push":0,"pull":0,"currentWidth":10}],"autoAdjust":true,"key":"columns","type":"columns","input":false,"tableView":false,"label":"Columns"}]}]},{"label":"Assets","key":"assets","components":[{"label":"assetsGrid","hideLabel":true,"key":"assetsGrid","type":"editgrid","input":true,"tableView":false,"components":[{"columns":[{"components":[{"label":"Field Key","tableView":true,"validate":{"required":true},"key":"assetsGridFieldKey","type":"textfield","input":true,"hideOnChildrenHidden":false}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6},{"components":[{"label":"Value","tableView":true,"validate":{"required":true},"key":"assetsGridValue","type":"textfield","input":true,"hideOnChildrenHidden":false}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6},{"components":[{"label":"Orchestrator Asset Folder","tableView":true,"key":"assetsGridOrchestratorAssetFolder","type":"textfield","input":true,"hideOnChildrenHidden":false}],"size":"md","width":6,"offset":0,"push":0,"pull":0,"currentWidth":6},{"components":[{"label":"Description","tableView":true,"key":"assetsGridDescription","type":"textfield","input":true,"hideOnChildrenHidden":false}],"size":"md","width":10,"offset":0,"push":0,"pull":0,"currentWidth":10}],"autoAdjust":true,"key":"columns","type":"columns","input":false,"tableView":false,"label":"Columns"}]}]}],"hideLabel":true,"key":"tabs","type":"tabs","input":false,"tableView":false,"label":"Tabs"},{"label":"Table","cellAlignment":"right","key":"table","type":"table","numRows":1,"numCols":8,"input":false,"tableView":false,"rows":[[{"components":[]},{"components":[]},{"components":[]},{"components":[]},{"components":[]},{"components":[]},{"components":[{"label":"Cancel","action":"custom","theme":"secondary","tableView":false,"key":"cancel","properties":{"closeOnSubmit":"true"},"custom":"instance.emit('executeDoBlock', instance.component);","isResetData":false,"input":true,"type":"button","showUpdateData":false}]},{"components":[{"label":"Save","tableView":false,"key":"save","custom":"instance.emit('executeDoBlock', instance.component);","isResetData":false,"type":"button","input":true,"saveOnEnter":false}]}]]}]" FormTheme="{}{"Activities":["FORMS"],"Id":"100120","Name":"Default","BaseCss":"../../assets/css/themes/uipath.bootstrap.min.css","ImageSrc":"../../assets/themeicons/uipath.png","OverrideCssUrl":"../../assets/css/themes/uipath.custom.css","UserStyleOverrides":"","Properties":"","IsCustomTheme":false,"Version":1,"ThemeVersion":1}" FormTitle="Config Utility" FormWidth="1400" GenerateInputFields="False" sap:VirtualizedContainerService.HintSize="572.8,1237.6" sap2010:WorkflowViewState.IdRef="FormActivity_1" IsReadOnly="False" MaxColumnsForSchemaGeneration="6" RunDoBlockFirst="False" RunInIsolatedMode="False" SelectedButton="[selectedButton]" StartAsMinimized="False">
<ufa:FormActivity.Body>
<ActivityAction x:TypeArguments="scg:Dictionary(x:String, x:Object)">
<Switch x:TypeArguments="x:String" DisplayName="Switch Selected Button" Expression="[selectedButton]" sap:VirtualizedContainerService.HintSize="536,1101.6" sap2010:WorkflowViewState.IdRef="Switch`1_2">
<Switch.Default>
<ui:LogMessage DisplayName="Log Message - Invalid Button" sap:VirtualizedContainerService.HintSize="333.6,92.8" sap2010:WorkflowViewState.IdRef="LogMessage_1" Level="Error" Message="["Invalid button pressed"]" />
</Switch.Default>
<Sequence x:Key="save" DisplayName="Saving Steps" sap:VirtualizedContainerService.HintSize="496,858.4" sap2010:WorkflowViewState.IdRef="Sequence_16">
<Sequence.Variables>
<Variable x:TypeArguments="njl:JObject" Name="configJObj" />
<Variable x:TypeArguments="scg:Dictionary(x:String, s:String[])" Default="[New Dictionary(of String, String())]" Name="assetConfig" />
</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="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ui:WriteTextFile File="{x:Null}" DisplayName="Write Text File - ConfigUtility.json" FileName="Data\Supporting\ConfigUtility.json" sap:VirtualizedContainerService.HintSize="433.6,144" sap2010:WorkflowViewState.IdRef="WriteTextFile_9" Text="[configJsonString]" />
<ui:DeserializeJson x:TypeArguments="njl:JObject" DisplayName="Deserialize JSON - Config Utility" sap:VirtualizedContainerService.HintSize="433.6,69.6" sap2010:WorkflowViewState.IdRef="DeserializeJson`1_2" JsonObject="[configJObj]" JsonString="[configJsonString]" />
<ui:ForEach x:TypeArguments="njl:JProperty" CurrentIndex="{x:Null}" DisplayName="For Each Tab" sap:VirtualizedContainerService.HintSize="433.6,257.6" sap2010:WorkflowViewState.IdRef="ForEach`1_13" Values="[configJObj]">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="njl:JProperty">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="njl:JProperty" Name="tab" />
</ActivityAction.Argument>
<ui:InvokeWorkflowFile ArgumentsVariable="{x:Null}" ContinueOnError="{x:Null}" DisplayName="Invoke ProcessTab workflow" sap:VirtualizedContainerService.HintSize="333.6,123.2" sap2010:WorkflowViewState.IdRef="InvokeWorkflowFile_1" UnSafe="False" WorkflowFileName="ConfigUtility_Support\ProcessTab.xaml">
<ui:InvokeWorkflowFile.Arguments>
<InArgument x:TypeArguments="njl:JProperty" x:Key="in_Tab">
<mva:VisualBasicValue x:TypeArguments="njl:JProperty" ExpressionText="tab" />
</InArgument>
<InOutArgument x:TypeArguments="scg:Dictionary(x:String, s:String[])" x:Key="io_assetConfig">
<mva:VisualBasicReference x:TypeArguments="scg:Dictionary(x:String, s:String[])" ExpressionText="assetConfig" />
</InOutArgument>
<InOutArgument x:TypeArguments="scg:Dictionary(x:String, x:Object)" x:Key="io_runConfig">
<mva:VisualBasicReference x:TypeArguments="scg:Dictionary(x:String, x:Object)" ExpressionText="runConfig" />
</InOutArgument>
</ui:InvokeWorkflowFile.Arguments>
</ui:InvokeWorkflowFile>
</ActivityAction>
</ui:ForEach.Body>
</ui:ForEach>
<ui:WriteTextFile File="{x:Null}" DisplayName="Write Text File - Config.json" FileName="Data\Supporting\Config.json" sap:VirtualizedContainerService.HintSize="433.6,144" sap2010:WorkflowViewState.IdRef="WriteTextFile_11" Text="[Newtonsoft.Json.JsonConvert.SerializeObject(runConfig)]" />
</Sequence>
<Sequence x:Key="resetAllValues" DisplayName="Reset Config to factory defaults" sap:VirtualizedContainerService.HintSize="545.6,761.6" sap2010:WorkflowViewState.IdRef="Sequence_20">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="resetConfirmation" />
</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:MessageBox Caption="{x:Null}" AutoCloseAfter="00:00:00" Buttons="YesNo" ChosenButton="[resetConfirmation]" DisplayName="Message Box - Reset Confirm" sap:VirtualizedContainerService.HintSize="483.2,95.2" sap2010:WorkflowViewState.IdRef="MessageBox_3" Text="["Are you sure you want to reset this Config form? All changes to this Config form will have been lost."]" />
<If Condition="[resetConfirmation = "Yes"]" DisplayName="If Confirmed" sap:VirtualizedContainerService.HintSize="483.2,368" sap2010:WorkflowViewState.IdRef="If_6">
<If.Then>
<ui:CopyFile ContinueOnError="{x:Null}" Destination="Data\Supporting\ConfigUtility.json" DisplayName="Copy File - ConfigUtility - Backup.json" sap:VirtualizedContainerService.HintSize="433.6,169.6" sap2010:WorkflowViewState.IdRef="CopyFile_2" Overwrite="True" Path="Data\Supporting\ConfigUtility - Backup.json" />
</If.Then>
<If.Else>
<Sequence sap2010:WorkflowViewState.IdRef="Sequence_19">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</Sequence>
</If.Else>
</If>
<ui:MessageBox Caption="{x:Null}" AutoCloseAfter="00:00:00" Buttons="Ok" ChosenButton="[resetConfirmation]" DisplayName="Message Box - Rerun Notice" sap:VirtualizedContainerService.HintSize="483.2,95.2" sap2010:WorkflowViewState.IdRef="MessageBox_4" Text="["Please rerun the ConfigUtility workflow."]" />
</Sequence>
<x:Null x:Key="cancel" />
</Switch>
</ActivityAction>
</ufa:FormActivity.Body>
<ufa:FormActivity.DelayBody>
<ActivityAction x:TypeArguments="scg:Dictionary(x:String, x:Object)">
<Delay DisplayName="Short Delay" Duration="00:00:00.2500000" sap2010:WorkflowViewState.IdRef="Delay_1" />
</ActivityAction>
</ufa:FormActivity.DelayBody>
<ufa:FormActivity.FormFieldsCollection>
<scg:Dictionary x:TypeArguments="x:String, Argument" />
</ufa:FormActivity.FormFieldsCollection>
</ufa:FormActivity>
</Sequence>
</Activity>