Expand my Community achievements bar.

Access to component parameters

Avatar

Former Community Member
How do I access component parameters?



For example, I have a simple workflow that converts tif files to PDF using a watched folder.



It works fine, but I want to log the name of the file. I can do the logging (using a custom component and log4j) but I don't know how to access the name of the file that is being converted.



In general, how do you access component parameters from a custom component?



Thank you,



Alvin Pearson
4 Replies

Avatar

Level 10
If you tiff is stored in a document varible you can use the following xPath to get the file name associated with it :



getDocAttribute(/process_data/@inputDocument, "file").



"In general, how do you access component parameters from a custom component? "



I'm not sure exactly what you mean here.



Jasmin

Avatar

Former Community Member
I think the correct way to get the document name is

getDocAttribute(/process_data/@inputDocument,"wsfilename")

Jasmine was missing the ws part!

Avatar

Level 10
I've been successfully using "file" and not "wsfilename".



I've never tries "wsfilename". It could very well work as well.



This also how they use it in the sample that ships with the product( usgin "file".



Jasmin

Avatar

Former Community Member
thanks

the getDocAttribute(/process_data/@inputDocument, "file").

worked