Developer

Technical Overview - ActiveX Controls and the Agentry Client

The Agentry Client is capable of interfacing with an external ActiveX control installed to the same host device.

This functionality is supported through the implementation of several separate but tightly coupled components within the Agentry architecture:
  • The External Field - ActiveX Control detail screen field edit type
  • The Agentry Client API containing methods that can be called by the ActiveX control
  • The ActiveX control’s proper implementation of the interface points (methods) expected by the Agentry Client
  • The client action step type External Field Command

Using the above components together, it is possible for the Agentry Client to display an ActiveX control within the Client’s user interface, to pass data from the Client to the Control, to pass data from the ActiveX control to the Agentry Client, to execute actions on the Agentry Client at the request of the ActiveX control, and to issue commands from the Agentry Client to the ActiveX control.

Provide Data to the ActiveX Control

The External Field - ActiveX Control screen field edit type includes in its definition a list of objects and properties, known as the Agentry Values for that field. Each of these properties is selected and added as an Agentry Value for the screen field. When a value is added, the specific property or object is selected and given an arbitrary name.

The ActiveX control can call into methods provided in the Agentry Client API to retrieve these values. The value to retrieve is specified via the name given to it in the Agentry Values list. All property values, regardless of the data type within the Agentry application project, are provided to the ActiveX control as strings.

Pass Data to the Agentry Client

The ActiveX control can call methods in the Agentry Client API to notify it of a change in its current value, or to indicate that the value has been fully entered. A call to these methods results in an immediate call by the Agentry Client back to the ActiveX control to retrieve the current value. The value returned by this subsequent call is then set as the current value of the External Field - ActiveX Control screen field. If no further changes are made, this value will set the value of the property target by the External Field if that field is displayed in a wizard screen for a transaction or fetch.

Execute Actions in the Agentry Client

The ActiveX control can call into the Agentry Client API to execute actions defined within the mobile application. This behavior requires the action or actions the control may execute to be listed within the External Field - ActiveX Control screen field. Only those actions listed within the detail screen field can be executed by the ActiveX control. The ActiveX control calls the appropriate method within the Agentry Client API, passing the name of the Action to be executed.

Issue Commands to the ActiveX Control

The Agentry Client can issue a command to the ActiveX Control. An action step of type External Field Command can be defined to pass a string value to the ActiveX control. The ActiveX control receives this command string via a method called by the Agentry Client when the action step is executed. The action step defines the External Field - ActiveX Control screen field that references the ActiveX control. This screen field must reside on a detail screen within a screen set defined to display an Object. Screen sets displaying transactions and fetches will not be valid options in the action step when it is defined.