PJ Document

Hi everyone,
for the processes I used a workflow that created an html file (to create part of the documentation), called “PJ_Document” which, however, no longer works.
Can anyone help me find a good replacement?

Thanks to anyone who can help me

@simone.trenta,

What it means? any error or the dependency packages support ended?

Thanks,
Ashok :slight_smile:

tell us more about the details and requirements, so we can help to find replacement options.

Any sample / sharing the XAML code would be helpfully as well.

When it is about creating an html file we do have the options:

You are right :slight_smile:

Previously I used the following package PJDocument - RPA Component | UiPath Marketplace | Overview but updating now in the “Windows” versions it no longer works.
I would need to recreate something similar.I would need to recreate something similar.

The error reported is the following:

23.10.3+Branch.support-v23.10.Sha.ceeb2a4c480c2b7a4d12600ae5d39a26b6930830

Source: Invoke Code - set tree tag - invokeWorkflowFile

Message: No compiled code to run
error BC30002: Type 'System.Windows.forms.TreeNode' is not defined. At line 1
error BC30002: Type 'System.Windows.forms.TreeNode' is not defined. At line 2
error BC30002: Type 'System.Windows.forms.TreeNode' is not defined. At line 18
error BC30002: Type 'System.Windows.forms.TreeNode' is not defined. At line 25
error BC30002: Type 'System.Windows.forms.TreeNode' is not defined. At line 26
error BC30002: Type 'System.Windows.forms.TreeNode' is not defined. At line 35
error BC30002: Type 'System.Windows.forms.TreeNode' is not defined. At line 54
error BC30002: Type 'System.Windows.forms.TreeNode' is not defined. At line 55


Exception Type: System.ArgumentException

