AWB Execution Modes

Agent.Workbench provides four different execution modes: End-user Application, ****Background System, Service and Embedded System Agent. These modes are suited for different use cases (simulation/operation) and offer individual features like direct execution of agents, a user interface (UI) etc.

Introductory remarks

Agent.Workbench allows you to switch the execution mode anytime. Except for a special setting in the mode Embedded System Agent mode, the tab Program Start in the Options is the central location for this. Depending on the current mode, the Options can be accessed in different ways, which will be explained below. To switch modes, select the desired mode in the top section (Agent.Workbench - Start as:), specify the required parameters for the specific mode (see below), and click Apply to restart Agent.Workbench.

In execution modes Application and Service, Agent.Workbench can be connected to a Background System. This allows to distribute the JADE agent platform across multiple machines. To do so, specify the location of the so-called server.master by its URL or IP-address. The port settings must match the configuration of the server.master - usually it will be the default ports 1099 and 7778. More details about the Background System and Server configuration can be found here.

End-User Application

The End-User Application mode is the default. It provides the graphical user interface to create, configure and execute your AWB agent projects. When connected to a Background System, agents can be distributed and remote containers can be monitored via the end-user application.

In the End-User Application mode, the Options dialog can be found under Extras > Options. Alternatively, as shown further below, you can also use the context menu of the AWB tray icon.

Beside optional settings for the Background System connection, the Application execution mode does not require any further specific configuration.

Server / Background System

Agent.Workbench can also be executed in a Server mode that is dedicated to the Background System. This mode does not provide a graphical user interface. The only visual representation is the AWB tray icon in the icon tray of the operating system (if available). It allows to control the AWB execution by a context menu. This allows the user to perform important actions like opening the Options dialog, showing Console output or starting and stopping Agent.Workbench in the current mode.

The Server mode is connected to the Background System. In fact, it is not possible to start an Agent.Workbench instance in Server mode without laying down parameters for the Background System. When configured correctly, an AWB instance is either handled as a so called server.master, server.slave or server.client. These instances can be distributed over several machines and thus create the background system, a network that is in control of dynamically extending the JADE platform with JADE containers. More information about configuring the Server mode, the background system and how to create one is provided on this page.

Service

In Service mode, Agent.Workbench spares the user to open and start an agent project manually. At startup, Agent.Workbench automatically starts JADE and executes a specified project setup (direct execution). The visual appearance of the Service mode is equal to the end-user oriented Application mode.

To utilize the Service mode, you need to specify the project to open, choose Run as: Service and select a a project setup to execute. The agents specified in the agent start-list of the project setup will be executed directly after pressing the Apply button or the next time you start Agent.Workbench.

Embedded System Agent

The mode Embedded System Agent is configured similar to the Service mode and also features direct execution of agents. However, at startup only specified agents from a project will be started. In this mode, the visual representation is restricted. The user can choose between a Server-like appearance with a tray-icon or a hidden execution, with no visual representation. In contrast to the Application or Service mode, the Embedded System Agent mode is suited for operational purpose, as for example for agents that have to run in an automation environment on an industrial PC or in a Smart House scenario.

Display Agent.Workbench - Tray icon

In this mode Agent.Workbench is represented by a tray-icon and can be controlled via the context menu.

Disable all visual representation

With this option, Agent.Workbench will be executed completely hidden. The console output is redirected to a log file in the root directory of Agent.Workbench. Also, a file called Shutdown_Service_EmbeddedSystemAgent_[PID] will be created. This file indicates that Agent.Workbench is running and is permanently observed by a system agent. As soon as this file is deleted, Agent.Workbench (and JADE) will shutdown automatically.

Configuration File org.agentgui.core.prefs

As compensation for the missing Options dialog, the configuration file ./configuration/.settings./org.agentgui.core.prefs can be found in the Agent.Workbench installation. In fact, configuring this file is the same as configuring Agent.Workbench in the Options dialog. It allows you to switch to any execution mode by specifying the necessary parameters, or change the visualization within the Embedded System Agent mode. You can open and edit the file org.agentgui.core.prefs file with any text editor.

