Qbik Helpsys

WinGate DOM

WinGate uses a simple document object model (DOM) to let you access and reference registered WinGate objects. Whenever you access these objects, there are several syntax rules to follow.

Using the Symbol Browser

When you are selecting an object property or method from the Symbol Browser, WinGate will insert the object symbols (the object data or methods you have chosen) into the configuration or dialog that you accessed the Symbol Browser from. This could be placing it into a dialog field, or into the appropriate place in the body of a script or email. From there, the latest data will be supplied whenever the configuration is called upon during processing.

When using the Symbol Browser, the object symbol will be supplied in the correct format automatically. All that is required is for you to add the appropriate parameter according to the type required (See the Method Parameters section below).

Direct reference

You can always choose to write objects and their methods directly into the configuration that has access to component data, without using the Symbol Browser. This will always follow the object.property or object.functionname(parameters if required) format.

In the WinGate DOM, each piece of object data (property) or method can be referenced by specifying the registered object, followed by a period (full stop) and then the object property or function (with parameters when required).

e.g. If you wanted to insert and access the ClientIp property made available from a Session object, you would refer to it as: Session.ClientIp

It is important to note that if you choose to write the object symbol directly (instead of selecting it from the Symbol Browser) the actual syntax of each object symbol you want to use will depend on the configuration where you are writing it.

  • Object symbols written into text or user interface dialogs

    When creating text responses, configuring email content, or notification reports etc., you can often insert symbols directly into the text content. Similarly, some WinGate configurations allow you to write WinGate object symbols in an evaluation field if required (most commonly found in decision type policy items).

    1. Position your cursor in the appropriate place in the body of the text or dialog field.
    2. Write the required object.property or object.functionname(parameters if required) surrounded by double curly braces {{object.functionname(parameters)}}.

      Note

      • This is the same format that is automatically applied if you were to select the object symbol from the Symbol Browser.

      • When formatting text, remember to leave appropriate spacing so that the value of the selected data will be legible (amongst the text) when it is parsed.

      e.g. a text configuration could contain :

      It appears that {{Session.ClientIp}} made the request.

      When the configuration containing the text is processed during the operation of WinGate, the current data value at the time will be displayed in place of the object symbol and its curly brackets. As such the example given above will now be displayed as:

      It appears that 192.168.6.145 made the request.

    Note

    An exception to this syntax rule is when using the Expression evaluator policy item. This policy item formats object symbols just like a WinGate script system (see below) where object symbols do not require to be surrounded by double curly braces.

  • Object symbols inserted into WinGate scripting

    When using a WinGate script system (such as the Run Lua script or Javascript event processors) you do not have to enclose the selected object symbol in curly brackets when it is referenced inside the script body. It can be referenced directly in the usual object.property or object.functionname(parameters if required) format.

    In the example below the Run Javascript script event processor has been configured to use several object symbols, Session.ClientIp and Request.Port, and the Session.Cache.Lookup. These three symbols have been inserted directly into the script body and so will not be encased by double curly braces {{}}.

Method parameters

Whether inserting a symbol from the Symbol Browser, or referencing it directly, method parameters can often require you to enter suitable text or number values in the method parentheses.

  • Text

    All text passed as a parameter must be enclosed with quotation marks.

    e.g. If you selected the Data.GetCounter(Text Countername) method you would have to add the Countername parameter in text form (i.e. in between quotation marks Data.GetCounter("TestCounter"))

  • Number or Boolean values

    All number and boolean values passed as a function parameter should be written directly (i.e. without quotation marks).

The correct syntax for the selected object method parameter will be displayed is shown in the description panel below the main object window when it is selected in the Symbol Browser.

Object types and access

All registered objects have a classified type which will dictate what sort of value (if any) the object method or property can return. This is important to note when selecting objects to use in scripts and configurations.

Similarly, object symbols have an access status set on the object (as displayed in the Access column in the Symbol Browser example below) which will determine what how you can actually use the property or method.

  1. no comments yet...

Download helpfile

You can use basic Full-Text Searches against the page title and body to find matching articles. Use the following search modifiers to refine your query:

  • event management (no quotes) will find all pages containing the words "event" OR "management"
  • "event management" (with quotes) will find all pages containing the phrase "event management"
  • +event -management will find all pages containing the word "event", AND NOT the word "management"