Cannot get JobID by custom activity after update from 2018.1.4 to 2018.3.2

Hi everyone,

I have a custom activity where I get JobId and Application name. It worked in version 2018.1.4. But after update to 2018.3.2, an error has been throw when I run robot:

Source: Activity class

Message: Could not load type ‘UiPath.Executor.ExecutorManager’ from assembly ‘UiPath.Executor, Version=18.3.2.0, Culture=neutral, PublicKeyToken=null’.

Exception Type: System.TypeLoadException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.TypeLoadException: Could not load type ‘UiPath.Executor.ExecutorManager’ from assembly ‘UiPath.Executor, Version=18.3.2.0, Culture=neutral, PublicKeyToken=null’.
at CustomActivityUiPath.ActivityClass.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Please help me!

Hi @khangnv1112

Could you make sure that all required packages are installed/repaired for the project?
It looks like some dependencies might be missing.

If not, I would advise you to contact our support here for more information.

Hi @loginerror

I added UiPath.Executor.dll into my custom activity. But after update to version 2018.2.3, UiPath.Executor.dll was removed. So I can’t get current jobID with mehthod:
UiPath.Executor.ExecutorManager.Instance.Id

Can I know where did you find UiPath.Executor.dll ?

Hi,

I’ve recently had this same issue, and from what I could gather, it seems they turned the .dll into a .exe.

I found another way to get the JobId of a Running process, by using the Orchestrator API. This solution relies on the bot having access to reading Jobs info in Orchestrator, so if somehow this is not possible, this solution won’t work.

It basically uses an http GET request to get all the Jobs that are Running on the specific machine the bot is running. Then, the ‘key’ value that comes in the JSON response is the JobId of that process.

Here is the GetJobId.xaml (8.6 KB). To deserialize the JSON response, I used the ‘UiPath.WebApi.Activities’ Dependency. So the Missing Activity that might show you comes from that Package.

If you want, you can check all these other handy requests. And if you want to know how to use query parameters in those requests, uiPath follows OData’s URL Conventions. You will find everything you need to make your queries there.

I hope this will be useful. Cheers!

EDITS: Typos :slightly_smiling_face: