Usage

Command-Line Interface (CLI)

To start FA³ST Service from command-line you need to run the starter module by calling

> java -jar fa3st-service-starter-{version}.jar

When started without arguments, FA³ST Service will try to auto-detect a configuration file named config.json and a model file named model.[ext] where [ext] is a supported file extension like json, xml, or aasx.

To manually pass a model file my-model.aasx and a configuration file my-config.json run the following command:

> java -jar fa3st-service-starter-{version}.jar --model my-model.aasx --config my-config.json

An example model file can be found in the FA³ST Github-Repository. Regarding AAS examples from other sources it is important to note that the AAS specification is not backwards compatible. Therefore, it is necessary to make sure that the model file conforms to the latest AAS specification (V3). Passing an outdated model file will lead to an error. If a model file conforms to V3 of the Asset Administration Shell specification but has duplicate identifiers, FA³ST will not load the file. Starting FA³ST with the --no-validation flag loads the file in any case but will lead to problems during runtime if there are duplicate identifiers present.

Supported CLI arguments and environment variables.

CLI (short)

CLI (long)

Environment variable

Allowed
Values

Description

Default
Value

-c

--config

fa3st_config

The config file to use.

config.json

-e

--empty-model

Starts the FAST service with an empty Asset Administration Shell Environment.

--endpoint

HTTP
OPCUA

Additional endpoints that should be started.

-h

--help

Print help message and exit.

--loglevel-external

fa3st_loglevel_external

TRACE
DEBUG
INFO
WARN
ERROR

Sets the log level for external packages.
This overrides the log level defined by other commands such as -q or -v.

WARN

--loglevel-fa3st

fa3st_loglevel_fa3st

TRACE
DEBUG
INFO
WARN
ERROR

Sets the log level for FA³ST packages.
This overrides the log level defined by other commands such as -q or -v.

WARN

-m

--model

The model file to load.

model.*

--no-validation

fa3st_no_validation

Disables all validation, overrides validation defined in the configuration Environment.

-q

--quite

Reduces log output (ERROR for FAST packages, ERROR for all other packages).
Default information about the starting process will still be printed.

-v

--verbose

Enables verbose logging (INFO for FAST packages, WARN for all other packages).

-V

--version

Print version information and exit.

-vv

Enables very verbose logging (DEBUG for FAST packages, INFO for all other packages).

-vvv

Enables very very verbose logging (TRACE for FAST packages, DEBUG for all other packages).

{key}={value}

fa3st_config_extension_{key}
with {key} separated by _

any

Additional properties to override values of configuration using JSONPath notation without starting $.

From Java Code

You can run FA³ST Service directly from your Java code as embedded library. This way, you can create your configuration and model directly in code and don’t have to create them as files (you can still load them from files if you want to). The following code snippet shows how to create and run a new FA³ST Service from code using a model file.

Create a FA³ST Service from code.
 1Service service = new Service(ServiceConfig.builder()
 2   .core(CoreConfig.builder()
 3      .requestHandlerThreadPoolSize(2)
 4      .build())
 5   .persistence(PersistenceInMemoryConfig.builder()
 6      .initialModelFile(new File("{pathTo}\\fa3st-service\\misc\\examples\\model.aasx"))
 7      .build())
 8   .endpoint(HttpEndpointConfig.builder().build())
 9   .messageBus(MessageBusInternalConfig.builder().build())
10   .fileStorage(FileStorageInMemoryConfig.builder().build())
11   .build());
12service.start();