Getting Attachments into a Document Form

Avatar

Avatar
Validate 1
Level 3
JoshDBoyle-DVzR
Level 3

Likes

2 likes

Total Posts

94 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 3
JoshDBoyle-DVzR
Level 3

Likes

2 likes

Total Posts

94 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
JoshDBoyle-DVzR
Level 3

19-11-2008

All



I am in need of a way to get various files into a Document Form as attachments. I have a list of documents which contains the files I want to attach and a means to convert this list to a map if necessary.



I am aware of the invokeDDX service but am unable to get it to work. Could somebody please clarify for me how to go getting these files into the Document Form as attachments?

Replies

Avatar

Avatar
Validate 1
Level 3
JoshDBoyle-DVzR
Level 3

Likes

2 likes

Total Posts

94 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 3
JoshDBoyle-DVzR
Level 3

Likes

2 likes

Total Posts

94 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
JoshDBoyle-DVzR
Level 3

19-11-2008

Here is the DDX I have created within my workflow:









However, invokeDDX errors out stating that the DDX "did not pass validation against the specification".

Would someone be so kind as to clarify what this means and what is wrong with the DDX above?

Test.PDF is the name of the first attachment
Remaining Bugs.txt is the name of the second attachment
SAPTransport.pdf is the name of the PDF document I want to put the above two attachments in
AfterAttachments.pdf is an arbitrary name for the resultant document.

Avatar

Avatar
Coach
Level 10
Jasmin_Charbonn
Level 10

Likes

149 likes

Total Posts

2,154 posts

Correct reply

97 solutions
Top badges earned
Coach
Give Back 1000
Give back 900
Give Back 800
Give back 600
View profile

Avatar
Coach
Level 10
Jasmin_Charbonn
Level 10

Likes

149 likes

Total Posts

2,154 posts

Correct reply

97 solutions
Top badges earned
Coach
Give Back 1000
Give back 900
Give Back 800
Give back 600
View profile
Jasmin_Charbonn
Level 10

20-11-2008

I believe the FileAttachments tags also requires a File node.

This is an example coming from the documentation:






What this file does





Jasmin

Avatar

Avatar
Level 1
Srujan81
Level 1

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
Srujan81
Level 1

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
View profile
Srujan81
Level 1

22-02-2013

I have same type of problem can you tell me the solution?

Srujan

Avatar

Avatar
Validate 1
Level 5
yodadobe
Level 5

Likes

12 likes

Total Posts

298 posts

Correct reply

10 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 5
yodadobe
Level 5

Likes

12 likes

Total Posts

298 posts

Correct reply

10 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
yodadobe
Level 5

25-02-2013

Here is my execute script code to convert a list of attachments to a map of attachments which you can then pass to a Render step:

import java.util.HashMap;

import java.util.List;

import java.util.Map;

import java.util.Iterator;

import com.adobe.idp.Document;

List attachmentList = patExecContext.getProcessDataListValue("/process_data/lsAttachments");

Map attachmentMap = new HashMap();

Iterator it = attachmentList.iterator();

while(it.hasNext()){

          Document attDoc = (Document) it.next();

          String name = (String) attDoc.getAttribute("name");

          attachmentMap.put(name, attDoc);

}

patExecContext.setProcessDataMapValue("/process_data/mapAttachments",attachmentMap);

attachmentList.clear();

patExecContext.setProcessDataListValue("/process_data/lsAttachments", attachmentList);

Avatar

Avatar
Validate 1
Level 2
Don400
Level 2

Likes

2 likes

Total Posts

44 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
Don400
Level 2

Likes

2 likes

Total Posts

44 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
Don400
Level 2

21-03-2013

I have an archive file with three processes that take a map of documents and converts it to a portfolio (the map keys are the document names).  One of the processes builds the DDX file from the map keys and an input variable for the portfolio name.  I don't know where to post it but send me an email and I'll attach it to my reply.

Avatar

Avatar
Validate 1
Level 2
Don400
Level 2

Likes

2 likes

Total Posts

44 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
Don400
Level 2

Likes

2 likes

Total Posts

44 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
Don400
Level 2

24-05-2013

Steve, where do you put adobe-livecycle-client.jar in you app server?  I tried putting it in LC_HOME\jboss\server\lc_turnkey\lib and get a java.lang.LinkageError.  See this discussion thread for stack traces.

Avatar

Avatar
Validate 1
Level 1
8_BIT_PLATOON
Level 1

Like

1 like

Total Posts

16 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
8_BIT_PLATOON
Level 1

Like

1 like

Total Posts

16 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
8_BIT_PLATOON
Level 1

27-05-2013

So I assume you have LC Forms then:

Then simply use the LC Forms RenderForm component (check the "ALL" properties), one of them is an attachment list/map.

You sorted

Have fun.

Luigi

Avatar

Avatar
Validate 1
Level 2
Don400
Level 2

Likes

2 likes

Total Posts

44 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
Don400
Level 2

Likes

2 likes

Total Posts

44 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
Don400
Level 2

29-05-2013

When I do that LC throws an exception the gist of which is the following:

Caused by: ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException: Cannot coerce object: {...} of type: java.util.HashMap to type: class com.adobe.idp.Document

Avatar

Avatar
Validate 1
Level 1
8_BIT_PLATOON
Level 1

Like

1 like

Total Posts

16 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
8_BIT_PLATOON
Level 1

Like

1 like

Total Posts

16 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
8_BIT_PLATOON
Level 1

29-05-2013

I can't remember if it is a map or list.... that is required in the input, however... you can see that...

but make sure the sub-type of the attachment/map is a "document" type.

when i get back onto workbench... i'll give full full details....