" /> LiveCycle Product Blog: December 2007 Archives

« November 2007 | Main | January 2008 »

December 18, 2007

Filling in Forms with Sample Data

The "Fill Form" button on this sample can be dragged and dropped into your Designer Custom Object Library and reused on other forms to help populate those forms with random sample data. The script in the button simply looks through the form (xfa.form) finding each of the fields (using myNode.nodes.item(0).className) and filling in their values.

December 17, 2007

LiveCycle - Quick and Dirty Server Sizing

One of the most common problems LiveCycle project sponsors face is determining how many servers they need to deploy to satisfy their throughput and/or SLA (Service Level Agreement) requirements. The following highly generalised information will help in arriving at a ballpark figure for the initial discussion phase:

- LiveCycle performance is CPU-bound in most cases
- The more CPUs your server has, the better transaction throughput you will get
- The better the CPU subsystem (higher clock speeds, higher FSB speeds, better supporting chipsets, faster memory), the better the transaction throughput you will get
- Each server requires at least 3 GB of available RAM. 4 GB will give you a comfortable breathing room. This includes about 500 MB for the operating system, about 1 GB for the java process that hosts the appserver instance, and about 250 MB for LiveCycle's non-Java components such as XMLForm. In addition to this, the appserver itself would have other processes running such as the node agent/manager etc.
- As a general rule, LiveCycle can handle roughly 5 concurrent requests on each CPU core. This varies between current Intel, AMD, Sun and IBM processors. For example, if your server has two dual-core CPUs, and if each LiveCycle transaction experiences an elapsed time of 1 second under load, this server can be expected to provide a throughput of 4 cores * 5 concurrent requests * 60 * 60 = 72,000 transactions per hour.
- Your system should be capable of satisfying the SLA at peak concurrent request load
- To determine your peak concurrent request load, consider your absolute busiest hour during your busiest time of the year.
- Concurrent requests are NOT the same as the number of users
- Concurrent requests are NOT the same as the number of users currently logged in
- Concurrent requests are requests sent to the server(s) by users or by batch processes that, at any given point in time, are either queued up, or are executing on the server(s). This number is usually a very small subset (2-5%) of the total number of users who are currently logged in to the application.
- The LiveCycle database requires about 300 MB of storage at the outset. Storage requirement during production use depends entirely on the custom applications that are built with LiveCycle
- LiveCycle is supported on VMWare ESX, AIX LPARs and Solaris 10 Containers. The same memory requirement (at least 3 GB) applies. Provision at least two CPU cores.
- For High Availability (HA), deploy LiveCycle in horizontal clusters of at least two separate servers, physical or logical (like VMWare). Physical is better (provides hardware redundancy).

Please note: Never deploy a LiveCycle-based enterprise application into production use without taking it through the wringer of at least one performance-testing cycle by a competent load testing team with professional-quality tools such as HP LoadRunner, Borland SilkPerformer, IBM Rational Performance Tester or RadView WebLOAD with the Flex 2 Add-On.

Activating the Watched Folder Mechanism for an Adobe LiveCycle Barcoded Forms Process

Keeping with the topic of watched-folders, if you are upgrading from LiveCycle Barcoded Forms ST into the ES environment, you can duplicate the same watched folder approach to integration by adding the Watched Folder end-point to the decode service.

Take a look at this recorded demonstration of the activation of the watched-folder end-point. In this case I've applied the end-point to a Barcoded Forms-centric decode service, but it is a general use case for anything you'd like to apply a watched-folder end-point to.

http://my.adobe.acrobat.com/barcodedformswatchedfolder/

If you would like the same type of functionality without having to define a process in Workbench, simply apply the same end-point to the decode method of the Barcoded Forms service.

December 14, 2007

LiveCycle - Global Storage Configuration Using Microsoft Services for NFS

If you are deploying LiveCycle in a horizontal cluster of multiple servers, the global storage folder would have to be shared by all of them since there can only be one global storage folder. If you are running LiveCycle exclusively on AIX, Solaris or Linux, mounting the global storage folder using NFS is relativley straightforward. The same applies to a complete Windows environment. However, if you are running LiveCycle on AIX, Solaris or Linux and you need to configure the global storage folder on a Windows network file share, things get tricky. Open-source and free Samba is one option. For a native Microsoft solution, you can use 'Microsoft Services for NFS', a component of 'Windows Services for UNIX'.

Install Microsoft Services for NFS on the Windows Server
Microsoft ships Windows 2003 Server with "Microsoft Services for NFS". This is an optional component that you need to install which consists of an NFS Server as well as an NFS Client. To install it:
- Put the Windows Server 2003 CD/DVD, run setup.exe
- Choose 'Install Optional Windows Components'
- Highlight 'Other Network File and Print services' and click the Details button
- Highlight 'Microsoft Services for NFS' and click the Details button
- Check all of the checkboxes including 'Client for NFS', 'Microsoft Services for NFS Administration', 'Server for NFS', 'Server for NFS Authentication' and 'User Name Mapping'
- Click OK
- Reboot server afterwards.

