Access UiPath Properties (JobId, Release) from a Custom Activity

activities
custom_activities

#1

Hello,

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?

Regards
Samuel


#2

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


#3

How to get UiPath.Executor.dll for UiPath.Executor.ExecutorManager.Instance.Id. I don’t see this in Import section as well.


#4

@Priyam,Is this resolved?got same issue.


#5

@navulurin … not resolved yet


#6

Hello,

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


#7

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


#8

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.


#9

@Dave,
With out adding dll,Can you try with Invoke Code activity by placing below code following code

UiPath.Executor.ExecutorManager.Instance.Id.ToString()


#10

This worked great to get the GUID, thank you!

Is there a list of all methods available in UiPath.Executor.ExecutorManager.Instance

I tried processname, name, and process, but got nothing.


#12

Where in UiPath Studio can i find this “Reference Manager” dialog?
Either im blind or its not there.

I also need to access “JobId” and other properties.

//PierreD


#13

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.