Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Parallel Approvals -- How to send Input to Data preparation process

Avatar

Former Community Member

Hello,

I have created a parallel process with using gateways to send a form through 8 concurrent approvals; the problem is that the form only gets updated with the formdata of the quickest completed route; so ultimately data is lost from some branches when the gateway closes. (Rather than acting more so like a database where fields are locked while in use and updated with no data lost).

So I have looked into having each approval task (8 in total) use a custom action profile with a custom 'Data preparation process' which will run when a user opens the task and on the fly it will then load the latest form data (to minimize the risk of data loss; still not perfect though).  But in order to do this I need to be able to pass the form data into the 'Data Preparation Process'; how can I do this?

So to summarize, 1) how do I pass variables (such as formdata) into the data preparation process; and 2) is there a better approach for parallel approvals?

Thank you everyone.

3 Replies

Avatar

Level 10

Try any of the following options:

1. From within Prepare Data process, retrieve the latest form data from database and update the variable. This should overwrite the Task Data before it's rendered at workspace.

Table name: tb_form_data

2. Create 8 xml variables and assign them to each AssignTask activity. Before assigning copy the original form data to all 8 xml variables.

You will need to merge all the xml data once the gateway exits.

Nith

Avatar

Former Community Member

Nith,

Thank you for setting me in the right direction. 

How do I map the fields from the query into the xmlPrepareData output variable?

My query looks like this (so far):

a_screen.png

Then I map that `initformvariable` to the taskContext - @InputDocument variable (then pass that to xmlParepareData)

No luck on it working; where am I going wrong?

Avatar

Former Community Member

There is also a data field in this table but it is NULL for all records.  I'm led to believe that form data used to be stored here.

Just a thought, but as a different approach, is there a way to call variables from a parent process or basically get variables from any process as long as you know the processinstanceid?  This would solve all of the issues.