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

UCCX Script step only works in Reactive Debug

Running UCCX 8.5 SU3 HA

I have a script in UCCX that makes a call to a Web Page so the Web Page can do some processing. I run a Create URL Document step and then a Create XML Document step.

My issue is that it is only working when I am Reactive Debugging. When I call the script without being in Reactive Debug it doesnt seem to make the call to the URL.

Ive turned up the UCCX tracing but cant see any errors in MIVR. I looked at the IIS logs (where the web page is that is being called) and I do not see the GET coming in when not Reactive Debugging. I do see it when I am Reactive Debugging.

I have verified that both UCCX servers are IN_SERVICE and I also verfied that my CRS Editor is connected to the MASTER. I have also re-uploaded the script several times and refreshed the application a few times. I also verified that I can ping the external IIS Web Server from the UCCX OS Administration page. I also up'ed the Timeout in the Create URL Step to 20000 to test it.

I attached a screen shot of my script... although I dont think the script is the issue since it works 100% of the time while in Reactive Debug but 0% of the time when not...

Any help or assistance in pointing in the right direcvtion would be greatly appreciated.

Thanks in advance!

Tom

2 ACCEPTED SOLUTIONS

Accepted Solutions

UCCX Script step only works in Reactive Debug

I was able to put together a quick test and I encountered exactly the same issue that you describe above.  When running through the debug or reactive debugging the application, the reqest was shown in the web server log.  However, when I placed a call without reactive debugging, it would not make the request.  I was able to get the request to work every time by adding the Set step after my CreateXMLDoc step.  Not sure why it works, but it does.  I've encountered this before and this is what I have used to resolve it in the past.  Hope this helps.

Ed

Re: UCCX Script step only works in Reactive Debug

For my specific UCCX version and environment, I have ran enough tests to know that:

1. If the URL is static, then the Editor preloads the URL contents when you save the script, and this is what the Engine uses for its value.  It does not pull fresh content from the web server.  Let me say that another way: UCCX does not make an HTTP request to the web server.

Additionally, when active or reactive debugging the script, the HTTP requests come from the PC in which you are running the Editor on.  Not from UCCX.  And it's never cached, it pulls it everytime.

Example of static URL:

