05b. Invoke Method and Invoke Code in Studio - Invoke Static Method

Опубликовано: 09 Май 2026
на канале: Training Accelerators
23
0

In this demo on using the Invoke Method activity in UiPath Studio.

The workflow we built for this demo receives a set of values scraped from a website, parses them to integer, and then adds them up. Let’s take a closer look!

We’re starting with an Assign activity which instantiates and adds the values to a string array.

Next, we use a for each loop to parse each of the values and log the results.

Finally, we’re adding the results up. It is important to note that not all the values in our array can be converted to integer. We know that this might also happen in production.

If the data cannot be converted, the parse method throws an exception. This is why we’ll use the TryParse method instead. The TryParse method is currently entered in the value field of the Assign activity inside the For Each. After the Assign activity we will log the converted result and then the parsed result.