cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3670
Views
0
Helpful
5
Replies

unable to save XML file

Neal haas
Level 3
Level 3

I am trying to upload a XML file to UCCX 9.X (standard Lic).

I get an error emergency_template.xml (No such file or directory) when trying to write the document.

could I get a pointer for my erro?

Thank you

2 Accepted Solutions

Accepted Solutions

Anthony Holloway
Cisco Employee
Cisco Employee

I would like to add another perspective here.

You don't need to use an XML document (two documents for that matter: the real one and the template one) and the steps associated with them: Create XML Document, Get XML Document Data, and Keyword Transform, all just to store a simple value.

Simply use a plain text file which has the "Code" in it.  Read it when you need to evaluate it, and overwrite it when you need to change it.

Solution:  Keep in mind that this example is a minimally designed script; you would need to provide all of the user comforts and error checking.

Script 1 - The auto attendant script that reads the value

Variables

Document status_document = DOC[status.txt]
String current_status = ""
String trigger_type = ""

Script

Start
/* Bonus logic to help you with Active Debugging */
trigger_type = Get Trigger Info (Type)
If (! "Remote Debugging Trigger".equals(trigger_type))
  True
    Accept (--Triggering Contact--)
    Play Prompt (--Triggering Contact--, P[greeting])
  False
Check Status Override:
Set current_status = status_document
Switch String (current_status)
  *71 - Forced Open
    Goto Open
  *72 - Forced Closed
    Goto Closed
  Default
Check Business Hours:
Day of Week
  Monday - Friday
    Time of Day
      Open
        Goto Open
      Closed
        Goto Closed
  Saturday & Sunday
    Goto Closed
Open:
/* Your normal open hours logic goes here */
Closed:
/* Your normal closed hours logic goes here */
End

Script 2 - The management script that manages the value

Variables

Document status_document = DOC[status.txt]
String status_filename = "status.txt"
String caller_input = ""
String current_status = ""
User repo_user = USER[uccxadmin]

Script

Start
Accept (--Triggering Contact--)
/* See this post on masking passwords in scripts: https://supportforums.cisco.com/docs/DOC-35433 */
Authenticate User Password (repo_user, "******")
  Successful
  Unsuccessful
    End
Read Current Status:
Set current_status = status_document
Play Prompt (--Triggering Contact--, P[current_status_is])
Switch String (current_status)
  *71 - Forced Open
    Play Prompt (--Triggering Contact--, P[forced_open])
  *72 - Forced Closed
    Play Prompt (--Triggering Contact--, P[forced_closed])
  Default
    /* Any other value, to include "70" will be considered normal */
    Play Prompt (--Triggering Contact--, P[normal])
Ask for an Update:
caller_input = Get Digit String (--Triggering Contact--, P[update_status])
  Successful
  Timeout
  Unsuccessful
/* We will simply repeat the loop if nothing was entered at all */
If (caller_input == "")
  True
    Goto Read Current Status
  False
/* We can blindly accept what the caller entered because we default unknown values to normal */
Set current_status = caller_input
Upload Changes:
/* Used the default language here, because if a department is closed, it's likely for all languages */
Upload Document (TEXT[current_status] to L[], status_filename)
  Successful
    /* If you read the document immediately, it may not have changed yet, so delay a little */
    Delay (3 sec)
  Unsuccessful
    End
Goto Read Current Status
End

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

EDIT: logic fix in the aa script

View solution in original post

It's possible your repo_user account is not correct.  I was using uccxadmin as an example.  Please double check your username and then the PIN or password you are using in the Authenticate User Step.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

View solution in original post

5 Replies 5

Anthony Holloway
Cisco Employee
Cisco Employee

I would like to add another perspective here.

You don't need to use an XML document (two documents for that matter: the real one and the template one) and the steps associated with them: Create XML Document, Get XML Document Data, and Keyword Transform, all just to store a simple value.

Simply use a plain text file which has the "Code" in it.  Read it when you need to evaluate it, and overwrite it when you need to change it.

Solution:  Keep in mind that this example is a minimally designed script; you would need to provide all of the user comforts and error checking.

Script 1 - The auto attendant script that reads the value

Variables

Document status_document = DOC[status.txt]
String current_status = ""
String trigger_type = ""

Script

Start
/* Bonus logic to help you with Active Debugging */
trigger_type = Get Trigger Info (Type)
If (! "Remote Debugging Trigger".equals(trigger_type))
  True
    Accept (--Triggering Contact--)
    Play Prompt (--Triggering Contact--, P[greeting])
  False
Check Status Override:
Set current_status = status_document
Switch String (current_status)
  *71 - Forced Open
    Goto Open
  *72 - Forced Closed
    Goto Closed
  Default
Check Business Hours:
Day of Week
  Monday - Friday
    Time of Day
      Open
        Goto Open
      Closed
        Goto Closed
  Saturday & Sunday
    Goto Closed
Open:
/* Your normal open hours logic goes here */
Closed:
/* Your normal closed hours logic goes here */
End

Script 2 - The management script that manages the value

Variables

Document status_document = DOC[status.txt]
String status_filename = "status.txt"
String caller_input = ""
String current_status = ""
User repo_user = USER[uccxadmin]

Script

Start
Accept (--Triggering Contact--)
/* See this post on masking passwords in scripts: https://supportforums.cisco.com/docs/DOC-35433 */
Authenticate User Password (repo_user, "******")
  Successful
  Unsuccessful
    End
Read Current Status:
Set current_status = status_document
Play Prompt (--Triggering Contact--, P[current_status_is])
Switch String (current_status)
  *71 - Forced Open
    Play Prompt (--Triggering Contact--, P[forced_open])
  *72 - Forced Closed
    Play Prompt (--Triggering Contact--, P[forced_closed])
  Default
    /* Any other value, to include "70" will be considered normal */
    Play Prompt (--Triggering Contact--, P[normal])
Ask for an Update:
caller_input = Get Digit String (--Triggering Contact--, P[update_status])
  Successful
  Timeout
  Unsuccessful
/* We will simply repeat the loop if nothing was entered at all */
If (caller_input == "")
  True
    Goto Read Current Status
  False
/* We can blindly accept what the caller entered because we default unknown values to normal */
Set current_status = caller_input
Upload Changes:
/* Used the default language here, because if a department is closed, it's likely for all languages */
Upload Document (TEXT[current_status] to L[], status_filename)
  Successful
    /* If you read the document immediately, it may not have changed yet, so delay a little */
    Delay (3 sec)
  Unsuccessful
    End
Goto Read Current Status
End

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

EDIT: logic fix in the aa script

Thanks Anthany, I have created the script, but I get Upload Document Unsuccessful. Where do I look to see where I am failing?

Capture.PNG

It's possible your repo_user account is not correct.  I was using uccxadmin as an example.  Please double check your username and then the PIN or password you are using in the Authenticate User Step.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

You are correct! once I put a couple of delays in I found my error(s?). All is working correctly now. Thank you for your help!

Cool.  I'm glad you were able to get your solution working.  Until next time...

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

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: