We attempted to use the bulk import functionality, because currently we work with the insert operator - but this is very slow
for 744 insert over 7 minutes.
The bulk import method generates error code=3 during execution and the c2o log shows:
[com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Could not commit transaction.
Release: 4.3.5+
Components: CA Process Automation Base
The root cause of the issue related to the syntax of the command used for the bulk import. The JSON script format should begin with a single quote for string value and with another single quote, as demonstrated in the resolution section below.
The requirement to verify that single quotes encapsulate any string values, must be met.
Incorrectly formatted JSON's string values:
Process.hp_asset.length= Process.hp_asset.length + Process[OpName].response.devices.length;
for (i=0; i<Process[OpName].response.devices.length; i++)
{
Process.hp_asset[Process.hp_asset_count].productNumber = Process[OpName].response.devices[i].productNumber;
Process.hp_asset[Process.hp_asset_count].serialNumber = Process[OpName].response.devices[i].serialNumber;
Process.hp_asset_count++;
}
Correct encapsulation of the string value mapping in JSON:
Process[OpName].response = convertJson(Process.Read_from_File.DatasetVariable[0]);
Process.hp_asset.length= Process.hp_asset.length + Process[OpName].response.devices.length;
for (i=0; i<Process[OpName].response.devices.length; i++)
{
Process.hp_asset[Process.hp_asset_count].productNumber = "'"+Process[OpName].response.devices[i].productNumber+"'";
Process.hp_asset[Process.hp_asset_count].serialNumber = "'"+Process[OpName].response.devices[i].serialNumber+"'";
Process.hp_asset_count++;
}