Warning!
This is a legacy document. The features described below are only usable within the classic-generation environment.
Currently, Betty Blocks offers faster and more advanced options that are available in next-gen. Before you start working on some new features in your application, consider doing it using the next-gen version. Good luck!
After reading this article you will know:
The purpose of a callback action
How to configure a callback action
What are callback actions
You can choose to trigger an action after another action is finished by using callback. This allows you to execute an action whenever all background jobs of another action are done. This does not include background jobs of other triggered actions by the original action. This is mostly used for processing imported records from an import event. Learn more about assigning imported records in this article: Assigning imported records
Background jobs
Background jobs have a maximum run/calculation time of 4 hours, if the job isn't finished within that time. The job will be executed and the action will be considered as failed.
Make sure your action is finished before that time by making the flow and steps as efficient as possible.
The calculation time for Background jobs will be reduced to a maximum of 1 hour in the future. Be prepared for this change and adapt in time!
Using callback
You can check Enable callback action to open the callback settings. You will find the options:
Action: Select the action you want to execute as callback.
Assign: Assign values the selected action uses for its input variables.
Execute this action in foreground: Set the callback action to run in the foreground if it is currently set to background.
Go to your Actions by clicking on the Actions icon in the Builder Bar.
Choose an action and open the settings, or create a new action.
Click on the Edit button in the top right corner.
Scroll down and check the Enable callback action checkbox, this will show additional input fields.
Choose the action that you want to execute as callback action within the Action dropdown.
Assign values to variables of the callback action if you want to forward and process values from the initial action.
Optionally, you can choose to enable the Execute all action in foreground checkbox, which sets the callback action to run in the foreground if this is set to background.
When you're done with setting up the action you can click the Save button in the top right corner to save it.
Disclaimer
Be careful for:
Using callback on batch actions. A batch action is not seen as a single action, this will trigger the callback for each record.
Using callback on itself, which could lead to an infinite loop.