Each model described in the Squore Configuration may define a set of
exports in the models/MODEL/Exports/Bundle.xml
bundle file.
Exports available in the user interface depend on the role of the currently
logged-in user and the selection in the Project Portfolios and the Artefact Tree
views.
Here is an example of a bundle file:
<?xml version="1.0" encoding="UTF-8"?> <Bundle> <Role name="DEFAULT"> <Export type="MODEL"> <ExportScript name="Project Portfolio" script="${scriptDir}/sqexport.pl"> <arg value="-f" /> <arg value="${outputFile}" /> <arg value="versions" /> <arg value="-ml" /> <arg value="-u" /> <arg value="${idUser}" /> <arg value="${idModel}" /> </ExportScript> </Export> <Export type="APPLICATION"> <ExportScript name="Functions with level G" script="${scriptDir}/sqexport.pl"> <arg value="-f" /> <arg value="${outputFile}" /> <arg value="artefacts" /> <arg value="-mR" /> <arg value="-T" /> <arg value="${types['FUNCTION']}" /> <arg value="-L" /> <arg value="LEVELG" /> <arg value="-u" /> <arg value="${idUser}" /> <arg value="${idModel}" /> </ExportScript> </Export> </Role> </Bundle>
The default Squore configuration includes the following scripts by default. Each script is described in an appendix at the end of this manual.
The Bundle.xml
file above contains some variables
that are replaced at runtime. The following is the list of variables that
can be used in the ExportScript
and
arg
XML elements.
Note that the ${outputFile} variable is mandatory.
Used to resolve the location of the addons directories on Squore Server, in
which the scripts/export-scripts
subdirectory contains the default
scripts.
Used to resolve the location of the configuration directories on Squore Server,
in which the <MODEL_NAME>/Exports
subdirectory contains
the scripts you added to the product.
The base URL of the Squore server.
The name of the output file where the export script writes to. The filename is guaranteed to be unique on each call.
The identifier of the logged in user.
The identifier of the model that is currently selected in the Project Portfolios.
The identifier of the application that is currently selected in the Project Portfolios.
The identifier of the version that is currently selected in the Project Portfolios.
The identifier of the artefact that is currently selected in the Artefact Tree.
This function resolves at runtime the type aliases of TYPENAME. That may be used to simplify bundles, as you may achieve the exact same thing by manually listing all types. The result is a coma separated list of types.