cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2473
Views
11
Helpful
7
Replies

Emergency Script for uccx version 8

bmcghee
Level 1
Level 1

Hi All!

    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!!!!             

7 Replies 7

brian1mcc
Level 4
Level 4

This has been discussed several times here.

Check out this thread .. https://supportforums.cisco.com/message/3473481#3473481 It has some sample scripts that you can use.

Brian

Thanks for the reply Brian!

   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..

Thanks again!!! 

Hi

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.

Regards

Aaron

Aaron 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:

 

 

 

CSCtt28877

2

UCCX: XML document upload fails with "Cannot insert a null into column"

Thank you.....

Hi Aaron!

   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 again!!

Hi

Yes, if the script is correct and it doesn't upload that one is very common (i.e. it always fails to upload on that version).

There was a specific patch issued very soon after the release to address that problem.

You'll only be able to tell by checking the MIVR log for EXCEPTION blocks at the time the upload is attempted.

Aaron

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

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...

Thanks again for the replys!!!