cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1608
Views
12
Helpful
11
Replies

Node Count query for ICM Script

Slackerou
Level 1
Level 1

Hi,

Have several scripts that after editing and trying to save I get that Max node limit exceeded error. I would like to create a SQL query to count the nodes in an ICM script so I can know which scripts already has reached the max node limit.

Any help on a query would be appreciated.

11 Replies 11

Omar Deen
Spotlight
Spotlight

You won't find this info using a query... Here's what you need to do

  1. Create a folder on the root of C: called temp
  2. Export the script to that folder. Let us say that the script name is Cisco_Billing_Entry_015
    • The 015 is the version number
  3. Open a command prompt and change your directory to C:\Temp
  4. Enter this command find /c "CVisTerminal" Cisco_Billing_Entry_015.icms
  5. The output will be ---------- ScriptName.ICMS: NodeCount

Line connectors are counted as nodes, but comments are not.

CVisTerminal is case sensitive

 

ScriptNodeCount.PNG

 

Excellent! Is CVisTerminal an actual string/object in the saved file? Just curious as to it's relationship in the ICM script.

Will try this and post back my success.

So something is not adding up here. The script that gives me the max node limit message shows less than another script that I can add more nodes to and save. Here is my search results on both scripts -

 

C:\>cd scriptexport

C:\ScriptExport>find /c "CVisTerminal" UHC_Main_2_045.icms

---------- UHC_MAIN_2_045.ICMS: 562

C:\ScriptExport>find /c "CVisTerminal" UHC_Main_041.icms

---------- UHC_MAIN_041.ICMS: 575

C:\ScriptExport>

The one that returns 562 I cannot add nodes but the one that returns 575 I can add to and save successfully.

Do this... I just want to see if it's consistent... open both scripts in Notepad++ and look for ScriptStart. You'll probably see something like {some_number ScriptStart

 

The number after the curly bracket... does that match the number returned from the command entered with CVisTerminal?

Yes it does -

 

{562 ScriptStart {2 1 0 90 4366}

{575 ScriptStart {2 1 0 2647 2432}



 

I've been testing this like crazy yesterday and I can add to my hearts desire so as long as I don't exceed 900 monitored objects. Can you screen shot the error that you get? what version are you on? I've been testing this on 11.6 and 12.0

Screen shot of error attached.

The Script exceeds the maximum script size. Please reduce the number of nodes in your script and try saving it again.

Thanks for posting. I don't think you're hitting a node max limit, I think this is a script size (memory) limit. Let me look into this a bit more. Do you have a lot of nested conditions in some of your nodes?

Version is 10.5, I didn't include that earlier. And yes you may be on to something as looking at the message it is saying "script size". My scripts have a lot of IF nodes as there are a lot of numbers that uses that same script but depending on the number dialed is what determines what skillgroup handles the call, among setting other variables as well.

So I'm shooting from the hip here... kind of learning as we go, but do you know the Script ID of UHC_Main and UHC_Main_2? If so, can you query the Script table where ScriptID are the script ID of those two respective scripts? What's their length value? These scripts do have a max script size (64KB), and when it goes beyond that, ICM should split those into rows. For instance, if you queried the Script_Data table where ScriptID equals one of scripts above, you should see several rows where the RowOrder increments with each additional row. Can you confirm that?


Excellent! Is CVisTerminal an actual string/object in the saved file? Just curious as to it's relationship in the ICM script.

If you export a script and open it in Notepad++, you'll see what's under the hood. I think CVis basically means This Is in laymans terms. You'll see things like CVisStart (Start Node), CVisSet (Set Variable Node), etc... CVisTerminal is a collection of said nodes.

So as I'm typing this, I'm thinking that maybe we can do this through SQL. The script header information is in the Script_Data table after all. Decoding that data is the tricky part, but there are some helpful websites out there that can probably help.