Global Variable Data Store is not created because of inconsistent database configuration exception
warning
Getting an alert caused the Global Variable Data Store not created because of inconsistent database configuration, try updating global.variables.default.data.store.name in the application.properties file.
The Global Variable Data Store used to store variables shared across different BP properties does not exist and could not be created.
Description
When the issue occurs, the Global Variable Data Store on a Control Tower instance is not available in Campaigns > Data Stores. If one tries to create it either from a CSV or using the manual schema, WorkFusion fails with an exception saying that the PostgreSQL relation (table) already exists.
Solution
Delete PostgreSQL tables using SQL:
Drop the existing PostgreSQL tables (relations):
- ds_Global_Variables
- ds_Global_Variables_archive
Delete all existing parameters in the MySQL database:
delete from CampaignConfigurationParameterDelete the Global Variable references from MySQL if any exist:
delete from DataStoreColumn where dataStoreId = (select id from DataStore where name = 'Global Variables'); delete from CampaignConfigurationDataStore where dataStoreId= (select id from DataStore where name ='Global Variables'); delete from CampaignConfigurationParameter where dataStoreId= (select id from DataStore where name ='Global Variables'); delete from DataStore where name = 'Global Variables';Restart Tomcat:
sudo tomcat service restart
Create a Global Variable Data Store manually and edit it to add required values. Note that all global variables used in a bot are automatically created when the bot's Business Process (BP) is saved.
Bot to verify if Global Variable exists
Create a BP with a single bot. Once you save the BP, look at the Global Variable Data Store. It should have two new columns:
- ocr_results_s3_bucket
- ocr_results_s3_path
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://web-harvest.sourceforge.net/schema/1.0/config" scriptlang="groovy">
<var-def name="ocr_results_s3_bucket">
<var-global name="training_ocr_s3_bucket"/>
</var-def>
<var-def name="ocr_results_s3_path">
<var-global name="training_ocr_s3_path"/>
</var-def>
<export include-original-data="true">
<single-column name="ocr_results_s3_bucket" value="${ocr_results_s3_bucket}" />
<single-column name="ocr_results_s3_path" value="${ocr_results_s3_path}" />
</export>
</config>