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.

Using attachment list as both input and output in UserServiceV2/AssignTask duplicates attachments

Avatar

Level 2

Hi,

If I want to pass prior attachments to a user using v2 of  AssignTask I can pass in a list of documents (I'm calling it  attachmentList) in the Attachments tab. If I set Output Attachments to  the same variable, I get any new attachments the 2nd user may have  added, but the first user's attachments are now duplicated. If the  process is repeated, I'll have triplicates from user 1 and duplicates  from user 2.

What is the proper way to go about showing all  prior attachments to a new workspace user while allowing them to add to  the list, without this happening?

4 Replies

Avatar

Level 10

use the following XPATH expression in the output attach

ments variable

/process_data/attachmentsList[1]

This will prevent duplicating your existing attachments.

Avatar

Level 2

This solution is not working for me with LiveCycle ES3

Approver 1

----------------------

Custom Container

Attachments Tab >

Input List :  attachList                                                [ datatype List <document> ]

Output attachments:   /process_data/attachList[1]         [ xpath expression ]

  

Approver 2

----------------

Custom Container

Attachments Tab :

Input List : attachList

Output attachments: /process_data/attachList[1]

Approver 3

----------------

Custom Container

Attachments Tab :

Input List : attachList

Output attachments: /process_data/attachList[1]

-----------------------------------------------------------------------------------------------------------------------------------------

When approver 3 looks at the attachments any attachments added by Approver 1 are duplicated.

This duplication multiplies (eg approver 2 attachments duplicated and approver 1 attachments triplicated at Approver 4)  as the form is passed form task to task.

Any other settings I need to look at ?  Any other solutions out there ?

thanks

Avatar

Level 10

The configuration looks fine. In ES2 version, it works correctly. I do not know why this problem occurs in ES3.

Nith

Avatar

Level 2

thanks nith,

I will replicate the process in ES2 and check the results....