Thanks, @Konrad_Mierzwa.
For all others, below is the code for the custom activity.
using System.Activities;
using System.ComponentModel;
using UiPath.Robot.Activities.Api;
namespace UiPath.Workflow.Information
{
[Category("Custom Activities.Workflow")]
[DisplayName("Get Workflow Path")]
public class GetWorkflowPath : CodeActivity
{
[Category("Output")]
public OutArgument<string> Output { get; set; }
protected override void Execute(CodeActivityContext context)
{
var executorRuntime = context.GetExtension<IExecutorRuntime>();
var jobInfo = executorRuntime.RunningJobInformation;
var WorkflowPath = jobInfo.WorkflowFilePath;
Output.Set(context, WorkflowPath);
}
}
}
Here’s the feed for the required UiPath.Activities.API package.
Best, Emerald.