" /> LiveCycle Product Blog: February 2008 Archives

« January 2008 | Main | March 2008 »

February 26, 2008

Determine Which Cluster Node Processed a Particular LiveCycle Orchestration

When LiveCycle is deployed in a cluster of several nodes, determining which node processed a particular short-lived or long-lived orchestration invocation is hard. System administrators also need a reliable way to verify that load-balancing is working, meaning that all nodes in the load-balanced cluster are getting client requests. The best solution is to do this in situ, which means collecting the name and IP address of the node as part of the orchestration itself.

The approach can be this:
- use scripting to obtain JVM and OS information
- pass the collected information to process variables or build an XML data structure
- merge this data into a form

The 'Execute Script' action can be used for this. If added as part of the 'Execute Script' action, the following script will get run by LiveCycle's built-in BeanShell 1.3 Java scripting environment:

// Initialize an InetAddress object
InetAddress localaddr = InetAddress.getLocalHost();

// Get DNS name of the Server Node
String strDNSName = localaddr.getCanonicalHostName();

// Set the value of a process variable using patExecContext
patExecContext.setProcessDataStringValue("/process_data/@DNS_Name", strDNSName);

The value of the process variable DNS_Name can then be populated into a form field used in the orchestration, or applied as a watermark to a document assembled or converted.

The attached BeanShell script collects a lot more server information (node IP address, JVM heap usage, JDK being used etc), builds an XML structure from this and then sets another process variable of datatype 'xml'. This can then be used as data for a corresponding XDP form template (when downloading, save as form.xdp). Based on your scenario, this can be rendered using Forms ES and streamed back to the calling application or browser or saved to the server filesystem.

February 25, 2008

AIR Announced

If you have not heard, AIR has now made it's way from Labs to the production world.

For all the details on AIR, visit the product website here: http://www.adobe.com/products/air/. To see what some of our enterprise customers are already doing with AIR, visit the showcase at http://www.adobe.com/products/air/showcase/. And lastly, to get some ideas on how you may be able to use AIR, visit the marketplace at http://www.adobe.com/cfusion/exchange/index.cfm?event=productHome&exc=24&loc=en_us for some great examples.

Aside from the AIR resources, one link that you may find very useful when creating your LiveCycle-integrated AIR applications, is the Flex 3 Style Explorer that you will find here: http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplorer.html#. This will easily enable you to move away from the standard themes and not have everyone immediately recognize that you wrote your AIR application using Flex.

February 20, 2008

Understanding LiveCycle Database Schema with Quest's TOAD for MySQL (Free)

To really understand the growth patterns in LiveCycle database storage, you need a graphical tool that will give you a detailed view into the database. Since most early development is done with the LiveCycle turnkey that uses MySQL as the database repository, you need a tool for MySQL. MySQL's 'MySQL Administrator' is a good tool which is freely downloadable. MySQL packages it as part of its "GUI Tools'

But Quest Software, the makers of TOAD which is very popular with Oracle DBAs and programmers has made 'TOAD for MySQL' freely available. It is a powerful tool that offers a lot more functionality than MySQL Administrator.

This tool can be used to assess LiveCycle database growth so that when it is time to answer questions from the PRODUCTION DBA, you will come across as being fully knowledgable about your application's behavior.

February 15, 2008

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'.

February 05, 2008

Using Robocopy to Back up LiveCycle on Windows Vista

In Windows Vista, Microsoft has shipped a really powerful backup utility called "Robocopy" (Robust Copy). It is built into the Command Prompt shell environment. To see its myriad of options, just type in robocopy /? at a command prompt.

The real utility of this tool is after the first full backup - all subsequent backups are incremental and therefore, faster.

Here's the command to backup the LiveCycle install from the C: drive to a folder on the D: drive (The /E argument copies all subdirectories, including empty ones.):
robocopy C:\Adobe\LiveCycle8 D:\backups\Adobe_LiveCycle8 /E

Here's the same command with a bit more control over retries (10 retries, each with a wait interval of 30 seconds)
robocopy C:\Adobe\LiveCycle8 D:\backups\Adobe_LiveCycle8 /E /R:10 /W:30

You can also choose to copy the directory timestamps, and also to copy all file information
robocopy C:\Adobe\LiveCycle8 D:\backups\Adobe_LiveCycle8 /E /W:30 /R:10 /DCOPY:T /COPYALL

This command can be saved as a batch file and then be run as a scheduled task, set to run every day at a certain time at night. This way, if you end up messing up your LiveCycle install (we all do), there is always hope.

February 02, 2008

LiveCycle on WebSphere 6.1 - When Service Integration Bus Security is Enabled AND Administrative Security is LDAP-Integrated

Many PRODUCTION WebSphere environments are configured with 'Administrative Security' enabled and 'Service Integration Bus (SIB) Securtiy' enabled. LiveCycle configuration documentation for environments where WebSphere Administrative Security is integrated with the corporate LDAP directory currently does not exist.

Create a J2C Authentication Alias
In WebSphere Admin Console, create a new 'J2C Configuration Alias' mapped to a user in the corporate LDAP directory. Ideally, the password for this user should not frequently, and without warning, expire. Navigate to Security->Secure Administration, applications, and infrastructure->Java Authentication and Authorization Service->J2C authentication data->New

Verify that the special built-in group 'AllAuthenticated' is listed in the bus connector role. Navigate to Service Integration->Buses->IDP_JMS_Bus->Additional Properties->Security->Additional Properties->Users and groups in the bus connector role. If not, configure it, or configure the user mapped to the J2C Authentication Alias in this role.

Configure LiveCycle JMS Activation Specifications
LiveCycle has three Activation Specifications, namely JobManager_AS, PECommand_AS and Task_Event_AS. Configure all three with the newly created 'J2C Authentication Alias'. Navigate to Resources->JMS->Activation specifications.

Force Re-Synchronize the Nodes
All nodes in the WebSphere cell have to be updated with these changes.

Re-start LiveCycle appserver instances
Watch the SystemOut.log for any error messages. If there are any related to the Service Integration Bus, fix them first.