09-11-2010 09:55 PM - edited 03-14-2019 06:28 AM
For the last 5 years (and in IPCC3.x/4.x,UCCX/5.x/7.x) I've used the same basic subflow to read a XML document that contains holiday dates where the queue should be closed. I've re-used this script on 20+ client installs and it's always worked. The structure of the script allows you to pass the path and filename of the XML document as parameters to the subflow. (The document is in the repository)
I loaded this script in UCCX 8.0.2 recently and it crashed with a Java.IO error. It looked like it was trying to read the file system directly and not the repository. (In the Linux appliance model this kind of makes sense but why is the step trying to read the file system directly?)
So I open a TAC case (SR# 615243125) and TAC tells me that the method of using the Create File Document step is not supported anymore and that I should specify the filename directly in the Create XML Document step
The problem that I see (aside from having to edit all my scripts that use XML files) is that the Create XML Document step is looking for the input to be a type DOCUMENT and not a type STRING. This seems to imply that I have to hardcode the document in each script that I deploy for a customer. When it was a string it was easy to construct the full file path from parameters and pass to the subflow.
Questions to the group
#1 Am I missing something here?
#2 Do you assume that you'll be able to load a script that worked fine in UCCX 7 into UCCX 8 and that it should completely function when you're doing everything according to the step reference documentation.
#3 Cisco didn’t document this in any way that I can find.
#4 How can you use the Create XML Document step in a fashion that would let you construct the path of the file and the filename previously in the script so you could pass it to a subflow ? It would seem this functionality has been killed in UCCX 8
(Background)
Create File Document Step
The input filename is a STRING, could be an explicit path and filename in the repository or a variable that represents that path and string
The output of this step is a DOCUMENT to be used in the Create XML Document step
The string FILE_FullPathHolidayFiles references en_us\folderName\documentName.xml
The document was properly uploaded into the repository only, NOT trying to directly read c:\foo\blah…
The create XML document input can only be a type DOCUMENT
09-11-2010 10:55 PM
#1 Am I missing something here?
You are mixing two different issues together here.
#2 Do you assume that you'll be able to load a script that
worked fine in UCCX 7 into UCCX 8 and that it should completely
function when you're doing everything according to the step reference
documentation.
Assume nothing; read the documentation and attend one of the dozens of partner training sessions that CCBU put on advising of the upcoming changes.
#3 Cisco didn’t document this in any way that I can find.
You're right, I guess, on the Create File vs. XML Document step. AFAIK Cisco never wrote a notice into the Step Reference Guide explicitly stating that you cannot use the Create File Document although the documentation seemed pretty clear to me without it. File system restrictions are documented in the 8.0 release notes.
Scripting and Development Series: Volume 2, Editor Step Reference
Use the Create XML Document step to create a logical document that maps a document to another document variable (where the document has already been pre-parsed as an XML document and is ready to be accessed by the Get XML Document Data step).
Use this step before the Get XML Document Data step to obtain data from a document formatted using the Extensible Markup Language (XML).
#4 How can you use the Create XML Document step in a fashion that would
let you construct the path of the file and the filename previously in
the script so you could pass it to a subflow ? It would seem this functionality has been killed in UCCX 8
No it hasn't; just concatinate a string to build the Source Document parameter the step needs. Example: "DOC[" + myFilePath + "]"
09-12-2010 06:34 PM
Perphas my confusion stems from the fact that I thought starting in IPCC 4.x all scripts, documents and prompts were to be stored (and I assume read from) the repository. Following that assumption I thought the Create File Document step was reading the repository. Is this not correct ?
If it was always actually reading the physical filesystem all along then the error I got and your explanation makes perfect sense.
Somewhere in the past, cisco's example scripts used this 2-step method to read/write a XML file. I just kept using it.
I wonder if anyone else might run into this issue
09-13-2010 01:41 AM
Hi
Yep, the Create File Document will read disk files; there are some dodgy example scripts out there that don't show you the best way of doing it. There's a note in the step reference:
The Create File Document step (a Document step) is exactly equivalent in functionality to using the FILE[filename] expression form for a Document.
So FILE[xxxx] = disk file, DOC[xxxx] = repository file.
Which is the directory on UCCX8.0 that we should use for these temporary disk files? Anyone know what the logic is that decides when it's cleared up and so on?
Aaron
09-13-2010 03:58 AM
You have to use the System.getProperty(“uccx.customer.dir”) method to get the value. There is a note hidden under the Write Document Step within the Step Reference Guide.
09-13-2010 05:37 AM
Ah, thanks... failed to read that bit :-)
Aaron
01-06-2011 11:49 AM
Does anyone have a sample script to show how to properly use this step?
08-13-2012 08:07 AM
I too would appreciate an example of how to use this step.
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