I did realize the tag provider BladesideHT should be BladesideSR. This eliminated that error message.
Now code is
number_of_lots = system.tag.read('[BladesideSR]BS/FurnaceBT{}/Recipe/Control/lot_number_index'.format(self.view.params.BrassTagNum)).value
for i in range(0, number_of_lots):
tags = []
for tag in ['lot_number', 'part_number', 'heat_code', 'number_of_parts']:
tags.append('[BladesideSR]BS/FurnaceBT{}/Recipe/Lots/{}[{}]'.format(self.view.params.BrassTagNum, tag, i))
values = [tag.value for tag in system.tag.readAll(tags)]
call = system.db.createSProcCall("ga_cfb_dw_proc.CFB_BF_CREATE_LOT_RECORD","DB")
call.registerInParam(1,system.db.VARCHAR,values[0])
call.registerInParam(2,system.db.VARCHAR,values[1])
call.registerInParam(3,system.db.VARCHAR,values[2])
call.registerInParam(4,system.db.INTEGER,values[3])
call.registerOutParam(5,system.db.VARCHAR)
call.registerOutParam(6,system.db.VARCHAR)
system.db.execSProcCall(call)
However now I get the following error message…
I know its small so here is error text on second picture.
com.inductiveautomation.ignition.common.script.JythonExecException
Traceback (most recent call last):
File “function:runAction”, line 18, in runAction
java.lang.Exception: java.lang.Exception: Error executing system.db.execSProcCall()
caused by org.python.core.PyException
Traceback (most recent call last):
File “function:runAction”, line 18, in runAction
java.lang.Exception: java.lang.Exception: Error executing system.db.execSProcCall()
caused by Exception: Error executing system.db.execSProcCall()
caused by SQLException: ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at “GA_CFB_DW_PROC.CFB_BF_CREATE_LOT_RECORD”, line 38
ORA-00001: unique constraint (GA_CFB_DW_PROC.SYS_C008802) violated
ORA-06512: at “GA_CFB_DW_PROC.CFB_BF_CREATE_LOT_RECORD”, line 26
ORA-06512: at line 1
caused by oracle.jdbc.OracleDatabaseException
Error : 6502, Position : 0, Sql = BEGIN ga_cfb_dw_proc.CFB_BF_CREATE_LOT_RECORD(:1 ,:2 ,:3 ,:4 ,:5 ,:6 ) ; END;, OriginalSql = { call ga_cfb_dw_proc.CFB_BF_CREATE_LOT_RECORD(?,?,?,?,?,?) }, Error Msg = ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at “GA_CFB_DW_PROC.CFB_BF_CREATE_LOT_RECORD”, line 38
ORA-00001: unique constraint (GA_CFB_DW_PROC.SYS_C008802) violated
ORA-06512: at “GA_CFB_DW_PROC.CFB_BF_CREATE_LOT_RECORD”, line 26
ORA-06512: at line 1
Ignition v8.0.14 (b2020062220)
Java: Azul Systems, Inc. 11.0.6