DBExecute system function basically a step or a parameter that can be used to run a stored procedure in a specific database. Before you run the workflow with the DbExecute system function, use Process Configuration Console to define the DbExecute connection in the workflow system properties first.
Obeviously, any database stored procedure that will be called by a system step must have all of its parameters declared as follows:
- out – SQL Server
- in out – Oracle
- inout – DB2
Whereas. you can specify this step to insert or update values into the database table. However, stored procedure will return all the parameters defined in it accordingly. Moreover, database parameters types can be following:
- String
- Integer
- Boolean
- Float
- Time
Remeber, parameters for a stored procedure cannot be arrays. For example, you can pass in multiple separate string parameters but you cannot pass in an array of separate strings as a single parameter. You can use a single element in an array by specifying its index. E.g. the syntax for specifying the first element in an array is fieldname[1] which is described in below image:
Handling parameters returned as null from stored procedures If:
- String parameter is set to null by a stored procedure, the work object data item will receive an empty string.
- Date/Time, integer, or float parameter is set to null by a stored procedure, an exception will be thrown. In addition, an explanatory message will be logged.
- Boolean parameter is set to null, an exception will be thrown. Furthermore, an explanatory message will be logged.
Above all, please visit IBM documentation centre for further information about the dbexecute system function limitations: https://www.ibm.com/docs/en/filenet-p8-platform/5.2.0?topic=functions-dbexecute-system-function