Icon

This is the documentation of the latest development version of automaIT. The documentation of the latest stable release can be found at AUTOMAIT.

Skip to end of metadata
Go to start of metadata

Model extensions support the re-use of sequences of frequently used statements. These model extensions are called by the defined name and shorten the code of plans and components. By default automaIT is delivered without any predefined model extensions.

Definition of Model Extensions

An XML file containing the statements has to be created. Its root element is extensions. To define statements the element command must be used.

Icon
Model extensions are validated and loaded on server start, i.e. changes to the configuration file will only take effect on a server restart.

These command elements contain:

  • required and optional parameters
  • block element that contains the content to be executed
Icon
It is not possible to use component specific placeholders (e.g. component substitutions or targeters) in model extensions.
custom-extensions.xml

The file has to be located in the file system of the server. Its location has to be referenced by the server property extensions.custom.xml .

Icon

Model extensions are unversioned, i.e. take caution when removing or changing a command.

Installation of Model Extensions

To use the custom extensions within automaIT use the server property extensions.custom.xml in Tomcat's context.xml to reference to the extensions XML file.

$CATALINA_BASE/conf/context.xml

Windows

Set the parameter extensions.custom.xml as a default windows path reference like file:///d:\automait\extensions\custom-extensions.xml.

Use of Model Extensions

Using the previously model extensions requires:

Icon

The server property extensions.protocol.prefix defines the namespace prefix used in the execution protocol of model extensions.

One should configure this variable, if another prefix than ext is used to reference extension statements in the automaIT model code (for example using xmlns:my="http://www.novatec-gmbh.de/...").


Plan.xml

The schema file of the custom extensions (custom-extensions.xsd) can be downloaded in the automaIT web UI (Menu element: extensions) to support code validation and completion in the XML Editor.
To use advantages of auto completion and schema validation in the development environment for custom extensions as well the custom-extensions.xsd must be registered in the XML catalog analog to model.xsd, as described in Development Environment.

  • No labels