Expand my Community achievements bar.

How Do I pre-populate the Process ID to a text field in my XDP form?

Avatar

Level 2

It is currently null.

3-30-2010 5-21-49 PM.png

17 Replies

Avatar

Level 10

Is this for the initial load of the form or after it's been submitted?

Jasmin

Avatar

Level 10

Action profiles:

1.Prepare Data Process

2.Render Form Process

3. Submit Process

The 1st action profile is helps you to prepopulate the form data.

Create a new Prepare data process and modify it.

1. Goto manage action profiles

2. Click on create new prepare data process

3. Your new process will have an output variable named xmlPrepareData with your forms schema. Locate your process id field and assign the value.

Note: the Process Id is available in the taskContext object.

Nith

Avatar

Level 2

It is for the initial load of the form. I have a custom renderer that

already picks up the username, but can't seem to be able to get the Process

ID.

Avatar

Level 2

Can you clarify? I can't find anything called action profiles in workbench.

Avatar

Level 10

Click on your Workspace start point and go in the Presentation and Data section.

Jasmin

Avatar

Level 2

"Workspace starting point"? I am not seeing what you are talking about. I don't see anything thart says presentation or data in workspace. Besides, what does the worspace have to do with finding the ProcessID of a workflow and populating the processID field in my XDP?

Sorry if I'm missing something.

Avatar

Level 10

Which version of LiveCycle you are using? ES or ES2?

Nith

Avatar

Level 10

Jasmin & myself are presuming that you are using LiveCycle ES2 9.0   Sorry for the confusion.

In LC 8.2 you won't have the action profiles.

However, the systems works like this:

1. First time when a user opens the form, a Task will be created with a unique task id.

2. If the user submits the form, a process will be created with a process id.

You can't obtain any process id until you submit the form. Hence it is not possible to pre-populate the form with process id on render service.

Make sense?

Nith

Avatar

Level 2

Yes, thank you. I guess I will insert it after the process is kicked off.

On a related note: Is there a way to add the completed date to a field on

the form when the process is closed? My team needs to print out and file the

final form which has to include the Process ID and the completed date & time

stamp on it.

Avatar

Level 10

Do the following to set the process completed date:

1. Add a SetValue activity as last component of your workflow.

2. Assign the current datetime to your completed date field.

The following function will set the value in the format "12-Mar-2010 11:45 AM"

format-dateTime-withFormat(current-dateTime(),"dd-MMM-yyyy hh:mm a")

Hope this may help you!

Nith

Avatar

Level 2

Nith ~ Thanks for this, but I need the completed date to show on the actual form when I'm looking at it in the "workspace > tracking XXXX ID > Audit" (screenshot attached). I added the SetValue activity, but it does not populate the form in the tracking. Any other suggestions?

4-5-2010 10-01-12 AM.png

Avatar

Level 10

Can you share your XPATH to populate the date on the form?

I expect some syntax error in your xpath.

Nith

Avatar

Level 2

No errror. I can populate the date in the field, but not AFTER the user has approved/closed the process.

Basically, I want the completed date to populate at the end of the process, but it doesn't, even with a SetValue at the end of the process.

Avatar

Level 10

This is weird. Are you sure that the process id is there and only the date is not?

Play the process recording and make sure that your last activity is executing at the end.

If nothing works, could you share me your workflow?

Nith

Avatar

Level 2

Recorded it and data passed in the xml (<completedDate>2010-04-08T18:20:30Z</completedDate>), but not into the form.

Avatar

Level 10

I think you are using a custom prepare data process which clears this value. Record the prepare data & render process and try the xml value just before rendering the form.

If nothing works out, could you send me a simple workflow archive to look into the code?

Nith