Introduction
Last updated 26/03/2024
What is a Process?
Processes enable you to perform multiple tasks either related or not related to the database. A function needs to be attached to the process to perform the particular task. Functions can be attached to the On Run or the Do Run events or to an action button. The function will execute when the event is interacted with, such as clicking the Run button or an action button on the process.
A process with a menu item will be presented like a form, unlike a form, a data source is not required. Processes can be used for many tasks such as:
- Sending emails
- Inserting data into tables
- Performing calculations
- Displaying messages in the UI
- Searching data
The image below is a process called Send Message. This process uses the values in the Name, Email, and Message fields and sends an email with the message provided when the Send button is clicked. For documentation on how the Send Message process works with an action button, you can refer to the Action Buttons chapter under Events.

The image below is a dashboard that holds the Find Book process. This process is used to enter values in the Title and ISBN fields to find books. Once the Search button is clicked, the results will display in the data view under the process.

Understanding How to Create Processes
The logical process to creating a process is to:
- Create a function
- Give your process a title
- Attach your function to a Run event
- Add your screen fields
- After you have saved the process, you can edit the record to add extra definitions and functionality
General Navigation
The Process form has several tabs across the top and each page displays different elements. Initially, you will be positioned on the General page where you can give your process a title. Clicking each tab will take you to the respective page.

On the Events page there are several event fields and you can select a function to execute. The On Run event will run your process in the frontend and the Do Run event will run your process in the backend. When using both the On Run and Do Run events on a process, the On Run will execute first when the Run button on the process is clicked and on successful completion the Do Run event will be called. A function attached to the Do Run event can be executed either by:
- Clicking the Run button
- Via a job
- Via Five's executeAction()function

The Action Buttons page enables you to add buttons to your process and when clicked your function will be executed. Action button events can be chained together.

The Screen Fields page enables you to add fields that can be used as arguments for your process.

The References page is where you can see what other elements in Five are referencing your process.

Run a Process in the Background
By default, processes run in the foreground, however, you can select to run your process in the background. For processes that take extensive time to run, it is recommended that you run them in the background and check the progression through the Notifications bell in your application, as you will be notified when it has finished. To run a process in the background, click the Background switch.

Notification Only for Failed Processes
By default, Five will deliver a notification to the Notifications bell in your application on success or failure on the running of your process. You can opt to only have failed notifications delivered to the Notifications bell by clicking the Notify Only On Fail switch.

Allow Processes to Run Concurrently
By default, a process needs to finish running before the same process can run again. By clicking the Allow Concurrent switch, the process can run concurrently with itself multiple times.
