Pay Attention to LiveCycle Orchestration String Length Settings

When creating process orchestrations that contain variables of type ‘string’, always set the length to -1 in cases where you cannot predict the length of those variables at runtime. In Workbench, this ‘Length’ textbox can be found under the section ‘Datatype Specific Settings’ in the ‘Create Variable’ or ‘Edit Variable’ screens.

Many LiveCycle process orchestrations are developed using the LiveCycle turnkey with MySQL as the database. Every long-lived orchestration you create will have its own dedicated table in the LiveCycle repository database. For example, if you create a process called ‘myprocess’, the table will be called tb_pt_myprocess. Please note that the table is created only after you “activate” the process.

Its columns and their datatypes are determined by the number and datatype of the variables you create in your orchestration. For example, in MySQL, the creation of a variable of type ‘string’ with no length specified will result in the creation of a table column with the datatype of VARCHAR(100). MySQL defines its ‘VARCHAR‘ datatype as follows:

A variable-length string. 100 represents the maximum column length in characters. The effective maximum length of a VARCHAR in MySQL 5.0.3 and later is subject to the maximum row size (65,535 bytes, which is shared among all columns) and the character set used. For example, utf8 characters can require up to three bytes per character, so a VARCHAR column that uses the utf8 character set can be declared to be a maximum of 21,844 characters.

Specifying a length of -1 will result in the creation of a table column of datatype LONGTEXT. MySQL defines its ‘LONGTEXT‘ datatype as follows:

A TEXT column with a maximum length of 4,294,967,295 or 4GB characters. The effective maximum length is less if the value contains multi-byte characters. The effective maximum length of LONGTEXT columns also depends on the configured maximum packet size in the client/server protocol and available memory. Each LONGTEXT value is stored using a four-byte length prefix that indicates the number of bytes in the value.

If development is done on MySQL, if string variable length is not specified as -1,and if the LCA is exported into the TEST, STAGING or PRODUCTION environment where the LiveCycle repository is hosted by Oracle 10g, you run the risk of hitting exceptions such as this one:
com.adobe.pof.odapi.POFSchemaManagerLocal.createObjectType(com.adobe.pof.odapi.CreateObjectTypeInfo,com.adobe.idp.Context) throws com.adobe.pof.POFException:
java.sql.SQLException: ORA-00910: specified length too long for its datatype
.

For SQL Server 2005, a string variable with no length set will end up with a datatype of ‘NVARCHAR(100)’ and one with -1 set as length will have a datatype of ‘NTEXT‘.

For Oracle 10.2, a string variable with no length set will end up with a datatype of ‘NVARCHAR2(100)’ and one with -1 set as length will have a datatype of ‘NCLOB‘.

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)
This entry was posted in Adobe LiveCycle ES. Bookmark the permalink.

Comments are closed.