Pinned topic Getting process instance attached document name for document of type File
Nothing to retrieve the file name.
I thought maybe it was because a document can have several versions, each potentially updated from a different file, but when I narrow on a particular version (e.g. tw.system.currentProcessInstance.documents.allVersions.uri) , TWDocument.uri still returns null.
Is anyone aware of this limitation or am I going about this the wrong way?
kolban 10000004463315 PostsACCEPTED ANSWER
Re: Getting process instance attached document name for document of type File2012-06-25T15:30:28Z in response to GoldflakeUnfortunately, the TWDocument API is not properly documented in the InfoCenter. I did find this legacy piece of info:
At first I though "oooh" the "name" attribute will give me the original document file name ... sadly not It appears that the "name" attribute corresponds to the user entered "title" attribute in the document attachment widget.
On a new note ... as I start to study the v8 product, I get the distinct impression that the whole notion of the IBM BPM managed documents is desired to be a thing of the past. What I see in v8 is a lot of support for CMIS to interact with arbitrary ECM systems.
Re: Getting process instance attached document name for document of type File2012-06-26T07:41:35Z in response to SystemAdminHi there,
That is how my application dynamical generates links to our process instances attached documents:
hope you will find it helpful.
//build link to the first attached document in the array
//here comes the script from the attached file 'link.txt' above.
Re: Getting process instance attached document name for document of type File2012-06-26T11:42:49Z in response to SystemAdminHi Sason,
Could you please tell me how to use
tw.system.currentProcessInstance.findDocuments(docsPropMap,TWDocument.Types.File);. I could not exact information on the wiki site.
Here i am unable to get how to configure the first param , the Map type.
Re: Getting process instance attached document name for document of type File2012-06-27T06:14:06Z in response to GoldflakeHi,
The first argument in the "findDocuments" method is a map of your document attached properties.
This can be helpful in case you want to retrieve particular document
based on specific property it has.
Small review about those properties:
In the control you can 'color' each of your uploaded document with property and value.
You define those properties and their values in the table under "Upload Document" section
And later on, display those documents in another control based on those particular properties. (in the table Under "Display Documents" section)
Now for your configuration question,
In case you defined properties in the control attachment table , you need to init a map and add property/value according to your desired results, otherwise
I guess you need to pass an empty map.
I tested this method, only when I had to query instances, documents and their properties,
never tried to query with an empty map.
Hope that helped!
RohithBilla 270005JY5P27 PostsACCEPTED ANSWER
Re: Getting process instance attached document name for document of type File2015-02-17T16:47:03Z in response to Goldflake
Were you able to retrieve the documents using this functionality tw.system.currentProcessInstance.findDocuments(properties, searchType). If yes can you please explain the search type used and properties.