The value for 01_RUNAS specifies the execution mode you want to switch to. Connecting to a Background System is also as straight forward as in the Options dialog. Just type the URL or IP-address of the server.master at 11_MASTER_URL and so on.

The following table shows the possible values for the 01_RUNAS key and explains how the org.agentgui.core.prefs file further needs to be configured to successfully switch an execution mode.

ValueExplanation

APPLICATION

<b></b>

<b></b>

<b></b>

<b></b>

Indicates the usage as End-User Application. Since it does not require any mode-specific configuration, this is basically the only parameter you need to change. If you like to extend and distibute your agent platform over several computer systems, specifiy the URL or IP-address of a running server.master instance by setting a value to 11_MASTER_URL.

SERVER

Indicates to execute in the Server mode. Based on the further configuration, the instance is either handled as a so-called server.master or as server.slave.

The Server mode requires to define the URL or IP-address of the server.master system at 11_MASTER_URL. If you intend to execute a server.master instance, you additionally need to specify the values for MASTER_DB_HOST, -NAME, -USER and -PSWD.

DEVICE_SYSTEM

Indicates the usage of the Service or Embedded System Agent mode. Analogue to the Options dialog , it requires further configuration. For both execution modes, the key 40_DEVICE_SERVICE_PROJECT needs to define a valid project out of the current projects directory; the specification of the subdirectory is sufficient here (e.g. my-agent-project).

For the Embedded System Agent mode, key 41_DEVICE_SERVICE_EXEC_AS has to be set to AGENT. Further, the corresponding agent has to be specified under 44_DEVICE_SERVICE_AGENT_Name. Finally, choose between NONE (for hidden execution) and TRAY_ICON (for tray-icon visualization) for 45_DEVICE_SERVICE_VISUALISATION.

For Service mode, 41_DEVICE_SERVICE_EXEC_AS must be set to SETUP. The corresponding setup out of the project needs to be specified at 42_DEVICE_SERVICE_SETUP

For sure, the easiest way to configure Agent.Workbench is to use the Options dialog, since it provides suitable user support functions. For some configurations, as for example for the configuration of so-called device agents, the configuration is more complex (see example below). Therefore it can be helpful to use the Options dialog to configure your own configuration examples. Here the example:

44_DEVICE_SERVICE_AGENT_Name = Agent1(net.package.MyAgent), AgentNo2(net.package.MyAgent)

The table below gives explanations on the individual lines, that need to be configured properly to switch to Server, Service or _Embedded System Agen_t mode.

KeyValueExplanation

11_MASTER_URL

myComputerURL

or 127.0.0.1

URL or IP address of the server.master. Necessary for connecting to a Background System.

20_MASTER_DB_HOST

URL/IP address of the DB host for the server.master.

21_MASTER_DB_NAME

Specifies the name of the database.

22_MASTER_DB_USER

Specifies the username.

23_MASTER_DB_PSWD

Password for utilizing the database.

40_DEVICE_SERVICE_PROJECT

Specifies project name for the Service or Embedded System Agent mode, depending on further configuration.

41_DEVICE_SERVICE_EXEC_AS

<em></em>

<em></em>

AGENT

Specifies the Embedded System Agent mode, if 01_RUNAS is set to DEVICE_SYSTEM.

SETUP

Specifies the Service mode, if 01_RUNAS is set to DEVICE_SYSTEM.

42_DEVICE_SERVICE_SETUP

Specifies the project setup, and thus the agent-start list, that is utilized in Service mode.

44_DEVICE_SERVICE_AGENT_Name

(see above)

Specifies the agent that is executed in Embedded System Agent mode.

45_DEVICE_SERVICE_VISUALISATION

TRAY_ICON

Enables a tray-icon in Embedded System Agent mode, thru which Agent.Workbench can be controlled.

NONE

Disables all visualization in Embedded System Agent mode.

Last updated