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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

unable to save XML file

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

Everyone's tags (3)
2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: unable to save XML file

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

Anthony Holloway

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

unable to save XML file

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.

Anthony Holloway

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

Re: unable to save XML file

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

Anthony Holloway

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

unable to save XML file

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

unable to save XML file

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.

Anthony Holloway

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

unable to save XML file

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!

unable to save XML file

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.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
1018
Views
0
Helpful
5
Replies