サポートと今すぐチャット
サポートとのチャット

InTrust 11.6 - Customization Kit

ScriptState

ScriptState is an object with arbitrary fields that stores values between calls and between InTrust agent restarts. This object is available when you use the ECMAScript or JScript object model.

The ScriptState object can store only the following data types:

  • Strings

  • Numeric types

  • Dates

  • Arrays of all of the above

GlobalState is a similar object that can store any data type, but is available only in the JScript object model.

In the following two examples, every fifth event is matched.

ECMAScript Example

function OnEvent( e )
{
  if (ScriptState.count == 5 )
    {
      match( e );
      ScriptState.count = 0;
    }
  else
    {
      ScriptState.count++;
    }
}

JScript Example

function OnEvent( e )
{
  if (ScriptState.Item("count") == 5 )
    {
       match( e );
       ScriptState.Item("count") = 0;
    }
  else
    {
      ScriptState.Item("count")++;
    }
}

関連ドキュメント

The document was helpful.

評価を選択

I easily found the information I needed.

評価を選択