Ensure that you can ping the Windows server hosting the NFS share from all of the UNIX servers
Ensure also that you can ping all of the UNIX servers in the cluster from the Windows server hosting the NFS share

Create Users and Groups on UNIX Nodes
- Create a new user on all UNIX member nodes with the same name as well as UID ('was_adm', for example)
- Create a new group on all UNIX member nodes with the same name as well as GID ('was', for example)
- Make 'was_adm' as well as 'root' members of the new group

Configure NFS Server on the Windows Box
- Copy the /etc/passwd and /etc/group files from one of the the UNIX servers to the %WINDOWS_DIR%/msnfs/ folder
Start the 'Microsoft Services for NFS Administration' MMC Console (navigate All Programs->Administrative Tools->Microsoft Services for Network File System)
- In the left pane, highlight 'User Name Mapping' node, and open its Properties window
- In the 'UNIX User Source' tab, choose the radiobutton for 'Use Password and Group Files'
- In 'Password file path and name', browse to %WINDOWS_DIR%/msnfs/passwd
- In 'Group file path and name', browse to %WINDOWS_DIR%/msnfs/group
- In the 'Simple Mapping' tab, check the checkbox for 'Use simple maps'
- Click 'Apply, then 'OK'.
- In the left pane, expand the node 'User Name Mapping' and highlight 'User Maps' node,choose 'Create Map'
- Click the 'List Windows Users' button
- Click the 'List UNIX users button'
- Select the user mapping (for example, 'Administrator' - 'root') and click Add. It is better to map 'root' to 'Administrator and an additional user (say 'was_adm') to a Windows local user, also called 'was_adm').
- You can also perform group mapping. Administrators=system, 'was'='was'

Make sure the user that WebSphere/WebLogic/JBoss runs as is mapped ('was_adm', for example). Also, make sure that this user is exactly the same on all of the cluster members.

- Create a folder on the Windows server to host the shared global storage folder.
- Configure NFS sharing on the Windows folder. For this, in Windows Explorer, highlight the folder and choose the Properties window.
- In the 'NFS Sharing' tab, make sure that the folder is shared.
- Click the 'Permissions' button. Ensure that the 'Type of Access' is 'Read-Write'. You might also have to check the 'Allow Root Access' checkbox.

Configure the UNIX Servers
Login as root and mount the folder on all the UNIX boxes with the following command (where 192.36.51.13 is the IP address of the Windows server, /aix is the folder on the Windows box that is NFS-shared). Make sure that the folder on the UNIX server (/opt/adobe/livecycle8/lc_global_storage/ in the example) already exists and is the same on all the UNIX servers.
mount 192.36.51.13:/aix /opt/adobe/livecycle8/lc_global_storage

Change ownership of the folder to the user WebSphere runs as:
chown was_adm:was /opt/adobe/livecycle8/lc_global_storage
If this throws an authentication error, your user name mapping on the Windows Server does not work. LiveCycle should also have been installed as the user WebSphere runs as.

Test by copying files into the folder from each of the UNIX servers as well as from the Windows server. Also, ensure that the contents of this folder are visiible on all of the UNIX servers using the ls -al command.

If a mistake was made and you want to undo the mount, use the following command:
umount /opt/adobe/livecycle8/lc_global_storage

Configure LiveCycle
Start LiveCycle Configuration Manager (LCM) and point the Global Storage Folder to /opt/adobe/livecycle8/lc_global_storage

Verify
After LiveCycle is bootstrapped and configured, log in to the LiveCycle Admin Console on each and every one of the servers in the cluster
- Navigate to Home > Services > Archive Administration > Service Management
- Ensure that all the Services are listed.
If there is any mis-configuration, you will get an internal error instead of a list of services

To learn more about Windows Services for UNIX, see whitepaper from Microsoft.
More about NFS is available in this note from MIT's OpenCourseWare.

LiveCycle - Configuring PDF Generator with an Email Endpoint

1) Get your mail administrator to create an email account for LiveCycle PDF Generator
2) Afterwards, get him/her to send you the following information: a) mailbox userID, b) password, c) mail server host IP address or DNS name, d) POP3 or IMAP port number, e) whether SSL is enabled for POP3/IMAP f) SMTP port number) whether SSL is enabled for SMTP

3) Create a folder on your J2EE appserver machine for failed emails, called 'lc_failed_emails' for example

4) Login to the LiveCycle Admin Console (http://servername:portnumber/adminui/)
5) Navigate to Services > Archive Administration > Service Management
6) Click on 'ConvertAllFileTypesToPDF: 1.0 '
7) In the 'End Points' tab, choose 'Email' from the dropdownlist
8) Click 'Add'

9) For 'Description', type in "Email Endpoint"

