1. What Does This Page Cover?
Learn how you can efficiently split your larger tasks into smaller batches and process them at off-peak hours using batch workflows.
Before you proceed to create a batch workflow, check
this page to understand about batch workflows.
2. Availability
Batch workflows feature
- Is available only for paid plans of Creator, with a limited number of batch blocks for each plan
- Can only be created, enabled, and managed by the super admin, admins, and developers, while other users can benefit from the automated execution of repetitive tasks
- Is available in all data centers
3. Setting Up Batch Workflows
3.1 Batch Workflow Creation Flow
3.3 Steps to Create a Batch Workflow
3.3.1 Prerequisites
- You must have a form in your application based on which you can configure a batch workflow.
- You need to decide when to trigger the batch workflow and an idea of the number of records i.e each batch's size.
Step 1: Create Batch Workflow
1. Navigate to the
Solutions module and open the required application.
2. Click the Workflow button at the top to navigate to the workflow dashboard.
3. Select Batch Workflows and follow either of the below steps as applicable.
- If you're creating a batch workflow for the first time, click Create Batch Workflow at the centre.
- If you've already created batch workflows, click New Batch Workflow at the top-right.
4. Choose the required Form and when to trigger the workflow - On Import or On Schedule.
- On Import: If this option is selected, the batch workflow that you've configured will be executed after successful import of your records.
- On Schedule: If this option is selected, the batch workflow that you've configured will be executed at the specified date and time.
5. If you've chosen the On Schedule option, follow the below steps. Else, switch to step 6.
Note: If the date frequency you've set doesn't apply to the subsequent month(s), the respective batch workflow's execution will be skipped for that month. Lets assume you've configured the workflow to run on the 31st of every month, then the workflow will be skipped for the months that have less then 31 days.
- Choose the required date and time during which you want the batch workflow to be executed
- Choose the frequency of the schedule.
6. Enter a name for your batch workflow and define when to Run this workflow.
- Always is selected by default
- Select on condition, then set the required criteria
7. Click Create Batch Process. You'll be taken to the workflow builder.
1. Click Add New Action to add an action to be executed for every record in a batch block.
2. Enter the required script and click Save.
You can find the sample script attachment at the end of this page.
3. Hover over the Deluge script preview to Manage the script if required. You can click the delete icon to delete the added script.
It is not recommended to edit or delete the script when the batch workflow execution is in progress, since the current and upcoming batch blocks' execution may fail due to alteration of the existing script.
The below screen shows the workflow builder after entering details in the previous step.
Note: The Before Execution block is optional based on your requirements. However, you must configure the script to be executed in the During Execution block.
1. Expand the Variables section in the Before Batch Execution section.
2. Click Manage Variables. The Variables pane will slide in from the right.
3. Click Add Variable.
4. In the popup that appears, select the Data Type and enter the Variable Name, then click Add. The variable will be added to the Variables section.
5. Click +Add Variable to add another variable. Variables can be deleted using the delete icon.
6. Hover over the Variables section to Manage the variables if required. The Variables pane will slide in from the right.
You can edit the variable names or add and delete variables as required.
Note: You cannot modify the data type of existing variables.
7. Next, expand the Initialization section and click Add New Initialization.
8. Enter the required script to be executed before the execution of batch workflow starts.
You can also use the variables added in the previous script.
- input.total_amount = 0;
- input.minimum_amount = 0;
9. To edit the script, hover over the Deluge script preview and click the edit icon. You can click the delete icon to delete the added script.
This section enables you to configure actions for both success and failure scenarios.
Note: The After Execution block is optional based on your requirements. However, you must configure the script to be executed in the During Execution block.
1. Expand the Success section and click Add New Success Script.
2. Enter the required script in the Deluge editor and click Save.
3. Similarly, add a script to be executed upon failure of batch workflow's execution by clicking Add New Failure Script.
4. Click Done at the top-right of the workflow builder. You can view the batch workflow you've created listed in the Batch Workflows tab.
4. Manage Batch Workflows
- You can enable/disable a batch workflow by toggling the button beside the workflow name as required.
- You can navigate to edit a section in the workflow builder by clicking the respective section listed in the Batch Processing Events pane.
5. Things to Know
- You can configure batch workflows in the following cases — after successful import of your application's records or at a specified time.
- You can create multiple batch workflows based on the same form with different or identical conditions.
- All the batches in a batch block will be executed sequentially.
- You can track the status of batch workflow executions through the application logs section. It provides visibility into the queue status, in-progress executions, and completion status (success or failure).
- You can view error logs for the first 5 batch block failures, providing insight into the reasons for execution failures.
- If one or more batches in a block fail, that particular batch alone will be reverted, and the batch workflow will still continue executing other batches. You can view the that block's failure message in logs.
- You can execute batch workflows for batches in sizes of 10, 50, 100, 200, 500, and 1000 records.
- You can create up to 100 batch workflows at a time in your account.
- You can execute up to a certain number of batch block executions per account in a day based on your pricing plan.
- The execution timeout for each batch is set to 1 minute i.e., if a batch block's size is configured as 1000, then the timeout for the execution of those 1000 records will be 1 minute.
- Similarly, the timeout for before and after execution batch blocks is 30 seconds each.
6. Limitations
- Understand workflows
- Understand batch workflows