We will learn step by step tutorial for “UiPath Invoke Method”. The Invoke Method activity calls a public method of the specified object or type. Invoke Method acts on either a Target Type OR a Target Object. These parameters are mutually exclusive, so if you try to enter a value for both the Target Type and the Target Object, UiPath will display an error on the Invoke Method activity.
The InvokeMethod activity is another way to implement a code that is outside of the standard built-in activities. You can use this activity to invoke a method of a class. The class does not need to be part of the workflow or use any of the workflow base classes. The Invoke Method calls a public method of a specified object or type.
Step 1: First we create a simple class library in .net and call this DLL in UiPath using the NuGet package manager.
Download Nuget Package Explorer for putting above DLL and import in uipath studio
Step2: create the DLL of the above program and import in uipath studio. after that open, the uipath studio and call Invoke method activities.
Step3: Now install NuGet packages into your UiPath Studio and call the library classes in uipath.
Step4: Drag and drop the activities “invoke the method” and choose the class library class. now return will be displayed in the message box.
I hope you liked this article about Uipath Invoke Method. I would like to have feedback from my blog readers. Your valuable feedback, question, or comments about this article are always welcome.