Creating New Domain and Client Packages

New domain and client packages must expose the correct configuration to Refinery Core in order to extend functionality.

System and state configuration

System (system-config) and state (state-config) configuration is stored within the $DELTA_DATA/refinery folder. It is recommended that this configuration be stored in the deployment package and then copied as part of the installation.

To work with the limitations of the installation script, it is recommended to create a settings folder within the root of the package.

ENV|REFINERY_CONFIG_DIR|dir|DELTA_DATA/refinery|0
CPY|settings|dir|${REFINERY_CONFIG_DIR}|

Code extension

To load additional code files into the application from a domain or client package, a src folder should be created within the root of the package. The custom code files should be placed into this src directory.

The package name should then be assigned to the appropriate variable to allow Refinery Core to access the code.

# Domain package
ENV|REF_DOMAIN_PACKAGE|string|*package-prefix*|0

# Client package
ENV|REF_CLIENT_PACKAGE|string|*package-prefix*|0

This variable should be stored within a .install.config file with the naming convention <NAME_OF_PACKAGE>.install.config . The .install.config file should reside within <NAME_OF_PACKAGE>/install_config/profiles/ .

For example, in a client package called CustomRefinery, the package structure would be as follows:

CustomRefinery/
|_install_config/
   |_profiles/
     |_ CustomRefinery.install.config
|_src/
  |_**.q  

The .install.config file for this package would contain:

ENV|REF_CLIENT_PACKAGE|string|CustomRefinery|0
DEP|

To implement this package within a Refinery install, place the client package in the packages directory of the chosen KxRefinery bundle and install as per instructions.

The package prefix specified will be used as a lookup within the $DELTA_PACKAGE_HOME folder and the first matching folder will be used. To check the source packages in use within a system, you can query the .boot.cfg.srcPaths table. Any modified files within the src folders can be picked up by a process once it is restarted.