Set url_doc = URL[http://10.10.10.10/home/]

2.  If the URL is dynamic, then the Editor, whether reactive or active debugging, while defer to UCCX to make the HTTP request.  UCCX will not cache the contents, and thus pull fresh data everytime.

Example of dynamix URL:

Set url_doc = URL["http://10.10.10.10/home/?uuid=" + (new Date()).getTime()]

The dynamic URL will have to be computed at runtime, everytime.  An example of the resulting URL from that is:

http://10.10.10.10/home/?uuid=1375475818865

With that knowledge, it looks like what's happening here is a simple matter of UCCX caching your URL, and not pulling it at runtime.  However, with that knowledge, I also see that you do have a dynamic URL, in that you are prepending the ANI to the URL string.  The only difference I can think of is that my code:

(new Date()).getTime()

Is causing some sort of internal difference in the way the URLs are handled, versus the variables you are prepending.

I was not using the Create URL Document step, I was simply using a URL document literal and casting it to a String to cause the request to trigger.

E.g.,

Set http_response = URL[http://10.10.10.10/home/]

Moving to a Create URL Document solution, I noticed that the above mentioned behavior changes, and that the HTTP request is not made by the editor pc, but instead is made by the node for which you refresh the application on.  E.g., I was logged in to my primary node when I refreshed the app, so then my web server logs showed the primary server making the request.  Even though my secondary node is actually the Engine Master right now.

So, how about trying to modify your Create URL Document step, add a new field, and name it:

uuid

and give it the value:

"" + (new Date()).getTime()

There is way more going on here than I ever thought, and I'm learning a lot, even if what I'm learning is that there's very little I know about how this works.  :/

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

UCCX Script step only works in Reactive Debug

I don't have the answer but I did want to say that you have done a great job troubleshooting this issue and presenting here on the forum for others to help you.  Nice job.  I don't see that level of quality everyday.  I hope you get an answer, and I'll keep an eye on the post to see how things develop.

One simple suggestion: Could you confirm whether or not the HTTP GET is leaving the server with the CLI command "utils network capture" and then also comfirm the same for the PC where you are doing the reactive debug?  Wireshark is a great tool for reviewing captures.  Thanks and good luck.

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

UCCX Script step only works in Reactive Debug

Thanks Anthony, I tried to make every attempt to figure it out before posting. I always fee the more information provided will help everyone save more time....

I am going to try the Utils... command now... thanks for the pointer..

UCCX Script step only works in Reactive Debug

Tom,

The CreateURLDocument step only performs the request after the data in the document is used.  When you access the document later in your script, the URL request should be made.  If you want to test this out, place a GetXMLDocumentData step immediately following your CreateXMLDoc step and you will see that the URL request is made when it gets to the GETXMLDocumentData step.

Ed

UCCX Script step only works in Reactive Debug

villarrealed wrote:

The CreateURLDocument step only performs the request after the data in the document is used.

I'm sorry, but this is incorrect.  The Create URL Document never performs the request.

villarrealed wrote:

...you will see that the URL request is made when it gets to the GETXMLDocumentData step.

This is also incorrect.  The Create XML Document step is the step which triggers the request, and Tom does have that step right below his Create URL Document step.  You can validate this in a debug, as the value of the variable used in the Create XML Document output will hold the contents of the XML document regardless if you use/execute the Get XML Document Data Step.

I will give you that you can semi-succesfully execute the Creat URL Document step with a malformed Document, and you wouldn't even know it until your execute the Get XML Document Data step.  It would be at the time you attempt to read from the XML document that you would get an exception about an invalid XML document.

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.

UCCX Script step only works in Reactive Debug

Anthony,

You are correct, the CreateURLDoc step does not perform the URL request.  I should have stated that the request is performed when an action is performed on the document.  What I was trying to get across is that most people will expect the execution of the URL request at that step and it is not the case.  However, I don't believe that the CreateXMLDoc step will trigger the request.  Let me run a test in my lab and I'll post the resutls...right or wrong.

Ed

UCCX Script step only works in Reactive Debug

Correct, the Create URL Document step does not perform the request.

However, I don't feel that this is the problem Tom is facing, as he knows what a good request looks like, during a debug, it's the production phone call that's not working.

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

UCCX Script step only works in Reactive Debug

The Create XML Docuement does work, but only in Debug mode.

If anyone has an alternate way to make the request I would be happy ot try that.

I did do some Wireshark captures today and the results were consistent... I only saw the request come over during a Reactive Debug or Debug (didnt have to be Reactive Debug).

UCCX Script step only works in Reactive Debug

I was able to put together a quick test and I encountered exactly the same issue that you describe above.  When running through the debug or reactive debugging the application, the reqest was shown in the web server log.  However, when I placed a call without reactive debugging, it would not make the request.  I was able to get the request to work every time by adding the Set step after my CreateXMLDoc step.  Not sure why it works, but it does.  I've encountered this before and this is what I have used to resolve it in the past.  Hope this helps.

Ed

Re: UCCX Script step only works in Reactive Debug

villarrealed wrote:

I was able to get the request to work every time by adding the Set step after my CreateXMLDoc step

Very nice find!  I am curious though, since the request is being made at the Set step, which is after the Create XML Document step, does that fail the XML document output, or does it retroactively apply and still work?

There are several steps which you can take to trigger the HTTP request.  Casting the URL document to a string, as you have done, is one of them.

I would say that this sounds like a defect.  Are you two running similar versions of UCCX?  I am going to try the same in my lab on version 8.5.1.11002-22.

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.

Re: UCCX Script step only works in Reactive Debug

Anthony,

I did not look at the resulting XML document, but a separate Document varaible can be used if you don't want to affect the original XML document.  I'm going on the assumption that Tom really doesn't care about the output and he is just attempting to post data to a web site and he is only using the CreateXMLDoc step to have it trigger the URL request.  My lab is 9.0.2 and I know I have run into this in versions 7.x and 8.x.

Ed

UCCX Script step only works in Reactive Debug

I didn't even notice the section is titled "Write to Log"

I would also use the Set string_variable = url_document method too then.  It's quick and easy.  The trouble seems to be with both the Create XML Document step, and the differences between where the HTTP request is sourced from during a JTAPI call, and a debug session.

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.

Re: UCCX Script step only works in Reactive Debug

I have definitive proof that an Active Debug generates the HTTP request from the PC you are using the editor on.

My Apache logs show my PC ip address every single time I debug my script.  More to come as this developes.  I will put together a full suite of tests, and have the results published in a bit.  I smell a defect in the air.

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.

Re: UCCX Script step only works in Reactive Debug

For my specific UCCX version and environment, I have ran enough tests to know that:

1. If the URL is static, then the Editor preloads the URL contents when you save the script, and this is what the Engine uses for its value.  It does not pull fresh content from the web server.  Let me say that another way: UCCX does not make an HTTP request to the web server.

Additionally, when active or reactive debugging the script, the HTTP requests come from the PC in which you are running the Editor on.  Not from UCCX.  And it's never cached, it pulls it everytime.

Example of static URL:

Set url_doc = URL[http://10.10.10.10/home/]

2.  If the URL is dynamic, then the Editor, whether reactive or active debugging, while defer to UCCX to make the HTTP request.  UCCX will not cache the contents, and thus pull fresh data everytime.

Example of dynamix URL:

Set url_doc = URL["http://10.10.10.10/home/?uuid=" + (new Date()).getTime()]

The dynamic URL will have to be computed at runtime, everytime.  An example of the resulting URL from that is:

http://10.10.10.10/home/?uuid=1375475818865

With that knowledge, it looks like what's happening here is a simple matter of UCCX caching your URL, and not pulling it at runtime.  However, with that knowledge, I also see that you do have a dynamic URL, in that you are prepending the ANI to the URL string.  The only difference I can think of is that my code:

(new Date()).getTime()

Is causing some sort of internal difference in the way the URLs are handled, versus the variables you are prepending.

I was not using the Create URL Document step, I was simply using a URL document literal and casting it to a String to cause the request to trigger.

E.g.,

Set http_response = URL[http://10.10.10.10/home/]

Moving to a Create URL Document solution, I noticed that the above mentioned behavior changes, and that the HTTP request is not made by the editor pc, but instead is made by the node for which you refresh the application on.  E.g., I was logged in to my primary node when I refreshed the app, so then my web server logs showed the primary server making the request.  Even though my secondary node is actually the Engine Master right now.

So, how about trying to modify your Create URL Document step, add a new field, and name it:

uuid

and give it the value:

"" + (new Date()).getTime()

There is way more going on here than I ever thought, and I'm learning a lot, even if what I'm learning is that there's very little I know about how this works.  :/

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

UCCX Script step only works in Reactive Debug

Hi Anthony

     I'm facing the same issue, it works in debug mode not in production. Below is how I call this. Any help will be much appreciated

thanks

Karthik

UCCX Script step only works in Reactive Debug

Karthik,

Three things:

  1. When debugging the call to the web server is made from your PC and not UCCX.  Make sure UCCX can resolve the hostname as well as reach the IP address.
  2. The Create XML Document step is already performing the task that your Set step is performing: making the HTTP request, so you don't need the Set step in there.
  3. Try adding an additional parameter of uuid with value set to "" + (new Date()).getTime()  This should prevent UCCX editor from caching the URL and make the call to the server.

Try those three things and then let us know.

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

Re: UCCX Script step only works in Reactive Debug

Hello,

I am facing the same problem.

I am using UCCX 11.5 and it still has this prolem.

Were you able to make it work? How?

Thanks.

New Member

UCCX Script step only works in Reactive Debug

Ed and Anthony... thank you so much for the great explanations and re-creating the issue. I did use the SET and it is working like a charm now. I dont really care about the output although I probably should be ensuring the URL call success.

I really appreciate your efforts and thanks for helping me avoid a TAC call !!!

Tom Suntken

2947
Views
5
Helpful
17
Replies
CreatePlease to create content