I’m writing a custom activity where I want to access things like JobId and Release Key. Is it possible to access JobId, ReleaseKey in Visual Studio? Or can I access them in the workflow and pass them as an InArgument to the custom activity?
I found a solution for the jobId:
When use add UiPath.Executor.dll as a reference you can access UiPath.Executor.ExecutorManager.Instance.Id which includes the current JobId
sorry for the long delay. I had to add the reference manually via the “Browse…”-Button. It was located at C:\Program Files (x86)\UiPath Platform\UiPath.Executor.dll. But it could be possible that it’s only available when installing the UiPath Platform (as I did) and not in the community edition.
You don’t need to include the .dll in your Package as it will be present when executing the robot.
Edit: In Community it should be at AppData\Local\UiPath\app-<appversion>\UiPath.Executor.dll
Where exactly is the “Browse” button? I see the .dll file in file explorer, but I’m still not sure how to access it in studio?
I’d like to be able to access the ‘processName’ that is referenced in the standard uipath logs. For certain processes in the future I’d also like to be able to access the ‘jobid’ as well. I’m a little surprised this isn’t accessible in Studio natively since it’s already built in to the logs
In your project you open the “Add Reference…” dialog. There you can find the “Browse…” button. When UiPath.Executor.dll is added as a reference you can Access UiPath.Executor.ExecutorManager.Instance.Id.
You won’t find it in UiPath Studio. It’s only available in Visual Studio, when developing custom activities.
When a custom activity is not an option for you, you can use the Invoke Code Activity as @navulurin mentioned above.
It’s ok in 2018.1.1 version. but is does not work in 2018.2.3 version.
You can findthat it changed from a dll file to exe.(UiPath.Executor.exe)
Has any solution?
This works perfectly fine when robo is executed form UiPath studio.
But when job is triggered from orchestrator it created different jobID compared to orchestrator jobID.
Any idea how to have same jobID as shown in orchestrator ?