cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
653
Views
0
Helpful
2
Replies

UCCX 8 file paths for using java methods

midwestmurph
Level 1
Level 1

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


2 Replies 2

Jonathan Schulenberg
Hall of Fame
Hall of Fame

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.

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.