" /> LiveCycle Doc team: April 2009 Archives

« March 2009 | Main | May 2009 »

April 29, 2009

Output IVS – A Useful Output ES Development Tool

LiveCycle ES provides a sample application called Output Installation Verification Sample (IVS). The sample is a web application that interacts with the Output ES service to generate PDF or printed output. After you deploy the application, you can browse to the web page it provides and render form designs for testing purposes. So, the Output IVS application enables you to debug the Output ES part of your solution in isolation from the rest of your LiveCycle ES application.

The Output IVS web pages provide a UI for configuring the parameters of the Output service operations. You can select the format of the output to generate (file or printer), the form design, data files, XDC files, and any other files that are needed to execute the operation. Output IVS looks in a specific location for the form designs and test collateral that it runs on. As a convenience for testing your installation, Output IVS is configured to point to some sample form designs and data files that are installed with the application.

For development purposes, you will create your own directories on the LiveCycle ES server file system to store your form designs and test collateral, and then configure the Output IVS preferences to point to them. For example, if you created a directory called OutputTest\Forms in the C: drive of the LiveCycle ES server, you would configure the Content Root URI property to be C:\OutputTest\FormDesigns. Any form designs that you place in that directory are then available to select in the Output IVS web pages.

Try it

To get started, you need to deploy the application to the application server. The application is installed with Output ES on the LiveCycle ES server:
[install location]/LiveCycle8.2/deploy/adobe-output-ivs-[application server].ear

For example, after installing LiveCycle ES on Windows for a JBoss application server, the file is C:\Adobe\ LiveCycle8.2\deploy\adobe-output-ivs-jboss.ear. To deploy on JBoss, simply copy the file to the [JBoss home]/server/all/deploy directory (JBoss can be running when you copy the file).

Next, create a directory where Output IVS will store output files, for example C:\results.

Now, open a web browser, open the application, and configure the authentication properties:

  1. Go to the address http://[server-name]:[port]/OutputIVS. For JBoss, the default port number is 8080.
  2. Click the Check/Change Your Preferences link.
  3. Scroll to the bottom and enter a user ID and password to use for executing the Output ES service.
  4. Click Save.

After you click Save, the page that you use to render a form design is automatically loaded. Try rendering a sample form using the following configuration:


Form Designs: PurchaseOrder.xdp
Data Files: PurchaseOrder_2_pages.xml
Server File: C:\results\output.pdf

Use default values for all other parameters. Click Use EJB to send the request. The PDF is written to the C:\results directory, and (if you have Adobe Reader or Adobe Acrobat installed) the PDF is opened automatically.

More information about Output IVS

After you open the application in your web browser, click the Help button. All the information that you need for configuring global run-time properties and Output job options is there.

April 16, 2009

Generating a PDF from any application that supports printing

Adobe LiveCycle PDF Generator ES Update 1 (8.2) introduced a new feature called the PDF Generator ES IPP Client, which allows you to generate a PDF from any application that supports printing. The feature is essentially a print driver that prints to PDF Generator ES. After the print driver is installed on a user’s computer, "Adobe LiveCycle PDF Generator ES" appears in the user’s list of available printers. Printing to that printer from any application sends the document (in PostScript format) PDF Generator ES. LiveCycle PDF Generator ES then converts the PostScript file to PDF and sends the PDF file to the user as an attachment to an email message.

Note: The PDF Generator ES IPP Client is only supported on 32-bit versions of Windows XP, Windows 2000, Windows Server 2003, Windows Vista.

Here are the steps required to get this feature working:
1. Install and configure LiveCycle PDG Generator ES.
2. Log into LiveCycle Administration Console, click Services > Applications and Services > Service Management, and find provider.email_sendmail_service. Click the service name and ensure that the Configuration tab is filled correctly. This is where you specify the information that LiveCycle uses to send the email messages.
3. Ensure that your users are configured with a valid email address in the LiveCycle database and assign the PDFGUserPermission to each user. (See Managing Users and Groups and Managing Roles in the LiveCycle User Management Help.)
4. Install and configure the print driver on your users’ computers. For instructions on installing the print driver, see “Installing the IPP client” in your LiveCycle Installing and Deploying guide (such as Installing and Deploying LiveCycle ES for JBoss).

April 9, 2009

Saving Exception Messages Using the Execute Script Service

If you are handy with the Java language, you probably already know how to use the Execute Script service to interact with the process data model. The LiveCycle Workbench ES Help describes all the methods that are inherently available to the Execute Script service for getting and setting process variable values. (See patExecContext reference). However, you can also code against any of the Java libraries that are available to the Java virtual machine that runs the LiveCycle ES server.

The following simple example creates a new file named temp.txt on the C:\ drive of the LiveCycle ES server:

import java.io.File;
import java.io.IOException;

//create a File object
File newDir = new File("c:\\temp.txt");
boolean created;
try {
//write the file to the file system
created = newDir.createNewFile();
//save the result
patExecContext.setProcessDataBooleanValue("/proces_data/@fileCreated", created);
} catch (IOException e) {
//save the error message
patExecContext.setProcessDataStringValue("/pricess_data/@results",”Error in Create File process: “ + e.getMessage());
}

This is a trivial use case, especially considering that you can use the File Utilities service to create a file. Notice, though, that if an exception is thrown the error message is saved in a process variable. Even though service operations throw exception events, the events do not provide information about the exception. Exception events are great tools for reacting to unexpected behaviors such as execution errors, but they aren’t very helpful for investigating the cause of the behavior. The Execute Script service enables you to incorporate the exception details into the process.

I created a process that included the Execute Script service using the Java code from the above example. To throw an exception, I changed the file name to FF:\\temp.txt (no FF drive exists on the file system of the LiveCycle ES server). When I invoked the process, the exception message, “The system cannot find the path specified,” is saved in the results variable. The process also uses routing conditions to evaluate the results variable and email the exception message to the process owner.

process.gif

April 1, 2009

Mockumentation: Using Form Guides in LiveCycle ES

As part of our ongoing initiative to be a friend to the environment, we wanted to reduce the number of old socks polluting our landfill sites. So, to give these old socks a new life, and to explore different ways of delivering meaningful information to you, we are now using sock puppet videos to provide LiveCycle ES overviews.
See our latest video describing how PDF forms and form guides can be used to capture information for an insurance claim process.

Disclaimer:The information provided herein and in the attached video are solely due the influence of April Fool’s day. Any resemblance to real or actual puppets (living or dead) are pure coincidence.

Credits

  • LiveCycle ES Server: Tony Greentube
  • Form Guide/PDF form: Lenny Leotard
  • User: Wally Wool
  • Workspace ES: Macky Mache
  • Insurance Agent: Molly Mocksock