Macro Engine Configuration
Macro Engine (ME) is an extension of the Jedox Web Core delivered in the form of an external library (.dll/.so), which gets loaded when Core loads. It is enabled by default but is not mandatory, meaning that Core will start even if this extension is disabled or if Core is unable to load it during the start procedure.
ME is called by the following entry in the file …\Jedox Suite\core\config.xml (Windows) or …/core-Linux-i686/etc/config.xml (Linux):
ME has different configuration options that are set in the file macro_engine_config.xml. These options are mainly various PHP statements, which are normally in the php.ini. Furthermore, included are the user-defined functions, which should be available server-wide. Note: to prevent users from writing custom macros for specific functions, you can disable those functions in macro_engine_config.xml. Use the parameter
disable_functions in the ini_directives section.
Note: Macro Engine scripts are written in PHP, and have to be compliant with the PHP version used by Macro Engine and Supervision Server, respectively. They also can make use of Jedox-specific PHP functions, which may be dependent on the Jedox version in use. New versions of Jedox may include new versions of PHP in these two components, and thus may require manual adjustment of script code. Additionally, scripts developed in and working with a current version of Jedox may not work in a previous version.
Jedox 2020.2 (and later) uses PHP version 7. Sample scripts shipped by Jedox (e.g. for Drillthrough) do not have to be changed, but modifications to custom scripts (depending on their complexity) may be required. A list of required changes is available in the PHP documentation https://www.php.net/manual/en/migration70.php.
The following is an example of a macro_engine_config.xml:
The sections of the configuration file are:
- php_extensions: used to define the path to PHP extensions used in ME; within this section you specify the files to be loaded when ME loads.
- php_files: used to specify relevant PHP directories, such as “temp” and “include”. You can specify more than one “include” directory path
- ini_directives: here you can specify general PHP settings. In standalone PHP, such settings are found in the file php.ini.
- functions: used to specify custom functions that will be available to every ME user. You have to specify the name of the function as it should be used in the spreadsheet, the path to the file that contains the definition for the function, and the internal name of the function.
The “always_recalc” flag controls whether the function should always be calculated (true), or only upon change in the value of arguments of the function (false).
Note: if you update from an older version to the latest version, you have to manually copy all custom libraries (files) from
../core/php_macros/lib(Windows) and from
See also Macro Engine Overview.