You can use an execute" operation (from the Set Value service) with the "getDocAttribute(com.adobe.idp.Document, String)" function (part of the Document functions available from the xPath builder UI.
Thanks for your reaction but method getDocAttribute(/process_data/@testDocument, "wsfilename") returns empty string in this case due to missing "wsfilename" attribute. The "getTaskAttachments" component can't get appropriate document attributes unfortunately.
Does anybody have another idea?
I faced the same situation some time back and this is what I know.
Based on the file type few of the attributes will or will not be populated. (This is what the official documentation says about Document attributes)
The file name that you are looking for would mostly be in 'name' attribute of Document object. The 'wsfilename' attribute is the atrribute which gets used to show the file name into Attachments tab of the workspace.
So, if you are just interested in knowing the filenames then 'name' attribute is the place that you are looking for.
But if you are trying to solve an issue in which Attachments against a Task isn't showing the filenames properly then you would need to copy the 'name' attribute value into 'wsfilename' attribute and then the Attachmetns against a Task would have the correct names.
Tip: Use the Record and Playback option of the workbench to inspect the Document variable and you would see all of the values for a Document variable at desired step in your orchestration.
hope this helps,