The Server Addon tab in the ILLiad Customization Manager facilitates the installation and management of custom Server Addon scripts that you can create to perform certain processes automatically without staff intervention, such as routing items and adding or removing flags.
Unlike Client Addons, Server Addons run in the ILLiad System Manager. They are stored in the ServerAddons database table instead of the file system, and can be created and modified easily from within the Customization Manager. The ServerAddons table stores the name, configuration, and LUA script for each server Addon you have created. In the Customization Manager, the Code tab contains the LUA script. The Configuration tab holds the configuration information that you would typically find in the Addon's config.xml file.
The Server Addons Form
When you click on the New button on the Server Addons ribbon, the Server Addons form opens to display the Code and Configuration tabs. As stated above, the Code tab contains the LUA script for the server Addon and the Configuration tab holds the configuration information that you would typically find in the Addon's config.xml file. Basic formatting for the LUA script and configuration information is supplied in the form of a placeholder to be replaced with any settings that may be needed by the Addon.
The Code Tab
The Code tab contains the LUA script comprising the code of the Addon and is pre-configured with settings for behavior specific to Server Addons. All server Addons will need settings, an INIT function, and an error function:
- The Addon's INIT method will most likely register for the system timer elapsed Activity. An Addon will register a handler for this Activity and the ILLiad system manager will periodically raise the system manager timer elapsed Activity with an interval defined by the new Customization Manager key SystemManagerAddonInterval. Each time this Activity is raised the server Addon will have an opportunity to do whatever processing it needs to do. Examples of this would be checking the status of transactions and seeing if they need routing, or using text files.
- The OnError function: if an error occurs in the scripting system, the system manager will try to alert the script by calling the OnError function and passing an argument that represents a ScriptException object. See Error Handling in the ILLiad Addons space for a description of what properties are available to that object.
For further information on configuring the LUA script see the page Addon Technical Overview in the ILLiad Addons space.
The Configuration Tab
While the Configuration tab contains the information you would typically find in an Addon's config.xml file, there are some key differences here for Server Addons:
- The Addon is of the <Type> Server. This setting should not be changed. Server Addons run through the system manager timer.
- The <Forms/> and <Files/> fields are blank because Server Addons do not exist in forms or files. Because Server Addons do not have any form interface, you cannot do things like create web browser controls and navigate to websites.
Server Addons make use of several common ExecuteCommand options. These commands and their parameters are shown in the table below. You can read more about the ExecuteCommand on the page Global Methods in the ILLiad Addons space.
Modifying Server Addons
You can edit and delete existing server Addons from the Server Addons tab in the Customization Manager. Setting the active value from true or false will only enable or halt execution of that Addon but will not reset the cache. If there are code changes that need to be accounted for, the version number must be incremented so that the cache can be cleared.
Editing Server Addons
Editing allows you to change all values in the ServerAddon table records except the auto-generated ID. This number will not change.
- Click the Select Addon button and select the Addon you wish to modify from the drop-down list.
This opens the Server Addons form for that Addon, displaying the Code and Configuration information.
- Make your changes to the Code or Configuration forms as needed.
- Click the Save button to save the changes to your server Addon.
The System Manager caches server Addons. Sometimes you’ll need to clear that cache for a particular Addon if you are making changes to a server Addon’s code or configuration of the Addon.
- The suggested method is to increment the version number that is in the configuration tab of the Addon. Atlas recommends incrementing the build portion (3rd part) of the version. E.g. For version 1.2.3, the build number is 3 and you would increment that to 4 when making a code change or modifying the configuration in any way (like changing the value of a setting). The major & minor portions should be reserved for the Addon developer to indicate changes made to the Addon. There is no limit to the numbers that can be used within the version number but they should be numeric.
- Restarting the system manager will also clear the cache of the server Addons though this is more intrusive to other server Addons and existing processes that the system manager may be working on.
Deleting Server Addons
Delete a server Addon removes it from the ServerAddons database table.
- Click the Select Addon button and select the Addon you wish to delete from the drop-down list.
This opens the Server Addons form displaying the Code and Configuration information.
- Click the Delete button to delete the server Addon from the database.
A popup confirmation asks if you would like to delete the Server Addon and reminds you that this action cannot be undone. Click Yes to delete the Addon.
- The Addon is removed from the Server Addons form and the ServerAddons database table.