What are Hooks used for?
A hook is a place where you can execute code without any connection to the process. The hook 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 text field inside the Hooks tab. Alternatively, it can be configured in the Code environment.
Configuring a Hook function:
In order to configure a hook before the process executes, enter the function into the “Pre-run function” text field in the Process Panel.
Additionally, you can configure the hook to run after the process in the “Post-run function” text field, or both prior and post process by entering it into both text fields.