Feeds:
Posts
Comments

Archive for the ‘LiveCycle ES1’ Category

I often get questions about the appropriate use of LiveCycle process variable types. Here is a cheat sheet that attempts to cover the major types.

vars

Primitive Types:

  • Document variable – This is a generic type used for storing and passing around bits. I commonly use it to read in and pass around .pdf, .jpeg, .doc, .xls, .tiff, .txt etc… Note: You can coerce types back and forth between Document and other types using  the setValue operation. e.g. if you have xml data stored in a Document variable you can create a variable of type xml and map the data to the new variable using the SetValue operation. This is an important concept since some services expect a Document type.
  • boolean, date, data-time, int, long, short, string – Basic primitive types
  • xml – Even though you can use the Document type to store and pass around xml data, the xml type has a distinct advantage. You can associate a schema with the xml contents which makes XPath operations seemless. i.e. you can drill down into the structure using setValue operation to set/get data. Note: Some operations expect a Document type that contains XML, so after manipulating the data you can coerce it to a Document type using setValue.
  • list – A list has a sub-type attribute, so this can be a list of any of the other supported types
  • map – Maps come into play when working with services like Assembler, if a service expects a map you can use this type to build one up.

Form related variables:

  • xfaForm variable – The most common use of this type is for rendering .xdp or .pdf to a user in Workspace. You can also use it for rendering Form Guides. This is a special type since it has an associated template and render service. Using the type allows you to pass the template and data around your process and render it on-the-fly to users as needed.
  • Document Form variable – This is essentially interchangeable with the xfaForm type with one big difference; With this type you get an additional option in the advanced properties ‘Call the render service only once’. This allows you to pull a template from the repository and render it once, then pass around a persistent pdf copy of the form. Typically the submit type on the form will be PDF instead of XDP when using this type. This allows users to submit and pass around the entire PDF (not just the template and data). The primary use of this type is when working with Digital Signature, Certified Documents, Comments or any data that can’t be captured in a template/data model. When using a basic xfaForm variable the form is re-rendered for every user so maintaining a digital signature would not be possible. If you are interested in Digital Signature workflows please see my post: digital-signature-workflow-with-a-topping-of-reader-extensions
  • Form variable – This type is typically used to display items in Workspace that do not require rendering such as a .swf file.

Complex Types:

There are numerous other types that can be leveraged within your process. Typically you stumble upon these when examining the input/output of a service. As an example the invokeDDX/Assembler service returns a type of AssemblerResult; This particular complex type contains a varietey of information as well as the result file(s). To get familiar with these types, examine one with the setValue operation and discover the various attributes. Often you can pull out the data you want using the setValue operation. i.e. Location = MyDocVar, Expression = /process_data/assemResults/object/documents[@id=’result.pdf’]

Cheers,
_Seth

Read Full Post »

Here is a recipe for pre-populating a form for display in Workspace and routing it to another user. The first user initiates the form in Workspace, the form is pre-filled with their name and the time, the completed form is then routed to another user for approval. Note: In this example we will just route it back to the initiator for simplicity.  To change this modify the assign task in the main process.

The trick here is massaging the data in the forms render service so it is displayed for the  initiator task. To accomplish this I use a temp XFA variable in my render service.  Since my form template has an embedded schema I can easily XPath into the form variable to set/get data.

LiveCycle Version: 8.2.1

Completed example LCA: prepopandroute

Ingredients:

  • A customized render service
  • An XDP template that has an associated schema embedded within it (if you need a schema you can generate one here)
  • An Assign User activity
  • A User Look Up activity
  • A sprinkling of SetValue
  • 2 Routes
  • 1 Decision point

Recipe: Please see the completed example above

Initiating the task

start

Second user gets a To Do item with completed form and can approve or deny

seconduser

The custom Render Service:

render2

Main Process:

user

Cheers,

_Seth

Read Full Post »

At the bottom right of most activities, you will see a lightning bolt icon, simply make a new route off of the icon and choose the target exception you would like to handle. If the operation fails the exception route will be followed.

As an example we will catch an error that may occur during the application of Reader Extensions Usage Rights. This same technique can be used for all LiveCycle activities that have the potential to raise errors.

Here is a completed example with LCA: catchexception