System.ArgumentException: No compiled code to run
error BC30002: Type 'System.Windows.forms.TreeNode' is not defined. At line 1
error BC30002: Type 'System.Windows.forms.TreeNode' is not defined. At line 2
error BC30002: Type 'System.Windows.forms.TreeNode' is not defined. At line 18
error BC30002: Type 'System.Windows.forms.TreeNode' is not defined. At line 25
error BC30002: Type 'System.Windows.forms.TreeNode' is not defined. At line 26
error BC30002: Type 'System.Windows.forms.TreeNode' is not defined. At line 35
error BC30002: Type 'System.Windows.forms.TreeNode' is not defined. At line 54
error BC30002: Type 'System.Windows.forms.TreeNode' is not defined. At line 55
   at UiPath.Activities.System.Utilities.InvokeCode.RoslynCompilerRunner.Compile(String code, Int32 errLineOffset, Boolean generateInMemory)
   at UiPath.Activities.System.Utilities.InvokeCode.CompilerRunner..ctor(String code, String className, String methodName, Int32 errLineOffset, Boolean generateInMemory)
   at UiPath.Activities.System.Utilities.InvokeCode.RoslynCompilerRunner..ctor(String code, String className, String methodName, Int32 errLineOffset, Boolean generateInMemory)
   at UiPath.Activities.System.Utilities.InvokeCode.VBCompilerRunner..ctor(String code, String className, String methodName, Int32 errLineOffset, Boolean generateInMemory)
   at UiPath.Activities.System.Utilities.InvokeCode.VBCodeInvoker.GetCompilerRunner(String code, String className, String methodName, Int32 errLineOffset, Boolean inMemory)
   at UiPath.Activities.System.Utilities.InvokeCode.NetCodeInvoker.GetCompilerRunner(String userCode, List`1 args, String imps, Boolean inMemory, Boolean allowCaching)
   at UiPath.Activities.System.Utilities.InvokeCode.NetCodeInvoker.Run(String userCode, List`1 inArgs, IEnumerable`1 imps, Object[] args)
   at UiPath.Core.Activities.InvokeCode.Execute(CodeActivityContext context)
   at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

The code that generated the error is present in an invoke code and is the following:

Dim GetChild As Action(Of System.Windows.forms.TreeNode, DataTable) = _
	Sub(in_node As System.Windows.forms.TreeNode, in_dt As DataTable)
		'dt_invokeWorkflowFile
 		'- filePath
 		'- workflowFileName
 		'- displayName
 		'- annotation
		Dim drows As Datarow() = dt.Select(String.Format("filePath = '{0}'", in_node.Text))
		Dim dict As New Dictionary(Of String, Integer)
		For Each drow As Datarow In drows
			Dim fileKey As String = drow("workflowFileName").ToString
			If Not(dict.ContainsKey(fileKey)) Then
				dict.Add(fileKey, 0)
			End If
			dict.Item(fileKey) = dict.Item(fileKey) + 1
		Next
		For Each kv As KeyValuePair(Of String, Integer) In dict
			Dim cNode As New System.Windows.forms.TreeNode(kv.Key)
			cNode.Name = kv.Value.ToString
			in_node.Nodes.Add(cNode)
			GetChild(cNode, in_dt)
		Next
	End Sub

Dim PrintNode As Action(Of System.Windows.forms.TreeNode, Integer, System.Text.StringBuilder) = _
	Sub(in_node As System.Windows.forms.TreeNode, in_level As Integer, in_stb As System.Text.StringBuilder)
		If in_level = 0 Then 	in_stb.AppendLine("<ul>")
		If in_node.Nodes.Count = 0 Then
			in_stb.AppendLine(String.Format("<li>{0}{1}</li>", in_node.Text, If(String.IsNullOrEmpty(in_node.Name) OrElse in_node.Name = "1", "", "  (invoked : " & in_node.Name & " )")))
		Else
			in_stb.AppendLine(String.Format("<li>{0}{1}", in_node.Text, If(String.IsNullOrEmpty(in_node.Name) OrElse in_node.Name = "1", "", "  (invoked :" & in_node.Name & " )")))
		End If
		If in_node.Nodes.Count > 0 Then
			in_stb.AppendLine("<ul>")
			For Each child As System.Windows.forms.TreeNode In in_node.Nodes
				If in_level <= 50 Then
					PrintNode(child, in_level + 1, in_stb)
				End If
			Next
			in_stb.AppendLine("</ul>")
		End If
		If in_node.Nodes.Count = 0 Then
		Else
			in_stb.AppendLine("</li>")
		End If
		If in_level = 0 Then 	in_stb.AppendLine("</ul>")
	End Sub

stb.AppendLine("<h3 class='title'>InvokeWorkflow Tree</h3>")
stb.AppendLine("<div class='tree'>")
If pjson.GetValue("main") Is Nothing Then
	stb.AppendLine("main file not found in project json")
Else
	Dim root As New System.Windows.forms.TreeNode("workflowTree")
	Dim entryPointsNode As New System.Windows.forms.TreeNode(pjson.GetValue("main").ToString)
	root.Nodes.Add(entryPointsNode)
	GetChild(entryPointsNode, dt)
	PrintNode(entryPointsNode, 0, stb)
	entryPointsNode = Nothing
	root = Nothing
End If
stb.AppendLine("</div>")```

When working on an approach of processing the XAML files for analytics / reports, we would suggest to setup it on

Here we can also collect the statistical / report data and render it into an HTML by using XML Stylesheets and transformations

Also have a look at the Workflow Analyzer Rules, as maybe a custom WFA rule can be used to collect the report data also

As an alternate and bound more close to the PJDocument XAML

  • contact the author and ask for the plans about conversion to Windows compatibility
  • convert the PJDocument XAML to Windows by your own

@simone.trenta,

First thing you should be connecting with the packaged developer and check if Windows support is in progress or not. I’m sure most developers have already released the Windows compatibility already or in progress.

If no visibility, then try for alternatives.

Thanks,
Ashok :slight_smile: