Creating a Group

A group defines an alias for a directory where application configuration files can be stored. The alias is used in the application URL, letting the Genero Application Server (GAS) know where to find the application configuration file.

A group consists of a alias (Id) and a directory (path). When a front-end requests an application whose configuration information is stored in an external application configuration file, it provides the group alias, which directs the GAS to the directory where the application configuration file sits. The application name identifies which application configuration file to read (as the application and the configuration file share the same name). A GROUP element can be added to the APPLICATION_LIST component within the GAS configuration file.

Syntax

<GROUP Id="groupId"> path </GROUP>
  1. groupId is the alias
  2. path is the physical path to the directory

Usage

You can use application groups to organize your applications into logical groups or a hierarchy. For example, consider this URL:

http://<server>/gas/wa/r/accounting/app1

In this URL, both a group (accounting) and an application name (app1) are specified. The GAS, on receiving this application request, uses the group alias to identify the directory holding the external application configuration file:
<GROUP Id="accounting">/path/config/accounting</GROUP>

In this directory, the GAS expects to find a file whose name matches the name of the application with an xcf suffix. For this example, the GAS would be looking for a file named app1.xcf.

The default group

The GAS configuration file provides a default group, defined using the name _default. When an application configuration file is added to this group, the application URL can omit using a group name and simply reference the application. For example, consider this URL:

http://server/gas/wa/r/Edit
The application URL does not specify a group, and the Edit application is not defined internally. It must therefore be defined in an external application configuration file, located in the directory defined for the _default alias.
<GROUP Id="_default">$(res.path.app)</GROUP>

The resource $(res.path.app) resolves to FGLASDIR/app. In this directory, you would expect to find Edit.xcf, the Edit application's application configuration file.

Example 1

<GROUP Id="_default">$(res.path.app)</GROUP>
<GROUP Id="myapp">$(res.path.app)/myapp</GROUP>

Example 2

<GROUP Id="demo">$(res.path.demo.app)</GROUP>

This example assigns the alias demo to the directory containing the external application configuration files for demo applications. The path is defined using a resource $(res.path.demo.app). By wisely using a resource, a change to the directory structure only requires a change to a single RESOURCE element in the configuration file.

To access an application that has its configuration file stored in the group directory, enter an application URL that includes the group alias in its path: http://server/gas/wa/r/demo/CardStep1

Based on this URL, the GAS would expect to find the configuration file CardStep1.xcf within the directory specified for the demo group.