Support Article

CLOB Support in Pega 7.1.7

SA-16563

Summary



There is a requirement to store data as a CLOB into an external non-Pega (Oracle) database and to also ensure inserts or updates spanning multiple tables are dealt with in an atomic unit (for example, a database transaction).
Currently either a Java step or a Function (also Java) is used to write the CLOB to the database using JDBC through the JNDI database resource provided by the host JEE Application server. An error occurs whenever more than 4,000 characters is saved to the CLOB field.
As a result, this cannot be used with Pega's transaction auto-commit or transactional functionality and does not meet the above requirement.



Error Messages


** ORA-01461: can bind a LONG value only for insert into a LONG column


Steps to Reproduce



1. Create an activity that saves to a CLOB column using Obj-Save. In this case this is the CLOB Content Column.
2. Run the activity passing in some small text. This runs fine. Entry appears in the database.
3. Retry with a message having more than 4,000 characters. This fails when committing the transaction.

 

Root Cause



This issue was determined to be a product enhancement. CLOB types within PRPC is currently not supported.
You can store a large text value in a BLOB. However, you would have to do an Obj-Open to get the data back out. PR_READ_FROM_STREAM was designed to mimic the databases native VARCHAR support and hence will only return the first 4000/32K chars back.

 

Resolution



An enhancement request (FDBK-12867) has been created for consideration by Pega Product Management.
Suggest Edit

Published January 31, 2016 - Updated October 8, 2020

Did you find this content helpful?

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.