Get Process Info

by Internal Labs

1

81

Get Process Info

by Internal Labs

1

Custom Activity

81

carouselImage0

Summary

Summary


Overview

Overview

This custom activity exposes information about the running job to the workflow.

You can get JobId, ProcessName, WorkflowFile and ProcessVersion at runtime.

This internal information is very useful for instance if you need your process to know its name at runtime, but you don't want to hardcode the process name in your workflow. This activity will gather that information dynamically.

Another interesting use of this activity is in determining how the automation is being triggered from within a library.
  • A process triggered from Assistant or from the Orchestrator (Unattended) will have a Environment. CurrentDirectory in %userprofile%\.nuget\packages. A process triggered from Studio/StudioX will have a CurrentDirectory somewhere else.
  • Whenever you are within in a library, the Environment.CurrentDirectory is the folder of the library. There is no way to know the location from which the process is running.
  • This custom activity's WorkflowFile will always point to the calling Process's workflow (not the Library's), hence giving away the source of the calling process .

Features

Features

You will not need to hardcode any values. All of this information is extracted at runtime.

This can be used, for instance, to store the process name in a QueueItem that is shared across multiple processes.

See more examples above.

Additional Information

Additional Information

Dependencies


Code Language

Visual Basic

Runtime

Windows Legacy (.Net Framework 4.6.1)

Publisher

Internal Labs

Visit Publisher's Page

License & Privacy

License Agreement

Privacy Terms

Technical

Version

1.0.0

Updated

29 Sep 2021

Certification

Silver Certified

Tags

JobId

Application

UiPath Studio

Support

UiPath Community Support