cancel
Showing results for 
Search instead for 
Did you mean: 

get the name of the file in the package in workflow

chys
Champ in-the-making
Champ in-the-making
Hello
   I want to know how to get the name or content of the file in the package in workflow.
   For example: In my review workflow,the review file is abc.txt in some space. My I access it in the workflow?

   Who can give me some suggestion? Thank you in advance!
3 REPLIES 3

rob562435
Champ in-the-making
Champ in-the-making
Try:
bpm_package.children[0]
After initialisation this contains the reference to the initial file. Via
bpm_package.children[0].properties["<any property name>"]
the various properties can be accessed.
bpm_package.children[0].parent
should contain a reference to the space the file is stored in.

davidc
Star Contributor
Star Contributor
For the full javascript api see

http://wiki.alfresco.com/wiki/JavaScript_API

You can use…

bpm_package.children[0].name;

chys
Champ in-the-making
Champ in-the-making
OK,Thank you very much! I will try it.