The global data Boolean value provides a centralized true or false value that WinGate components and services can check or change during their operations. For example, Boolean values can be used for controlling policy or script evaluation behavior. You can have a policy or script check or change the current state of the boolean value, to help determine what processing path it should take.
Using a global data boolean value in this way allows you to add greater complexity to script and policy evaluation, since the state of the boolean value can also be set by the configuration and activity of other WinGate services or components.
You can also control the status of a global data boolean value by creating a switch for it in the Dashboard provided by the Data module. Other WinGate components that have been configured to refer to the value of the boolean, can then have their activity easily controlled from this switch on the Dashboard.
Read more about switches on the Dashboard
Boolean values can be created in several ways:
When using a WinGate scripting system (such as the Lua or Javascript event processors) or a configuration that has access to the Symbol browser, you can utilize the Data object published by the Data module to create and manage global data Boolean values. The Data object provides the GetBool(Text BooleanName) method to create or access particular Boolean value.
e.g. A script could contain:
Data.GetBool("testbool")
This would attempt to get the value of a global data Boolean value called testbool. If this Boolean value did not exist, a new Boolean value would be created automatically with the name testbool. Like other global data items, if the specified Boolean value does not exist then it is created automatically.
After they are created, global data items are identified throughout WinGate by their type (e.g. a string, a Boolean, a list etc), and the name you give them.
Global data items of the same type must each have a unique name. If you create a new global data item with the same name as an existing item of the same type, then the new item will replace the old one.
Like other global data items, Boolean values can be referenced, modified, and deleted whenever you are:
Read about accessing global data items
©2012 Qbik New Zealand Limited
no comments yet...
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:
You can create a new account or reset your password at forum.wingate.com.