Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

File name issue when passing it from LiveCycle process to flex


Level 2

Hi all.

I have a LC process which returns a document. For test purposes its name just hardcoded into process. I want to create a flex application that shows a window im browser with open/save buttons for that file. All works great but an original name of the file changes to something strange for unobvious (for me) reasons.

Result of executing process at Workbench. At this point all seems to be good.


A flex function that gets a document. All works absolutely similar to this example.

private function resultHandler(event:ResultEvent):void { 

                   var res:Object = event.result;

                   var docRef:DocumentReference = res["OutDoc"] as DocumentReference;

                                        var urlRequest:URLRequest = new URLRequest(docRef.url);



The result of invoking this is a next window:


If I press open button, file opens perfectly. File extension always passes well (I tested .xlsx and .txt). But I don't know what happens with its name. It always different even if I just run my application two times in row without any modifications. I tried to set it manually by passing the name separately in another variable but didn't find any suitable methods or fields in DocumentReference class. I almost sure that solution is very easy but still didn't find it.

Any ideas?

2 Replies


Level 10

LiveCycle stores the document variables into GDS (global document storage). The filename on the GDS is what you are seeing in the result.

You can assign file name to a document variable by using setDocAttribute(com.adobe.idp.Document, att_name, att_value) method.

Add a SetValue activity within your process and set the following assignment.

outDoc = setDocAttribute(outDoc,"wsfilename","YourFileName.XLSX")

That should work as you expected.




Level 2

Greetings, Nith. First of all, thanks for your response.

I tried to follow your idea and added SetValue activity in my process. It works but works only when I invoke my process directly in Workbench. When I try invoke it through flex application I still get a strange file names as in GDS.