C#

The C# action An instruction within a botflow. runs C# code in a botflow Automated steps that you can design for each bot that will run.. You must be familiar with Microsoft's C# programming language to supply the C# code necessary to add a C# action to a botflow.

The C# action is useful for creating an action not supplied with Nintex RPA LE.

Explore the items listed below to learn more about the basics of adding a C# action to a botflow, and how to use the different methods and functions available in the C# action:

Add a C# action to a botflow

To add a C# action to a botflow:

  1. Start Nintex RPA LE. You can do this from the Start Menu under Nintex or from the Nintex RPA LE shortcut on the Desktop.
  2. On the Actions list (located under the Selection Tool ), click Advanced and then click C# from the Programming list. The Action Builder window for C# displays.
  3. Set the C# Action Options/Settings.
    • Method: Select a Method from the drop-down list:
      • Code: Select Code from the drop-down list to display the Code field.
      • File: Select File from the drop-down list to display the File field.
    • Timeout: Set the number of seconds in the Timeout field to stop the C# code should it enter an infinite loop and fail to end.
    • Code: The Code field displays when you select Code as the Method. Type your C# code into the Code field to compile and run your C# code as part of the C# action. Or use the Expression Builder () to build the action settings using variables or other token values. The C# code is compiled as a temporary .exe file, executed, and then deleted when the botflow run completes.
    • File: The File field displays when you select File as the Method. Type the file location into the File field, use the Folder () to select the file location, or use the Expression Builder () to build the action settings using variables or other token values. The File method works better when you have a large amount of code to execute.
    • Save to: It is recommended that you save the C# action results to a Variable. Select the Save to check box to activate the Save to field. Type the variable name in the Save to field, select the variable from the drop-down list, or use the Expression Builder () to build the action settings using variables or other token values. Nintex RPA LE supports C# statement outputs of "Console.WriteLine" or "Console.Write".

  4. If needed, adjust the Run Switch to add the action without running it.
  5. Optionally, add an action Note.
  6. Click OK to add the C# action to the botflow.