Athento NX Extended Config
Repository
https://github.com/athento/athento-nx-extended-config
Summary
One of the most important enhancements that provides Athento NX is its capability to provide a configuration framework to all modules included within.
This configuration is based on a simple principle: any changes in parameters are applied IMMEDIATELY to Athento, with NO NEED TO REBOOT the application.
Extended Config is partially a module itself, giving the rest of the modules the basics so every module does not need to reimplement once and again the common interface, and partially is a "way of doing things" to include new configurations (in both the technical and semantic way).
As a module, it brings the "Ext.Config" screen, accesible by the administrators, assures that the main configuration structure is declared and created. Once Athento NX Extended Config is in place, new links and configuration structure appears.
On the "way of doing things" part, it guides the way of developing the configuration for every plugin with very simple policies: you just need to create a schema with a metadata for every parameter and the layout to be embedded within the configuration structure. Also, if there is any logic between parameters, developers can implement it in the plugin itself, as part of the customization needed.
Installation
Athento NX Extended Config is available by default in all Athento installations.
To install it as a standalone module: Download the current stable version from "Package" folder and install it via "Local Packages".
User Guide
Extended Config is itself more a configuration framework than an end user functionality, but brings the user a common place to manage all Athento NX parameters.
New "Ext.Config" button, available for administrators.
By clicking this link, the user gain access to the configuration document.Configuration document has the aspect of a common File in Athento. You can see the summary, modify it, etc. Same as every other document.
Every plugin contributes to the configuration by a module (depending on the modules installed, blocks may be different).
To modify the parameters click in "Modify" tab.
After changing the parameter value, click on Save.
Changes are already accepted. Depending on the functionality changed, changes can be clearly visible or may need some actions to be reflected, but for the platform to take the change into account is immediate with no reboot needed.
Developer Guide
Description
Athento NX Extended Config is a public addon. You can clone the repository via https://github.com/athento/athento-nx-extended-config
It is mainly a "resources" plugin. This picture shows the structure of the resources, and they can change from version to version, but will help us to explain how this addon is built.
On a high level point of view, we have:
Automation chains
"ExtendedConfig.goto" - A very simple chain, basically the operation "Seam.NavigateTo" to redirect the user to the /ExtendedConfig document.
User actions
"ExtendedConfig" - One action: a link in Main Tabs that executes the operation "ExtendedConfig.goto"
Documents
"ExtendedConfig" doctype. Extends File, and includes the "HiddenInNavigation" facet. Always, append="true" in every definition. append=true is very important, this is needed for every plugin to contribute with layouts to this doctype.
Lifecycle
"ExtendedConfig" has the default lifecycle. Just for coherency, this help us dealing with delete and undelete transitions.
Structure Templates
"ExtendedConfig" template is included. If does not exist, creates "ExtendedConfig" in the root.
message.properties
Language
Of course, we also have the MANIFEST.MF to include all files, and deployment-fragment that gives instructions for deployment, including the i18n files.
How to implement a specific configuration on a custom addon to be reflected in Extended Config
Given this Configuration Framework, now every plugin must implement its contribution to the configuration layout.
We are going to see it through an example: Athento NX Extended WF (in its version 1.1).
In the next image we can see the structure of the Athento NX Extended WF:
Athento NX Extended WF is an addon included in Athento NX which contributes with a generic, complex and configurable workflow. The configuration in this plugin is extensive, given the main reason for this plugin is to have a customizable workflow.
In this structure, at a high level, we can see:
data
In this folder we have the language files, vocabularies, schemas (xsd), and the generic workflow resource (extended-wf.zip)
META-INF
the MANIFEST.MF, with the project definitiion and reources.
OSGI-INF
Automation, Vocabularies and Workflows are folders where the functionality is implemented.
ExtendedConfig is the folder where we are going to include all resources needed for the configuration.
web
static resources.