Search

Function

Articles

Function node is used to execute pre-defined and user-defined functions in a task.

In a Document Processing HyperApp, all the Invoices in a folder must be processed to extract the required data and the processed Invoices must be moved to another folder so that the same file is not processed again.
The overall process can be divided into the following activities:

  1. File Explorer node to fetch details of all the files in a folder.
  2. Data Table node to pass details of the files row-by-row.
  3. Task node to trigger a Document Processing task.
  4. Function node to execute the Move File function.
Image description

Design the Action steps for Function Node

In Actions tab, you can define actions to be performed in Function Node.

Click the Function node to open the attributes pane. In the Actions tab, select one of the following options from the first drop-down:

  • Set Variable: To set value for a Variable as needed in further steps. The value set can either be a constant or another variable.
  • Call Function: To choose from the Functions.

To know more about how to use Functions and about the options in Actions tab, visit the following links.

Image description

Variables

All Input/Local variables of the Function node are displayed under the Variables tab.

Table Definition

All Default/Custom DataTables in the task are displayed under the Table Definitions tab.

Properties of Function Node

  1. Navigate to Properties and enter Name and Description.
  2. Enable Mark run Failure on Node Fail and Continue on Failure options as required.
  3. Enable Run On Server option if you would like to execute the Function node on the server.

If the function requires any files/folders on the local machine, it must run on bot.

Image description

Functions

All User-Defined/Predefined Functions created for the HyperApp are displayed.

Result of Execution in Function node

After executing the task, the Result of Execution window displays the following tabs:

  • Input: The input variables that are mapped to the node are displayed.
  • Output: Execution status of the node is displayed.
  • Run Info: The Run Details and Machine Details are displayed.
    • Run Details include Run ID, Sequence Number, Iteration, and Total Node Execution Time (in seconds). 
    • Machine Details include ID, Name, Host, Port, Iteration Start Time, Iteration End Time, Iteration Time (in seconds).
  • Step Data: The details of the steps designed inside the node, the status of each step, and the values stored in the variables are displayed.
  • Formatted Output: The output is displayed in the table format.

If the Function node is executing on server, Machine Details are not displayed.

Image description

Did you find what you were looking for?