POP3/IMAP
10) In 'Inbox Host', type in the IP address or the DNS name of the mail server
11) In 'Inbox Port', type in the POP3 or IMAP service port number
12) In 'Inbox Protocol', choose 'pop3' or 'imap' from the dropdownlist, depending on your case
13) In 'Inbox User', type in the mailbox userID
14) In 'Inbox Password', type in the mailbox user's password
15) Check the checkbox for 'POP3/IMAP SSL Enabled' only if your mail administrator informed you that it is

SMTP
16) In 'SMTP Host', type in the IP address or the DNS name of the mail server. In some cases, the SMTP host will be different from your POP3/IMAP host
17) In 'SMTP Port', type in the SMTP port number
18) In 'SMTP User', type in the mailbox userID
19) In 'SMTP Password', type in the mailbox user's password
20) Check the checkbox for 'SMTP SSL Enabled' only if your mail administrator informed you that it is

21) In 'Failed Email Sent Folder', type in the fully qualified path to the folder you created in step 3
22) In 'Operation Name', choose 'invoke' from the dropdownlist

In the 'Input Parameter Mappings' section:
23) In 'inputDocument', type in *.*

In the 'Output Parameter Mappings' section:
24) In 'Output PDF Document', type in %F.%E.pdf

25) Click the 'Add' button to save the changes.
26) Test by sending a Word document to the e-mail address
27) On the LiveCycle server, watch for a CPU usage spike
28) When the spike is over, check for new e-mail in your mail client. If the conversion succeeded, you should have an e-mail from the mail userID you configured with a PDF attached.

December 13, 2007

Add, Inquiry, Modify, and Delete XML Nodes within the PDF

Instead of creating hidden fields inside a form, consider adding XML directly to the form itself. This sample shows how to add, inquiry, modify, and delete XML nodes within the PDF without requiring hidden fields.

Download AIR Beta 3

Adobe® AIR™ beta 3 was released early this morning. So to trump my last entry, download Beta 3. The same links posted previously will take you to the new release: http://labs.adobe.com/technologies/air/.

December 12, 2007

Download AIR Beta 2

If you've been experimenting with LiveCycle and AIR integration, be sure to upgrade to AIR Beta 2 as you will find that AIR beta 1 is now expired.

For the latest downloads and news on AIR, please go to http://labs.adobe.com/technologies/air/ and to see what others have already done with the technology, check out the showcase at http://labs.adobe.com/showcase/air/.


December 11, 2007

Changing a WebService Definition at Runtime

If you have webservice calls predefined in your Data View at design time, you can easily change their definitions at runtime by modifying their soapAddress value. This will allow you to dynamically change which servers or services you are using. Of course, if you do change the soapAddress you need to be certain that the input and output requirements of the services are fulfilled.

This practice is particularly useful when there is a need to change servers at runtime (i.e.: switch between your development and deployment environments without changing forms).

December 10, 2007

"XMLData.parse" and Finding Nodes

One thing to keep in mind when parsing XML from a variable or a data node is that attributes are considered to be a node of the parent. So, child-elements will not necessarily start at (0) if the parent has an attribute. The attribute(s) will be considered before the children.

This sample demonstrates a few methods of retrieving XML data including the population of a drop-down from XML on the form. The data is provided in a text box and parsed using the XMLData.parse method so that you can change the data and watch the results in real-time.

December 07, 2007

XPath in a PDF

This sample demonstrates how to use XPath syntax to extract the information that you need out of an XML variable. Very useful for turning a large XML dataset into smaller chunks of usable data.

If you have any samples or code that you would like to see in the future, be certain to leave a comment.

December 06, 2007

Accessing Properties of a Digital Signature

If you would like to display the properties of a Digital Signature on your form, or have your form react to the change of a signature, here is a quick sample that should give you a head-start. The second signature on the form will not appear until the first signature field is signed.

December 03, 2007

LiveCycle - Simple Stupid PDF Generator Watch Folder Configuration

1) Create a folder in your filesystem
2) Login to the LiveCycle Admin Console (http://servername:portnumber/adminui/)
3) Navigate to Services > Archive Administration > Service Management
4) Click on 'ConvertAllFileTypesToPDF: 1.0 '
5) In the 'End Points' tab, choose 'WatchedFolder' from the dropdownlist
6) Click 'Add'
7) For 'Description', type in "Watch Folder Endpoint"
8) In 'Enter path for the watched folder', type in the fully qualified path to the folder you created in step 1
9) In the 'Operation name' dropdownlist, choose 'invoke'
10) In the 'Input Parameter Mappings' section, for the 'inputDocument' field, type *.*
11) In the 'Output Parameter Mappings' section, for the 'Output PDF Document' field, type %F.%E.pdf
12) Click the 'Update' button to save the changes.
13) Test by copying a Word document to the /input/ folder under the folder you created in step 1. It should disappear a few seconds later
14) Watch Windows Task Manager for a CPU usage spike
15) When the spike is over, check the folder /result/ under the folder you created in step 1. You will have to drill down three more folders (for year, month and day).