Programmatic checks and task validation
Using programmatic checks in your project, you can catch specified errors and ensure they are fixed before task submission.
All currently available checks are so-called task validation checks. They locate potential mistakes in the annotation task and run whenever a team member clicks "validate" in a task. These checks either warn the team members or block them from submitting the task while the check conditions are met.

There are two kinds of task validation checks - custom and template. The main difference between them is their level of flexibility. Kognic creates the template checks, and you can browse them and activate those you think could be helpful in your project. Custom checks are fully defined by you using the available parameters.
ππ» The chapter Validate taskο»Ώ provides more information about the experience of validating a task while working on it.
The possibility of configuring programmatic checks is only available to a limited number of organizations. If you want us to enable this for your organization, contact Kognic.
Programmatic checks are configured on a project level. When activated, they are part of the task validation in all of the project's tasks.
Current limitations:
- You can only configure programmatic checks in projects that contain one or multiple requests and where all requests use the same Annotation Instruction/Taxonomy. If you want to add checks in projects that don't fulfill this requirement, you must add them inside the Annotation Instruction/Taxonomy.
- If programmatic checks are configured on the project level, these will take precedence, and any checks written into the Annotation Instruction/Taxonomy will be ignored.
Custom checks are a type of task validation check. They locate potential mistakes in the annotation task and run whenever a team member clicks "validate" in one of this project's tasks.
Custom checks differ from template checks in their flexibility. Kognic broadly defines template checks, while you fully define custom checks.
You find all currently created custom checks and add new ones inside Project Settings and the tab Programmatic Checks.

To add and activate a new check you go through the following steps:
- Click the "Add custom check"-button in either the top right corner of the custom checks list or, if no custom checks exist, in the center of the empty custom checks list.
- Select from the available parameters and operators to define the check's conditions. You can select parameters of the type Property or Geometry.
- (Optional) Add additional AND or OR conditions if needed.
- Give your check a name and a description. This will help you and others recognize and understand its function.
- Select what should happen if the check conditions are met during task validation. The check can either trigger a warning or an error. A warning doesn't block task submission, while errors do.
- Write a validation message that should be displayed to the team member performing the task. Make sure it is informative and instructive.
- Click "Add check" and the check is added to the project but in an inactive state.
- Locate your new check in the "Custom check" list and click activate.
- Save your updated project settings.
- You have created and activated a new check! π
You can preview custom checks while creating or editing them.
- Locate and click the button called "Test check in task view" (see GIF below). This opens a view link in which the check is activated.
- Create a situation that meets the check's conditions.
- Validate the task by clicking "Test custom check."
- If the check was correctly configured and you successfully created a situation that meets its conditions, a warning or error message should be displayed.

There are two ways to ensure a custom check isn't used in the project's tasks: deactivating or deleting it. If you deactivate the check, it remains available but is currently not used for task validation. If you delete the check, it is removed from the project permanently.
Template checks are a type of task validation check. They locate potential mistakes in the annotation task and run whenever a team member clicks "validate" in one of this project's tasks.
Kognic creates and maintains the template checks, but you decide which to use in your project and how to configure them.
You find all available template checks inside Project Settings and the tab Programmatic Checks.

If you find a template check which seems suitable for the error you want to prevent you can customize and activate it by completing the following steps:
- When you have located a template check you want to use, click "Activate and configure".
- A dialog opens in which you can configure the check to your needs. You do this by editing the check configuration JSON.
- When you feel happy with your configuration, click "Activate check."
- Save your updated project settings.
- You have created and activated a new check! π
You can turn off the template check by deactivating it. This means it is no longer used for task validation in the project.
ο»Ώ