06-29-2012 05:14 PM - edited 03-14-2019 10:08 AM
UCCX 8.0.2SU4
I am trying to use java methods to read an xml file out of the Document repository. I was able to do this in UCCX 7 and prior, but in 8 it seems i need a different file path syntax for the 'java.io.file' variable.
Example:
I would like to do the following:
javaDoc = new java.io.File(/opt/cisco/uccx/Documents/User/default/mydoc.xml)
doesFileExist = javaDoc.exists()
I am not having success with these steps, as the result is always false, even though the file does exist.
any help is appreciated.
thanks,
Mike
06-29-2012 06:37 PM
Your access to the file system is severly restricted. There are security measures in place that only allow you access to the "customer directory". You'll want to use a Create XML Document step to retrieve a file from the document repository using the DOC[/folder/file.xml] syntax. Note the root (i.e. the first forward slash) is the root of the document repository as seen in the /appadmin UI.
Please remember to rate helpful responses and identify helpful or correct answers.
07-01-2012 06:05 PM
The two best ways I've found to do this in a script are:
1. Cache part or all of the document using the Cache Document step and handle the DocumentNotFoundException
2. Convert the Document to a String using the set step and handle the ExpressionEvaluationException
Anthony Holloway
Please use the star ratings to help drive great content to the top of searches.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide