01-22-2014 03:19 PM - edited 03-14-2019 12:59 PM
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
Solved! Go to Solution.
01-24-2014 09:08 AM
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.
Document status_document = DOC[status.txt]
String current_status = ""
String trigger_type = ""
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
Document status_document = DOC[status.txt]
String status_filename = "status.txt"
String caller_input = ""
String current_status = ""
User repo_user = USER[uccxadmin]
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
02-06-2014 09:18 PM
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.
01-24-2014 09:08 AM
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.
Document status_document = DOC[status.txt]
String current_status = ""
String trigger_type = ""
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
Document status_document = DOC[status.txt]
String status_filename = "status.txt"
String caller_input = ""
String current_status = ""
User repo_user = USER[uccxadmin]
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
02-06-2014 03:50 PM
Thanks Anthany, I have created the script, but I get Upload Document Unsuccessful. Where do I look to see where I am failing?
02-06-2014 09:18 PM
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.
02-07-2014 07:16 AM
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!
02-07-2014 07:30 AM
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.
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