Dynamic Channels

<< Click to display Table of Contents >>

Navigation:  Channels >

Dynamic Channels

Dynamic Channels are a sophisticated tool for dynamic realtime-messaging and an effective instrument for proactive Service Operation. When addressing a Dynamic Channel in an Info, a predefined script is sent to the recipient group along with the message and is run locally. With these scripts, the Infoclient is able to query nearly any kind of information from the computer system. Based on the defined conditions in the script, it is then possible to control the display of the message and to send data as response to the Infoserver as well.

 

Using client-properties as base for recipients can be applied in groups based on shared properties. Here, InfoclientValues submitted by the client along with other computer-related data upon connection are used. Although these InfoclientValues may have dynamic content, their state is static. Therefore, these data aren't necessarily valid throughout the entire time of operation.

 

Dynamic Channels go one step further and react to dynamic changes on the client-environment. Every type of Dynamic InfoclientValue can be used in a Dynamic Channel. This way, flexible and immediate information channels are at your disposition. You can react instantly with highly targeted messages to current events and additionally collect information in realtime.

 

Query Methods in Dynamic Channels

 

In general, any query on the client is performed by a script as defined in the Dynamic Channel on the server. In the script, there are two approaches of querying information:

 

1. Query existing InfoclientValues

 

If you already have created (Dynamic) Infoclientvalues (e.g. for dynamic groups), then you can use these in a Dynamic Channel too. Simply use the name of the Dynamic Infoclientvalue and the desired value in the scriptfilter-function InfoclientValue(Name). The return-value of the function is of type String. A result that resembles boolean true/false will be values '1' or '0' as String.

 


program DynamicChannel;
var
 MyValue: String;
 Res: Boolean;
 
begin
 // Get the value of the designated local InfoclientValue
 MyValue := InfoClientValue('MyClientValue');
 // check if the local value is equivalent to the desired value
 Res := MyValue = 'The desired value';
 // If match is OK then start display of Info
 If Res = true then
  StartInfo;
end.

 

2. Live Query

 

In a Live Query, the respective system/environment property is queried in the scriptfilter by using the function DICV(type,value). The return-value of this function is of type String. A result that resembles boolean true/false will be values '1' or '0' as String. In this function you can use all types available for Dynamic InfoclientValues.

 

 


program DynamicChannel;
var
 MyType,MyValue,MyResult: String;
 Res: Boolean;
 
begin
 // define type of client-property as String
 MyType := 'diFileExists';
 // define local value to check for as String
 MyValue := 'C:\Program Files\Cordaware\Infoband\Infoclient.exe';
 // run live query and get result as String
 MyResult := DICV(MyType,MyValue);
 // compare local result with desired result
 Res := MyResult = '1';
 // If match is OK, display Info
 Is Res = true then
  StartInfo;
end.

 

Display Methods in Dynamic Channels

 

For controlling the display of the message text, the procedures StartInfo, RestartInfo and StopInfo are available. StartInfo will display the message only once, whereas RestartInfo will repeatedly display the message while the Info is active on the client. StopInfo will simply stop the display of the message.

 

As indicators for currently or previously displayed messages, the boolean (true/false) variables InfoRuns, InfoRan, IsAllClear and RefInfoRan are available. InfoRuns is true in case the message is currently displayed and InfoRan is true in case the message was displayed and the Info is still active on the client. IsAllClear is true in case the Info was sent as an All Clear message to a previous Info. RefInfoRan is only true, in case the current message is an All Clear message AND only if the Info which is referenced in the All Clear message contained a Dynamic Channel in which the procedure StartInfo or RestartInfo was activated.

 

Also, it is possible to override the original message-text by setting a new text with the function SetInfoText('My New Text'). For setting the Caption of an Info, use the function SetInfoText and prefix the keyword Caption= to the desired value:

SetInfoText('Caption=This is the new Caption');

For more information on how to use these options, please see the examples.

 

Response Methods in Dynamic Channels

 

For submitting a response to the Infoserver from a Dynamic Channel, the function SendResponse(Value,Label) is available. In case you want to submit multiple responses (e.g. with varying labels), you can either repeatedly call the function SendResponse(Value,Label). In case you don't want to use a Label for a response, then simply submit an empty String as Label. It is invalid to omit the Label item in the function, this will produce an error. For more information on submitting responses from a Dynamic Channel, please see the examples.

Setup and Configuration:

 

For Creating a dynamic Channel open the App Channels. Here you can create a new channel via the button Channels_+.

 

DynChannels_CreateNewChannels

 

In the form for creating a new Channel simply insert a desired Name and Description (optional) and select either type Static or Dynamic.

 

DynChannels_TypeDynamic

 


Type Static and Dynamic are both valid declarations for a Dynamic Channel. The difference is, that Static will only be run once whereas Dynamic will be run repeatedly throughout the entire active-time on the client.

 

Subsequent to setting the Name and the Type of the Dynamic Channel, it is necessary to define the Script for the conditions and functions.

 

 

When creating a new channel your have the opportunity to select example scripts.

 

DynChannels_Scriptselect

 

You can for example select a script which sends an info to the Infoclient when the process "notepad.exe" is running on the system.

 

DynChannels_Script

 

Example:

 

Let's assume, you want to address all users, which have a certain file installed on their computer. In this example, we want to find out, if the Infoclient's debug-logfile exist and display the result of the query in the ticker.

 

The Dynamic InfoclientValue type for this query is called diFileExists.

 

The queried value of this property is the path to the file, e.g. "C:\Program Files\Cordaware\bestinformed\InfoclientDebug.log".

 

Scriptcode:

 


program ChannelScript;
var
 BRes: Boolean;
 SRes: String;
 SType: String;
 SValue: String;
begin
 // Set Key
 SType := 'diFileExists';
 // Set Value
 SValue := 'C:\Program Files\Cordaware\bestinformed\InfoclientDebug.log';
 // Get Result
 SRes := DICV(SType,SValue);
 // if file is found, then return value is '1'
 if SRes = '1' then
 begin
  // Set new InfoText
  SetInfoText('File ' + SValue + ' was found on your system');
  // Start Info
  StartInfo;
 end;
end.

 

By setting the condition if SRes = '1' then ... you can define, which action is to be performed depending on the result of the query. In our example, we want to display the result in the ticker. For this, we are using the function SetInfoText('File ' + SValue + ' found'). You can set any text as argument for SetInfoText(). In case you are not using SetInfoText, then the Infotext will be displayed as defined in the Infoeditor.