Input and output
The best4Automic framework provides several techniques that can be used by the modules. This chapter deals with techniques that can be used for more complex input or output data. Which module supports one of these techniques can be found in the respective module documentation.
b4A Script
best4Automic Script is not a scripting language in the true sense of the word. Rather, it is a generic syntax for various modules that support a set of commands that they read either from a variable object or a file. The result of each call can be saved.
The script files contain one command call per line, which consists of the name of a function and a list of parameters. The format is defined as follows.
<name>(<arg1>,<arg2>,...)
After the module has executed the commands, the return values are written to the file. The lines are then structured as follows.
<name>(<arg1>,<arg2>,...) = (OK|FAILED|SKIPPED|NOT_EXECUTED)
If the commands are in a variable object, the commands are entered in the VARA as follows.
Key | Value 1 | Value 2 | Value 3 | Value 4 | Value 5 |
---|---|---|---|---|---|
<no> | <name> | arg1,arg2,... |
After processing the commands, the return values are 3
key | value 1 | value 2 | value 3 | value 4 | value 5 |
---|---|---|---|---|---|
<no> | <name> | arg1,arg2,... | ``OK | FAILED | SKIPPED`` |
b4A data streams
A common use case is the use of b4A modules to provide data in the Automic Automation Engine, which is then processed further in Automic Automation Engine scripts, for example. For this purpose, the data is written to static variables or to the structured documentation of objects, for example. In other cases, the b4A modules generate CSV files, which are then further processed with prep_process_file, for example.
The b4A data streams provide a further mechanism that enables data to be returned to the Automic Automation Engine in another way. The technology makes it possible to use b4A modules as a backend for EXEC variables. The modules generate a special format in the report that can be easily processed further in the Automic Automation Engine.
The log level DATASTREAM is used to activate the data stream in the modules. Modules that support this generate additional lines in the report that have a specific format. The following is an example of the info.Search module.
@B4A_STREAM@object name§§folder
@B4A_STREAM@PCK.BEST4AUTOMIC_BASE.DOCU.@TESTS@§§0010/PACKAGES/PCK.BEST4AUTOMIC_BASE/TEST
@B4A_STREAM@PCK.BEST4AUTOMIC_BPMN.DOCU.@TESTS@§§0010/PACKAGES/PCK.BEST4AUTOMIC_BPMN/TEST
@B4A_STREAM@PCK.BEST4AUTOMIC_INSTALL.DOCU.@TESTS@§§0010/PACKAGES/PCK.BEST4AUTOMIC_INSTALL/TEST
@B4A_STREAM@PCK.BEST4AUTOMIC_PACKAGE.DOCU.@TESTS@§§0010/PACKAGES/PCK.BEST4AUTOMIC_PACKAGE/TEST
@B4A_STREAM@PCK.BEST4AUTOMIC_TA.DOCU.@TESTS@§§0010/PACKAGES/PCK.BEST4AUTOMIC_TA/TEST
@B4A_STREAM@PCK.BEST4AUTOMIC_USER.DOCU.@TESTS@§§0010/PACKAGES/PCK.BEST4AUTOMIC_USER/TEST
@B4A_STREAM@PCK.BEST4AUTOMIC_VCS.DOCU.@TESTS@§§0010/PACKAGES/PCK.BEST4AUTOMIC_VCS/TEST
@B4A_STREAM@B4A.TRAINING.TEST1.DOCU.@TESTS@§§0010/TESTS/B4A.TRAINING.TEST1/CONFIG
The start of each line (in the example the default value @B4A_STREAM@) can be changed using the log-datastream-prefix option. The character string used as a separator can be defined using the log-datastream-separator option.