{"id":496,"date":"2024-02-20T13:28:27","date_gmt":"2024-02-20T13:28:27","guid":{"rendered":"https:\/\/thegreenbrain.com.au\/blog\/?p=496"},"modified":"2024-02-20T13:47:28","modified_gmt":"2024-02-20T13:47:28","slug":"invoke-method","status":"publish","type":"post","link":"https:\/\/thegreenbrain.com.au\/blog\/invoke-method\/","title":{"rendered":"How to use Invoke Method in UiPath"},"content":{"rendered":"\n<p>The InvokeMethod activity is another way to implement a code which is outside of the standard built-in&nbsp;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 InvokeMethod calls a public method of a specified object or type.<\/p>\n\n\n\n<p><strong>InvokeMethod Properties<\/strong>:<\/p>\n\n\n\n<p><strong>MethodName:<\/strong>\u00a0Assign the method name to this property.<br><strong>TargetObject:<\/strong>\u00a0When we want to invoke non-static methods, we need first to create an object that contains the method to execute.<br><strong>TargetType:<\/strong>\u00a0When we want to invoke static methods, we specify the type that contains the static method to execute. If the class is non static then keep the Target type as null.<br><strong>GenericTypeArguments:<\/strong>\u00a0When we want to invoke a generic method, we specify generic types in this collection.<br><strong>Parameters<\/strong>: The parameter collection of the method to be invoked.<br><strong>Result:<\/strong>\u00a0The return value of the method execution.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The InvokeMethod activity is another way to implement a code which is outside of the standard built-in&nbsp;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 InvokeMethod calls a public method of&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-496","post","type-post","status-publish","format-standard","hentry","category-uipath"],"_links":{"self":[{"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/posts\/496","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/comments?post=496"}],"version-history":[{"count":2,"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/posts\/496\/revisions"}],"predecessor-version":[{"id":499,"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/posts\/496\/revisions\/499"}],"wp:attachment":[{"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/media?parent=496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/categories?post=496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thegreenbrain.com.au\/blog\/wp-json\/wp\/v2\/tags?post=496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}