Hello,
I am trying to use the command separator of the mysql database connector, but I couldn’t figure out how to structure the query. Right now, I’m using the script editor with Groovy interpreter, as follows:
return
"delete from TABLE1 where PERSISTENCEID = " + persistenceIdTbl1 + ";" +
"delete from TABLE2 where PERSISTENCEID IN (" + persistenceIdTbl2.join(",") + ");" +
"delete from TABLE3 where PERSISTENCEID = " + persistenceIdTbl3 + ";" +
"delete from TABLE4 where PERSISTENCEID IN (" + persistenceIdTbl4.join(",") + ");" +
"delete from TABLE5 where PERSISTENCEID = " + persistenceIdTbl5 + ";";
Description:
-
This script is done inside a human task’s Connectors Out
-
TABLE1 - TABLE5 exist in the same database, defined at the connector’s configuration (Driver, URL, username, password).
-
persistenceIdTbl1, 3, and 5 are of type integer, defined in the contract and will be returned through the form.
-
persistenceIdTbl2 and 4 are of type list integer (multiple column is checked in the contract)
I am using ; (semicolon) as the command separator. I am sure this code works separately as I’ve tried to create separate connectors with the exact same order of execution. Although, upon executing this string of code, I keep on running into an error saying “Script is not set”.
Any help will be very much appreciated. Thank you.