Avoka Blog: Adobe LiveCycle

March 1, 2009

What do the LiveCycle ‘Process Fields’ really do?

Background

In order to integrate a LiveCyc le PDF form into LiveCycle Process Management, you need to embed some special fields into your form.

The LiveCycle documentation does indicate what these fields are for, but doesn’t really explain exactly how they are used and populated.

Process Field Documentation Link

This blog entry explains how it all really works.

The Fields

The Process fields inside Designer look like this:

process-fields-in-designer

The scenarios

When integrating with Process Management, the form will be presented inside Workspace. There are a number of scenarios:

  1. A user is submitting a form within Workspace (either to initiate a process, or as an item in their To Do list)
  2. The user has taken an initialization form offline
  3. The user has taken a form from their inbox offline.

Submitting a form within Workspace

In fact, for this basic scenario, you don’t need the process fields at all. All you really need is a Submit button.

However, if you do use the process fields, you get a few extra capabilities, including user choices, and the option to take the form offline.

The field AWS_SUBMIT is a regular button that contains some Javascript code. This code, among other things, checks whether you’re running in an online (within Workspace) or offline mode. If you’re running online, it simply sends a “click” event to the real submit button, FSSUBMIT_ (which is a hidden http submit button).

Apart from the choice fields described below, none of the other fields are necessary – LiveCycle knows exactly who you are, and what you’re doing, because you’re logged into a live session in Workspace. It’s only when you take a form offline that the other fields are necessary.

Giving the user a choice

Sometimes you want to give your users a choice, which will affect the routes that are taken within the LiveCycle process. If you put a bit of text into the AWS_CHOICE text field, such as “Approve,Deny”, the Javascript code will:

  • Display the Action dropdown (if there are no choices, it will be hidden)
  • Populate the Action dropdown with the values from the AWS_CHOICE field.

It will look something like this:

approvedeny

You can put your own comma-separated text into AWS_CHOICE, but LiveCycle will automatically do a whole bunch of useful things for you.

  • When you create a User Assign Task step in your workflow, check the checkbox that says “Populate Form with Routes”. LiveCycle will then look at all the route names coming out of your User step, and populate AWS_CHOICE with the route names.
  • When the user submits the form, LiveCycle will interrogate the value of the Action dropdown, and automatically route the process down the selected route.

Note: If you choose not to use this option, you can simply create rules in your routes that interrogate other data within your form to decide which route to follow.

Note: Certain route names are associated with special icons in Workspace. These are “Approve” and “Reject” (or maybe “Deny”, I forget.) You can configure these special icons and their associated routenames from Adminui.

Taking a form offline.

Once you take a form offline, it is “disconnected” from Workspace. You can fill it in, and when you click the Submit button, it will be submitted via email, rather than over the web. The AWS_Submit button has logic to determine whether you’re online or offline, and submit either via the web or via email.

If you’re submitting via email, the form needs to know what email address to submit it to. This email address is automatically populated by LiveCycle into the AWS_MAILTO field when you take the form offline. Like all the other fields, there’s no real magic – you can set the field to an email address manually or in code if you want to, but generally it’s easier and safer to let the LiveCycle server take care of this for you.

Note: In order to allow offline submissions, you need to set up a email box, and configure LiveCycle to monitor this email box. That’s the subject of another blog sometime. Email info-at-avoka.com if you’re having trouble.

When you submit your form data via email, LiveCycle no longer knows anything about you, or why you’re submitting the form. It simply knows that an email arrived in an inbox containing some XML as an attachment. So…

When you take the form offline, LiveCycle injects some data into a few fields:

  • When you take an initialization form offline, the LiveCycle server will populate AWS_PROCESSTYPE with the name of the process that should be initiated when you submit the form. When you submit the form via email, LiveCycle will start the named process on your behalf, using the data from the email attachment.
  • When you take a form in your inbox offline, the LiveCycle server will populate AWS_TASKID with the id of the task that this relates to. When the submit the form via email, LiveCycle will complete that task on your behalf.
  • In both cases, LiveCycle will use the email address of the sender of the email of the email to determine who the “completer” was. Warning: make sure you send from an email associated with your LiveCycle identity – if LiveCycle doesn’t recognize the sender, it will treat the email as spam, and silently discard the incoming email. (I haven’t verified this lately, but it used to work this way.)
  • In both cases, the LiveCycle server will populate the AWS_ASSIGNEDID with the internal LiveCycle ID of the user who was originally assigned this form. I have no idea whether this is used for anything, or why it might be useful to either you or LiveCycle.
  • Finally, once you submit via email, Reader will set the AWS_STATUS field from ” ” to “Submitted”. Once this field has the “Submitted” value, you will not be able to submit the form again. This simply prevents duplicate submissions being accidentally emailed.

Summary

While there’s quite a bit of logic associated with these fields, both within the form and with the LiveCycle server, you don’t really need to know how it all works. Just drop the fields into your form, and LiveCycle takes care of the rest. It is helpful, however, to know how this works, so that you can tweak the behaviour if necessary.

Advertisements

7 Comments »

  1. Great article. Also note there is a problem around Signatures in ES Update 1 if you are routing the form using email. In that case you can only submit XDP data back to the process over email, not the signed PDF itself. We’ve fixed that in ES2.

    Comment by Gary Gilchrist — March 1, 2009 @ 2:27 pm

  2. I love it. Thank you Howard!

    Comment by Elaine Schmitz — March 2, 2009 @ 5:27 am

  3. Just how did you learn all of this stuff? And how long did it take until you felt proficient using the product?

    Comment by Elaine Schmitz — March 2, 2009 @ 5:29 am

    • Hi Elaine
      Actually, it’s not so hard to work this particular bit out. You can work out most of if from the Javascript code under the button, and infer or test to work out the rest.
      The problem with LiveCycle isn’t so much that it’s very difficult (although there ARE some difficult bits, I admit), it’s more that there’s just so much of it.
      I know it probably feels overwhelming, but it doesn’t take too long before you get your head around at least the bits that you need to know.
      It always helps to learn from others though, which is why engaging an experienced Adobe partner for at least your first project can cut out a lot of the frustration and learning curve.
      I’m not a good example, because I’ve been using LiveCycle (in various incarnations) for many years. But most of our new developers feel “proficient” in a month or two. It’s a bit like Microsoft Word – even after using it for years, I pretty regularly find some way of doing something that I’ve never seen before – there’s just so much of it, most of us just get comfortable with the 40 or 50% of it that we need to do our work.
      Rambling…
      Keep at it, it will start making sense…
      howard

      Comment by htreisman — March 2, 2009 @ 9:22 pm

  4. Hi

    Im trying to follow the “First Application tutorial” in Adobe LiveCycle ES2, but im stuck in the step “Creating a process using WorkBench” because the option “When a user submits a task in Workspace” is disabled. I can’t figure out what im doing wrong or if i have to install additional components … please any help will be very appreciate

    Comment by Mario — February 1, 2011 @ 11:21 pm

    • I suggest you post this question on the appropriate Adobe forum.

      Comment by htreisman — February 2, 2011 @ 8:06 am

  5. Hi,

    Im trying to follow the “First Application tutorial” in Adobe LiveCycle ES2, but im stuck in the step “Creating a process using WorkBench” because the option “When a user submits a task in Workspace” is disabled. I can’t figure out what im doing wrong or if i have to install additional components … please any help will be very appreciate.

    Thanks in advance

    Comment by Mario — February 1, 2011 @ 11:25 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: