Configure Bot Sources
Bot Sources in BEP execution mode
In the diagram below, you can see Bot Sources within the execution framework.

The interaction with BEP components occurs on three levels, involving Control Tower, Task Dispatcher Service, and Bot Workers.
- Control Tower is a place to configure Bot Sources. On the Control Tower side, a specific Bot Source marker allows to task messages and channels of Business Process (BP) steps using constraints.
- Task Dispatcher Service checks the available Bot Source capacity and priority settings (if any) in task metadata. From the Task Dispatcher Service, tasks go to the Bot Worker queue according to the Bot Source limitations from ZooKeeper.
- A Bot Worker rechecks the task node status if it is a task with a Bot Task configuration. In case the check fails, the failure result for this task is sent to Control Tower, and an exception occurs.
Configuration
Via Control Tower, you can create or edit Bot Source configurations. The capability gives you full control over the Bot Task concurrency settings as well as over the execution flow and access to resources. The best practice is to set a specific Bot Source for each Bot Task within a BP.
To configure Bot Sources, go to System Settings > Bot Sources.

note
Mind that you should link each Bot Source to a Bot Config.
Add Bot Source
To create a new Bot Source, follow the instruction below:
Go to System Settings > Bot Sources, click Create.

In the displayed popup, enter information about the Bot Source:
- Name is the Bot Source name and a required value to fill in.
- Description refers to a general Bot Source description and can be up to 1,000 characters long. Both Name and Description simplify further bot source lookup and usage.

Specify Concurrency Settings. The settings are crucial for optimal process performance. They allow you to limit the number of threads accessing the data source. The feature is useful if the data source allows a certain number of requests from one server.
To set up the feature, specify the following values:
- In the Thread Count field, set how many Bot Tasks are to be executed in parallel across the same Bot Source. By default, Bot Source has five threads.
caution
Remove the default value from the thread count if you do not need to limit the concurrent task execution. Use the Thread count functionality with caution.
Mind that limiting the thread count decreases performance for bot steps working with a Bot Source and leads to significant system overhead.
- In the Fleet drop-down box, select a fleet. If the Thread Count value is missing, set the fleet for the Bot Source so that you can use it. For more information about fleets, read the Work with fleets topic.
If needed, select the Finish Earlier Started Runs First checkbox to prioritize those runs that were started earlier.
In the Bot Sources list, prioritized Bot Sources have the True setting in the Prioritize earlier runs column:

Priority works within one Bot Source. For example, if you have two BPs where a prioritized Bot Source is configured for a specific step, tasks for an earlier started step are to be finished first, whereas tasks from other steps will wait.
note
Dynamic reconfiguration of the Bot Source priority setting is supported. However, it can cause a delay in task forwarding for the Bot Source after you apply the change.
Click Save. The success message confirms that the Bot Source is created.

All created Bot Sources are available in System Settings > Bot Sources, where you can either edit or delete them.
Edit Bot Source
To edit a Bot Source, follow the instruction below:
Go to System Settings > Bot Sources and click the Bot Source you need to edit. The Edit Bot Source dialog appears on the screen.

Make all required changes and click Save.
caution
Due to synchronization issues, when you update a Bot Source setting, depending on the previous value, task processing settings can differ from the updated values for some time.
Delete Bot Source
To delete a Bot Source, follow the instruction below:
- Go to System Settings > Bot Sources and select the Bot Source you want to delete.

- Click Delete.
- In the screen that follows, click Delete to confirm the deletion.

warning
You cannot remove a Bot Source if it is used at least in one Bot Config even when a BP with that Bot Config is completed or deleted. In this case, to complete the deletion, unbind the Bot Source from each Bot Config where it is used and retry the operation.
Apply Bot Source to Business Process
As soon as Bot Sources are created and tuned, the best practice is to set a specific Bot Source for each Bot Task within a BP:
Go to Business Processes and select a BP where you want to add a Bot Source.
Navigate to the Workflow tab of the selected BP and double-click the Bot Task you want to link to the Bot Source.
On the Design tab within the Create Bot Configuration options, find the Bot Source drop-down box and select a Bot Source.
As soon as you select the Bot Source, proceed to its settings by clicking Edit.
