Hooks - Kaholo

Hooks

Overview

In this article, you will learn about Hooks and how to configure its function.

What are Hooks used for?

A hook enables you to execute codes without any connection to the process. It can be configured to run before and/or after the process executes. These parameters can be defined in the Process Panel under the Hooks tab.

In order to execute a hook, the function code needs to be written in the Hooks menu. Alternatively, you can configure it in the Code environment.

To access the Hooks menu, follow the steps below:

1. Open the project and select the process that you want to access.
2. On the Right side of the screen, find and click the Hooks drop-down menu.

Configuring Hook Function

Pre-run function

The Pre-run function field allows you to configure the hook’s pre-run function which means that the hook function will be executed before the process executes.

1. Open the project and select the process that you want to access.
2. On the Right side of the screen, find and click the Hooks drop-down menu.

3. In the Pre-run function field, enter the code itself or call to a function in the code layer
4. Click the Save button to apply the changes.

Post-run function

The Post-run function field allows you to configure the hook’s post-run function which means that the hook function will be executed after the process executes.

1. Open the project and select the process that you want to access.
2. On the Right side of the screen, find and click the Hooks drop-down menu.

3. In the Post-run function field, enter the code itself or call to a function in the code layer.
4. Click the Save button to apply the changes.

Close Menu