Production Extensions Overview
Production Extensions are custom, user-created process nodes that allow the reuse of frequently used script logic in a standardized and packaged manner. Extensions define a reusable piece of code that can be seen as a black box. These extensions are installed on the DiveLine server, which allows for simplified maintenance and bug fixing, regardless of how many scripts call the extension.
When created, Production Extensions are given the pre file extension. These pre files are really "Extension Package" files—they include everything that is needed to install an extension on the server, but are not actually the extensions themselves. After installation, theses extensions appear as Production nodes, so nothing refers directly to the pre file.
As process node types, extensions always have the standard attributes for a Production process node:
- Name, Comments
- Failure Email
- Success Email
- Success Node
- Failure Node
- Working Directory
Extension Packages include the executable script, the specification XML file, and optionally other files, such as readme files, help scripts, or an icon that displays in the GUI.
Two questions to ask before you choose to create a Production Extension:
- Is the script complex enough to warrant an extension?
- Will the logic get frequent reuse?
Production Extensions should be kept as generic as possible to allow for more extensive reuse—use parameters to increase flexibility. A best practice is to use parameter names using only a-z and 0-9, with no spaces.
Production Extensions can use the following script types:
- Production
- Visual Integrator
- DIAL
- PHP
- Java
- Production Extensions can only be created, updated, and deployed by DiveLine administrators.
- For Production Extensions using Java or PHP, you must provide the path to their installations. See Advanced Tab.
- Production Extensions are created locally on your machine and then installed on the DiveLine server with Workbench. Each Production Extension is given a unique GUID upon installation. When used, the Production script contains the GUID and the values for the arguments.
-
Production scripts used as Extensions have access to the parameter $(_extension_directory). If used, the parameter is translated at run time as the GUID of the Extension. If the parameter is used to set a path, it is translated into the system location for the Extension, that is, the DiveLine path, so the Extension has access to this space on disk.
- Production type extensions that use embedded Integrator or Builder scripts must use an Execute node to call the sub-script.