I'm a novice at scripting and have to edit an advance (for me) script for uccx version 8 and was wondering if anyone had an example script for an emergency script that would edit a status.xml file (changing the text from "open" to"closed for emrgency")? Thank you in advance!!!!
Ya I've checked different discussions but having had much luck getting the .xml file "status.xml" to change its text from open to emergency. I've attached the script I've come up with and am most likely missing something since I'm new to .xml file's and scripting. I ran the interactive debug and it flows through the script with no errors and seems like the .xml file should be getting updated but it doesn't. If anyone can point me in the right direction it would be greatly appreciated..
I'm presuming here that your emergency status reads OK?
You have two vars 'Emergency' and 'updateStatus' that have the filename prefixed with / . I wouldn't normally do that - just the filename will be fine if the files are in the root of your language folder.
Also you seem to have gone astray at the point where you upload the doc - under the 'false' branch of (stat_null == "emergency") you have set 'stat' to the contents of the Emergency doc. Then on the upload step you have 'Name' set to stat_null, which is a string variable you used to read the original string value from the XML doc. At this point in the script this will just equate to "open". What you want here is the name of the file to upload to, e.g. "status.xml" (in quotes just like that) so that the next run of the script will load the newly uploaded file.
In the (stat_null == "emergency") 'true' branch, you have the XML document you read written directly to a file of "status.xml". This is wrong in lots of ways so you want to mirror what you have done in the 'false' branch above.
Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!
Thanks Aaron! Sorry I forgot to mention that I've only been trying to get the (stat_null == "emergency") 'false' branch working for now. Once I get that working I'll fix/update the 'true' branch as well. I've completely gone astray testing all kinds of things to get things to work..lol I'll do what you say above and see if it works. I also came across a bug and was wondering if I'm hitting it here? I'm running version 8.5 SU2 but am going to try upgrading to SU3 to see if it fix's this potential bug. The bug ID/info is below:
UCCX: XML document upload fails with "Cannot insert a null into column"
I've updated the script to reflect what you recommended above and validated/debugged the script which hit all the steps and validates fine however the status.xml file still has a value of "open". Next I'll try that upgrade to see if that works and will post the results..
Thanks Aaron, sure enough it was that bug. I upgraded to SU3 and it now works fine. And here I thought I was a rookie at this scripting stuff, oh wait I am But that was a really good learning experience...
Are you getting this error “Installer User Interface Mode Not Supported. The installer cannot run in this UI mode. To specify the interface mode, use the -i command-line option, followed by the UI mode identifier. The value UI mode identifiers...
The below trick might come handy when you have to add a new node to a cluster but you don't have or is unsure of the security password for the publisher. This procedure has been around for ages.
1) Login into the CLI of the Publisher.