Hi All.
I’m about to create a validation robot that can perform a sanity check of Uipath Automation projects.
My current goal is to check Invokes in order to ensure that .xaml files are used if they are included in the project folders. But I’m getting stuck in finding any generic way of picking up All Invokes per file including attribute WorkflowFileName “Name”/“Value”
This is the syntax around how xaml file around Inwokeworkflowfile are structured.
<ui:InvokeWorkflowFile ContinueOnError=“{x:Null}” DisplayName=“Invoke GetTransactionData workflow” sap2010:WorkflowViewState.IdRef=“InvokeWorkflowFile_4” UnSafe=“False” WorkflowFileName=“calculate client security hash\ReFrameWork-master\Framework\GetTransactionData.xaml”>
ui:InvokeWorkflowFile.Arguments
<scg:Dictionary x:TypeArguments=“x:String, Argument” />
</ui:InvokeWorkflowFile.Arguments>
</ui:InvokeWorkflowFile>
My current approach is to pick it up using invoke Code activity and the following code can compile but I’m not getting any information out of it.
Dim doc As New XmlDocument
doc.Load(“C:.…\Uipath_REFrameWork_UiDemo\Main.xaml”)
Dim ReturnValue As New List(Of String)
Dim Arr As String()
Dim Str As String
Dim i As Integer = 0
For Each node As XmlNode In doc.SelectNodes(“//WorkflowFileName”)
ReturnValue.Add(node.attributes(“WorkflowFileName”).Value)
ReDim Preserve arr(i)
arr(i) = ReturnValue.ToString
Str = ReturnValue.ToString
console.WriteLine(str)
console.WriteLine(i)
i += 1
Next
Out_Argument = Arr
String_out = str
I’ve previosly also tried the decerielize approach and tried xpath expressions etc but that was not sucessfull due to the Ui. start of the element ui:InvokeWorkflowFile
Anyone who succesfully have automated around the xaml files and have something to share?
Best regards
/Viktor