Qorus Integration Engine®
4.0.3.p2_git
|
Custom release scripts allow Qorus developers to perform fine-tuned release tasks automatically running oload: Data Loading Tool and Schema Manager or in standard deployment packages made by make-release: Qorus Release Packager.
oload: Data Loading Tool and Schema Manager (also called internally in packages created by make-release) recognizes the qscript
file extension and the script is executed in the particular place of the oload run.
File mask:
*-pre.qscript
Scripts are run at the beginning of the deployment. Before anything else.
File mask:
*.qscript
original, legacy qscripts*-post.qscript
Scripts are run after the deployment. But before potential Qorus server obejcts reload.
File mask:
*-post_reload.qscript
Scripts are run after the deployment and after potential Qorus server objects reload.
Custom release scripts are regular Qore language scripts with unlimited support for all features provided including user modules etc.
Every script is sandboxed into dedicated Qore Program object with Qorus option qorus.defines imported.
The biggest advantage can be availability of import of QorusClientCore module. See Client Library API Reference
Useful functions are available in Module module
Example - a script checking presence of some directory on filesystem with its creation:
With usage and a showcase that dir 'foo' is really created
[lister:bin pvanek] ls -l /appl/data/mseplftp/ total 0 [lister:work pvanek] oload test.qscript Running custom script: /Users/pvanek/src/qorus/work/test.qscript checking dir: /appl/data/mseplftp/foo [lister:bin pvanek] ls -l /appl/data/mseplftp/ total 0 drwxr-xr-x 2 pvanek staff 68 Nov 11 22:14 foo