I am trying to insert XML/XDP in a CLOB column of an Oracle Database. It seems to work in a short lived process. However, I get all sorts of errors when I convert it to long lived.
Anyway one know why?
I extract the XML/XDP using a process form submission module and convert it to string. Then, I run the insert through a custom script as setString.
I get an ORA error saying string literal is too long. It doesn't give the error for the short lived process. Trying to increase the string variable size to unlimited crashed the workflow.
Can you suggest a better way to extract the XML/XDP and insert in the CLOC column.
The reason you're not getting the error with a short lived process is because it doesn't save data to the database.
I'm surprised it crashes the workflow if you set the variable to unlimited.
Can you create another variable and set it to unlimited. I'm just wondering if it'll create the same data type when you set it to unlimited the first time as oppose to do a modification once it's been created.
In Mysql the data type should be LongBlob.
This has been an issue in the past. When I try to change the string size to unlimited, it doesn't allow me to save the process. However, when I create a new string variable and assign it to unlimited, it worked.
I am thinking, when the string variable is saved the first time with a limit or a lower limit, it saves it to a Varchar2 and it is unable to change to a different column type when a higher char limit or unlimited it set. Don't you think this is a serious issue in existing processes with lower limits on string variables. Do you know a stable work around?
Also, how can I get value from an XML variable, using a custom script? "patExecContext.getProcessDataValue" doesn't work.
I just did a test on my server and the data type got updated to LongBlob, but there still might be a bug depending of the app server/database.
For the execute script, I tried the following which worked for me:
org.w3c.dom.Document xmlDoc = patExecContext.getProcessDataValue("/process_data/inXML");