Cooking instructions for creating a fault route:

  1. Identify the activity in your process that you would like to provide a fault route for
  2. Click on the lightning bolt icon at the bottom right of the target activity, then drag to create the fault route.
  3. When prompted select the exception that you will like to handle

fault
Cheers,
_Seth

Read Full Post »

If you write DDX this is a must have utility/sample. It is shipped with LC ES 8.2.1 but not deployed by default.

Cooking Instructions:

  1. Locate the adobe-assembler-ivs.ear
    [LC install dir]\LiveCycle8.2\deploy\adobe-assembler-ivs.ear
  2. Copy this into:
    [LC install dir]\LiveCycle8.2\jboss\server\all\deploy\.
  3. No need to bounce the server, just go to:
    http://%5Byour server]:8080/Assembler

Your DDX goes into the left pane (or) you can start with a sample that can be accessed from the menu. The inputs are specified on the right, and the key name is the folder name. The key will map to one or more files that are dragged onto the folder.

assemblerivs

Cheers,
_Seth

Read Full Post »

When using the xfaForm or Document Form variable it is extremely easy to set and get data if your form has an associated schema. Here is a basic recipe for setting and getting data from within an XFA based form in a LiveCycle process.

LiveCycle Version: 8.2.1

Here is a completed example with LCA: setget1

Ingredients:

  • One XFA Form
  • One Schema

Cooking Instructions:

  1. Generate an xml file that will represent your form data:
    <?xml version=”1.0″?>
    <customerData>
    <name>Joe Smith</name>
    </customerData>
  2. Generate schema based on the form data. There is a great little web utility that will do this for you here: Generate XML Schema
  3. Build a form based on the schema
    1. Create a new form in LiveCycle Designer
    2. In the Data View panel select New Data Connection
    3. Specify your schema and choose the option to embed
    4. Drag items from the Data View onto your form and save resulting file in the repository
  4. Specify the form you just created as the template for your xfaForm or DocumentForm variable. If you can see the schema when you select Schema Settings you successfully embedded the schema. You can also load an external schema here.
  5. Now you can XPath directly to the form fields using the SetValue activity within your process and set or get data. If you want to pre-populate data before a form is presented you can use this technique within your render service.

get

setget

embed

Note: I strongly recommend using schema. However, if you are not using one, you can still XPath to items within a form using the // syntax e.g.
/process_data/form/object/data/xdp/datasets/data//FirstName

Cheers,

_Seth

Read Full Post »

You can now archive, manage, deliver and process documents using the LiveCycle Content Services solution component. Here is a quick recipe for adding a document to the content repository. As an example we will use a PDF, but this could be any file type. In a typical workflow you might flatten a dynamic form, convert it to PDF/A and archive the document in Content Services.

LiveCycle Version: 8.2.1

Here is a completed example with LCA: archivepdf1

Ingredients:

  • One document to archive
  • One storeContent process activity

Cooking Instructions:

  1. Setup a new Space in Content Services
    1. Log into Content Space http://%5Byour server]:[your port]/contentspace
    2. Create a new space
  2. Archive the document in Content Services
    1. Add an input variable of type document to your process
    2. Add the DocumentManagementService:storeContent activity to the process
    3. Configure the storeContent activity
    4. Test the process by invoking it in Workbench. Your document should now appear in the repository. Note: I added the optional aspect ‘Versionable’ to the storeContent so you each time you execute the test you will get a new version of the document in Content Services.

archiveprocess1

archived1

Cheers,
_Seth

Read Full Post »

There are two primary submit types that work out of the box in LiveCycle Designer 8.x, Email and HTTP submit.

If you don’t want to use an email client to submit form data, HTTP is a good alternative. Typically a servlet, or jsp is used to receive the submission. This is a straight forward process and there are numerous examples posted on the web.

SOAP: It is possible to submit the form data via SOAP but it is involved. A simple alternative is to submit the data via HTTP to a web server and have the web server make a SOAP call on your behalf.

Here is an excellent article on how to implement a solution using Cold Fusion and HTTP submit: http://www.adobe.com/devnet/livecycle/articles/designer_coldfusion.html

If you are an Adobe LiveCycle Forms customer you can use the FormsService > processFormSubmission activity to process submitted data.

Cheers,
_Seth

Read Full Post »

Older Posts »