cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6871
Views
18
Helpful
7
Replies

UCCX 8 - Dramatic change in the Create File Document step that is used by the Create XML Document step in order to read an XML file

bvanbenschoten
Level 5
Level 5

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…

CreateFileDoc.PNG

The create XML document input can only be a type DOCUMENT

CreateXMLDoc.PNG

7 Replies 7

Jonathan Schulenberg
Hall of Fame
Hall of Fame
#1 Am I missing something here?

You are mixing two different issues together here.

  1. The Create File Document step is indeed not needed or supported for creating an XML document. That is why there is a unique step; to trigger XML parsing within the MIVR subsystem.
  2. Accessing the file system is restricted to a single folder within the VOS model (i.e. 8.0+). This folder is not backed up, replicated, or cleaned up automatically. It was intended to give developers some FS access as a temporary swap location only.
#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 + "]"

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

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

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

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.

Ah, thanks... failed to read that bit :-)

Aaron

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

Does anyone have a sample script to show how to properly use this step?

I too would appreciate an example of how to use this step.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: