Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

file not found error

i have just installed a uccx 9.1 server. I have used scripts from version 5. and adapted where neccesary.

the one issue i am having is with the following error

error.jpg

the file, is there. I have deleted it and

reinstalled it, i just leave it in the repository, there is not special directory.

The section i am having trouble with, the scenario, where the caller leaves a number that is to be used to divert the main number to an out of hours number.

My other scripts work ok, because they are xml get,create. this one is a file document, not sure if that is different.

When I run reactive script, I can see the variables get populated. i have removed the commands and recreated exactly the same as the old ones. still no luck. any help would be much appreciated. I have also attached the script.

Everyone's tags (3)
2 ACCEPTED SOLUTIONS

Accepted Solutions
VIP Super Bronze

file not found error

Oops! I totally misread you original post. Gergely is correct, you need the Upload Document step. Write document was for the file system, not the doc repo. Under Linux you are limited to a single folder that is intended for cacheing purposes only; it's not backed up or replicated inter-server.

Don't forget that you'll need to authenticate as a valid user (even if you do this transparently to the caller) before you can upload to the repo.

Please remember to rate helpful responses and identify helpful or correct answers.

Re: file not found error

Hi,

three things:

1. You didn't forget about the Get User step, did you - I assume it's there but it got cropped.

2. No need for the Create File Document step. It's for real I/O operations, which is not this case - I know, it might sound silly. One Set step with Set doc = DOC[filename.ext] would do. What your script does in this moment: references a file named "DOC[filename.ext]". Somewhere, on the filesystem. Such file does not exist.

3. It's very important to remember, that documents (and I/O operations too) are lazy loaded, or in Plain English, lazily executed. This means assigning DOC[filename.ext] to a variable does not mean that the value of the Document is assigned to the variable. It only creates a reference to the Document. You need to perform an operation that actually does something on the contents of the Document. The Keyword Transform Document step does, but for some strange reason, it reads the Document as a binary stream and then it does the transformation - of course, it will not transform anything, because of the internal representation of the binary stream in the UCCX script is - binary. Not String. Or text. Why? I don't know. It's kind of logical, though, a file is a binary stream, after all, regardless of being human-readable (like an XML) or not.

So before calling the Keyword Transform Document step, do the Create XML Document step. It will read the document in, not as a binary, but as a Text. And the Keyword Transform Document step will also work in this case. Too bad it works only for XML files, not text ones.

If you want to read in a Document from the Document Repository with a plain text content (not XML, not binary), then you might want to cast it into a String. Like this: Set doc = (String) DOC[filename.ext]. You are using XML, though, so you should be fine with the Create XML Document Step.

G.

14 REPLIES
VIP Super Bronze

Re: file not found error

Remove the leading forward slash so it reads DOC[divertdn_template.xml] and refresh the file (there is a button for this to the right of the filename in Doc Repo webpage) to ensure it syncs down to the disk.

Also, ensure that it's either in the Default folder or the contact language matches the folder it is in. This is set on the trigger.

Please remember to rate helpful responses and identify helpful or correct answers.

New Member

file not found error

Many thanks Jonathan, I just tried it and it still fails.  I removed the / as you recommended, also refreshed the doc.

I even rebooted the server. but still no luck. I have the file in eng_GB language, and the trigger is pointing to that language folder.

What I find interesting, is that when I run a reactive debug, and after the diverdntemplate - create doc etc etc. step.

I can see the variable is populated with the divertdn_template.xml file.  It is only at the write doc stage that the error comes up.

file not found error

Hi,

you may want to try the Upload Document step instead.

G.

New Member

file not found error

which step to replace? sorry have never used upload document before

file not found error

Hi,

the Write Document step.

You can use the Upload Document step like this:

G.

VIP Super Bronze

file not found error

Oops! I totally misread you original post. Gergely is correct, you need the Upload Document step. Write document was for the file system, not the doc repo. Under Linux you are limited to a single folder that is intended for cacheing purposes only; it's not backed up or replicated inter-server.

Don't forget that you'll need to authenticate as a valid user (even if you do this transparently to the caller) before you can upload to the repo.

Please remember to rate helpful responses and identify helpful or correct answers.

New Member

file not found error

Jonathan,Gergely

