Custom compliance tests
General
Custom Compliance Tests are extensions for the b4A module pm.Compliance. They can be used to implement special compliance tests that are directly tailored to the customer's environment.
The Custom Compliance Tests are delivered in the form of a ZIP archive, which must be unpacked in the subdirectory custom/compliance. If this folder structure does not yet exist, it must be created beforehand. The ZIP archive can contain several compliance tests.
The ZIP archive contains a folder consisting of a name and a version number separated by a hyphen. The folder contains the implementations of the compliance tests as well as files containing translations. The doc subfolder contains the documentation for the included compliance tests.
Installation
- Change to the base directory of the b4A installation
- Create the directory tree custom/compliance if it does not already exist
- Unpack the ZIP archive
<name>
-<version>
.zip into the directory custom/compliance.
Use
If the Custom Compliance Tests ZIP archive is installed correctly, the tests it contains can be used directly. Check the documentation to see whether a configuration in the compliance.json file in the configuration directory of the b4A installation is necessary.
Projects
The following is a small selection of custom compliance tests that have already been implemented.
Length of keys in static variables The Compliance Tests ensure that no key is longer than 31 characters. In the customer environment, static variables are often used together with the AE script function GENERATE_SCRIPT_VARS. Therefore, the keys must not be longer.
Since b4A version 5.4.0 such a test is part of the product in an extended form.
Extended object name check best4Automic already contains a test that checks the object names of a package. In a customer environment, there are special rules for some packages and special rules for object names that cannot be mapped on the basis of a regular expression. These special rules have been implemented in this test so that they can also be checked by b4A.
Check for simple recursion The test ensures that a workflow in the package does not contain itself as a task. This is to avoid unintentional and possibly unnecessary recursions.
- Generation at runtime
- In an environment, the attribute for generation at runtime should be set for all JOBS objects. This test checks exactly this attribute.