Expand my Community achievements bar.

SOLVED

Action Profile: Prepare Data Process help

Avatar

Level 4

Hi,

I was working with Prepare Data Process (in Action Profile) to get the Workspace Username. I have successfully done it.

I have many steps in my process in which task is being assigned to many users during its life. (Image below)

process.jpg

I have to mantain the users history in the form which goes through the process. Like below:

User 1 (Initiator):

1.jpg

User 2:

2.jpg

User 3:

3.jpg

I am doing this by using Set Value operation after every user submit the task (by Assigning the Current User Value to the respective text fields). But it is not working. May be because I am running the same Prepare Data Process for each user. So it is blanking out the History (Might be XML data for form is refreshing each time and old XML Value are erased) and only populating the current User details leaving the others blank.

I also used Temporary XML variable but still not working.

Please tell me how to get it done !!!

Thanks.

-

Abhinav

1 Accepted Solution

Avatar

Correct answer by
Level 10

Yes, since the prepare data process is short lived , it will get the default value of form variable (xmlPrepareData). Which means the empty form content.

The Task Context will have the form data, which use can use it in the prepare data process.

Here is the solution:

Add a SetValue activity as a first component in the Prepare Data process.

Location: /process_data/xmlPrepareData

Expression: /process_data/taskContext/object/@inputDocument

Hope this should work. Or you can send the LCA to nith.mof@gmail.com

Nith

View solution in original post

6 Replies

Avatar

Level 10

Are you setting the Initial Task Data on each user step with the XML variable that contains the updated data?

Jasmin

Avatar

Level 4

Hi Jasmin,

Yes, I am setting it at each step. I have created a single xml variable (xmlData) for my process and had set it for both Initial Task Data and Output Variable at each user step. Prepare Data Process runs for each user.

Thanks.

-

Abhinav

Avatar

Level 10

I have faced these requirements in many cases and were successfully done.

Can I see your form (scripts)? I feel there must be some logical coding issues.

Nith

Avatar

Level 4

Hi Nith,

Did you mean PDF Form scripts (JavaScript/FormCalc)? If so, currently I am not using any scripts inside my form.

I am trying to update the xmlData variable (xml variable that stores form data) using SetValue Operations.

process-detail.jpg

At each Assign User Operation I have also selected to run the Prepare Data Process when user opens task.

ass-user.jpg

I think this(above) is causing the problem. It is ruining out all the previous form data & only showing the values for CurrentUser Name & ID. I am in lurch & not getting the way to solve this. Please help.

I can share my projects lca file, but I don't find any way to attach file.

Thanks.

-

Abhinav

Avatar

Correct answer by
Level 10

Yes, since the prepare data process is short lived , it will get the default value of form variable (xmlPrepareData). Which means the empty form content.

The Task Context will have the form data, which use can use it in the prepare data process.

Here is the solution:

Add a SetValue activity as a first component in the Prepare Data process.

Location: /process_data/xmlPrepareData

Expression: /process_data/taskContext/object/@inputDocument

Hope this should work. Or you can send the LCA to nith.mof@gmail.com

Nith

Avatar

Level 4

Roger That Boss. It worked... !!

Thanks a lot.

-

Abhinav