Thanks so much both of you, I have made some progress, couldn't have done it without your excellent help.

I know now, how to get authenticated and get the doc uploaded.

My only problem is that it doesn't update the file in question  (see Diagram)

from the Diagram, the Variable "doc" has been populated with a long piece of content after the "transform document" step is completed. Does that look right?

When I continue to upload doc step, I have a label for "successful" which should play a thank you prompt, so that I know it performed the required task. It doesn't hit that. When I check the xml doc at the end, it has stayed the same.

I am lost for what I am doing wrong. any Ideas?

Re: file not found error

Hi,

three things:

1. You didn't forget about the Get User step, did you - I assume it's there but it got cropped.

2. No need for the Create File Document step. It's for real I/O operations, which is not this case - I know, it might sound silly. One Set step with Set doc = DOC[filename.ext] would do. What your script does in this moment: references a file named "DOC[filename.ext]". Somewhere, on the filesystem. Such file does not exist.

3. It's very important to remember, that documents (and I/O operations too) are lazy loaded, or in Plain English, lazily executed. This means assigning DOC[filename.ext] to a variable does not mean that the value of the Document is assigned to the variable. It only creates a reference to the Document. You need to perform an operation that actually does something on the contents of the Document. The Keyword Transform Document step does, but for some strange reason, it reads the Document as a binary stream and then it does the transformation - of course, it will not transform anything, because of the internal representation of the binary stream in the UCCX script is - binary. Not String. Or text. Why? I don't know. It's kind of logical, though, a file is a binary stream, after all, regardless of being human-readable (like an XML) or not.

So before calling the Keyword Transform Document step, do the Create XML Document step. It will read the document in, not as a binary, but as a Text. And the Keyword Transform Document step will also work in this case. Too bad it works only for XML files, not text ones.

If you want to read in a Document from the Document Repository with a plain text content (not XML, not binary), then you might want to cast it into a String. Like this: Set doc = (String) DOC[filename.ext]. You are using XML, though, so you should be fine with the Create XML Document Step.

G.

New Member

Re: file not found error

Thanks Gergely,

I tried as you suggested, but still no joy. I have attached an updated copy of the script. At the end of the script after the label. "save divert number" Do I need to authenticate the user again for this step? This is where it writes the change to the file, so that it can be read next time.

When I do reactive debug, the variables for the transform doc step, are putting in a load of binary digts, which is how you described they would be. I am assuming my issue seems to be with upload doc step. further help would be much appreciated as I am going around in circles at the moment

Re: file not found error

Hi,

could you please make a screenshot of the script with the relevant steps expanded? I don't have a UCCX 9 system in my lab at this moment. Thanks.

G.

New Member

Re: file not found error

Hi Gergely, I have attached as requested. I have put in an annotation at the top "STARTS AT THIS POINT" for the first relevant step and then the other relevant part is the label near the bottom. "save divert number"

Re: file not found error

Hi,

about that Get User step: you don't need to use the USER[user] formula, it's perfectly enough to tell UCCX the user's ID (e.g. "dave").

Also, can you insert "dummy" steps (for instance, Label steps) to all orphaned exits, like the Successful and Unsuccessful branches of the Get User step in your script; and the Unsuccessful branches of the Authenticate User and the Upload Document steps. This is just to see which step returns an unexpected result.

Thanks.

G.

New Member

Re: file not found error

Hi Gergely,

I noticed that I had put in the wrong user I.D in the upload doc step. I now have all the success labels being hit, which indicates all is well. Unfortunately though, when I call in on the trigger number, it hasn't changed the status of the office from open to closed. in other words it hasn't amended either of the xml files. I did check the contents of the xml files, from uccx gui pages, and they still had old values, also the modified date and time was still from November, I would have expected these to change. So not sure why it is not writing to the file

New Member

Re: file not found error

Hi Gergely, I have managed to work it out. in the upload doc step. it was referencing DOC[divertdn.xml]. When I checked the Documents on the gui, it had created a file DOC[divertdn.xml]. Once I took out the DOC and the brackets, it worked perfectly. Thanks so much to yourself and Jonathan for all the help.

I still have to check a few other scripts, but I am hoping I can now get through those failry safely

452
Views
0
Helpful
14
Replies
CreatePlease to create content