Package: Index
Builds a package index containing a list of installed packages and its metadata
Designation
- Name
- pm.Index
Configuration
- Optionen
- include index for base folders (
include-base-folders
) - if set an index for the configured base folders will also be created
Description
The package index is saved in an XML variable. In the Automic Automation Engine there is a restriction on the size of entries in a variable. This is set to 1 MB by default. This can be changed via the MAX_VARIABLE_SIZE setting in the UC_SYSTEM_SETTINGS. If there are a large number of b4A Packages in an environment, it may be necessary to increase this limit. The default value should be sufficient up to a number of approx. 1000 b4A Packages. Before changing the setting, the effects should be checked in the Automic Automation documentation.
Further details on the structure of the package index can be found here.
Output format XML variable
The index of the installed b4A packages looks like the XML document in the following example.
<?xml version="1.0" encoding="UTF-8"?>
<best4Automic version="4.4.0">
<pm>
<index>
<packages>
<package name="BBC.AE_UTILS" version="1.0.0">
<description>Actions for using the Automic Automation Engine Utilities</description>
<folder>PACKAGES/BEST-BLU</folder>
<dependencies>
<dependency name="BBC.SHARED" operator="~=" version="1.0.0"/>
</dependencies>
<metadata>
<entry key="Categories" value="BEST-BLU/AUTOMIC"/>
</metadata>
</package>
<package name="BBC.FILEOPS" version="1.0.0">
<description>A set of actions for file operations (Windows only)</description>
<folder>PACKAGES/BEST-BLU</folder>
<dependencies>
<dependency name="BBC.SHARED" operator="~=" version="1.0.0"/>
</dependencies>
<metadata>
<entry key="Categories" value="BEST-BLU/FILESYSTEM, FILESYSTEM"/>
</metadata>
</package>
</packages>
</index>
</pm>
</best4Automic>
Example to read the version number from the b4A package BBC.FILEOPS.
/best4Automic/pm/index/packages/package[@name="BBC.FILEOPS"]/@version
Example of reading information from the XML variable using the AE-Scriptsprache
:SET &hnd# = PREP_PROCESS_VAR_XML(B4A.PM.INDEX, "Packages", '/best4Automic/pm/index/packages/package/@name')
PROCESS &hnd#
: SET &package# = GET_PROCESS_LINE(&hnd#, 1)
: SET &version# = GET_VAR(B4A.PM.INDEX, "Packages", '/best4Automic/pm/index/packages/package[@name="&package#"]/@version')
: PRINT &package# -- &version#
:ENDPROCESS