Products | Versions |
---|---|
TIBCO BusinessEvents Enterprise Edition | 5.x |
This is a known product issue (CR BE-22767).
As a workaround please create an Oracle Stored Procedure that returns the CLOB value as an output parameter and execute the StoredProcedure in your Rule/RuleFunction using below code.
eg. (Stored procedure tst_clob with a single input and a CLOB output parameter):
===================================================================
Database.setCurrentConnection( "/SharedResources/connORACLE" );
try {
Object proc = Database.sp.initStoredProc("call tst_clob(?,?)");
int id = 1;
String outStr;
Database.sp.setInputParameter( proc,1, id );
Database.sp.setOutputParameterType( proc, 2, 0);
Database.sp.executeStoredProc( proc );
outStr = Database.sp.getObjectAtIndex(proc, 2);
Database.sp.closeStoredProc( proc );
Object procCursor = Database.sp.initStoredProc("call Order_Demo.FindOrders(?)");
}
catch (Exception ex)
{
System.debugOut("RuleFunctions.executeSPReturnCblob(): ##### ERROR on execution error " + ex@message + " -> stack trace -> " + ex@stackTrace);
}
finally {
Database.unsetConnection();
}
===================================================================
Note:
Attached to the article a sample project. A sample SQL file included in folder /sql that includes sqlplus commands to creates the StoredProcedure, inserts a single row and executes the StoredProcedure.
The catalog functions requires to configure DBConcepts, that's why CDD file includes the Oracle JDBC connection in the cluster area (DBConcepts) and DBConcepts enabled for the InferenceAgent ProcessUnit.