The Designer command-line interface

Semarchy xDI Designer ships with a command-line interface (CLI) to process scripts that build packages or deliveries, extract information from packages, and more. You can use this interface to automate the build process.

Using the Designer CLI

Generate packages, and perform similar operations from the command line, by running a script file from a Designer installation folder.

Create a script file

The script file is a text file containing one designer command per line, as in the following example:

Example 1. Example of a Designer script file
buildPackage -mainProcessWorkspacePath "MyProject/Source Models/process_A.proc" -package "WKS:/Built Items/myPackage01.pck"
extractPackageInfo -package "WKS:/Built Items/myPackage01.pck" -extract manifest -outputFile "D:/Extract/packageReport.txt"
buildDelivery -package "WKS:/Built Items/myPackage01.pck" -buildmode substitution -confFile "D:/Configuration Files/confA.conf"

Run the script file

After you create the script file, you can run it to perform your operations in batches.

From a command-line window, go to the Semarchy xDI Designer installation folder, and run the Designer command file:

Example 2. Windows
semarchy-xdi-designer-cli.bat
     -script "<SCRIPT_PATH>"
     -workspace "<WORKSPACE_PATH>"
     [-logFile "<LOG_FILE_PATH>"]
     [-cleanProjects]
     [-rebuildCache]
     [-importFrom "<FOLDER>"]
Example 3. Unix
semarchy-xdi-designer-cli.sh
     -script "<SCRIPT_PATH>"
     -workspace "<WORKSPACE_PATH>"
     [-logFile "<LOG_FILE_PATH>"]
     [-cleanProjects]
     [-rebuildCache]
     [-importFrom "<FOLDER>"]

This command uses the following parameters:

Parameter Description

-script "<SCRIPT_PATH>"

Path to the script file.

-workspace "<WORKSPACE_PATH>"

Path to the Designer workspace where the processes are stored.

-logFile "<LOG_FILE_PATH>"

Optional

Path to a file storing the packages generation logs.

-cleanProjects

Optional

Rebuild all the processes before executing the script. This corresponds to the Project > Clean menu action in Designer.

-rebuildCache

Optional

Rebuild the cache before executing the script. This corresponds to the Rebuild Cache action of the Impact view in Designer.

-importFrom "<FOLDER>"

Optional

Use this option to import projects not in the workspace defined in the -workspace option. <FOLDER> is the path to a folder containing Projects to import into the workspace before running the script.

Example 4. Example Designer command for Windows
semarchy-xdi-designer-cli.sh
    -script "D:/resources/scripts/processPackages.txt"
    -workspace "D:/workspace/development"

Designer CLI Java options

The Designer CLI reads Java parameters from the semarchy-xdi-designer-* INI files in the main Designer directory. You can also pass Java properties to the CLI directly with the following syntax:

semarchy-xdi-designer-cli.bat <CLI_PARAMS> -vmargs <JVM_PARAMS>

Using the -vmargs switch directly makes the Designer CLI ignore any -vmargs switches in the INI file. In this case, you must specify them all manually, like in the following example:

semarchy-xdi-designer-cli.bat <CLI_PARAMS> -vmargs -Dxdi.designer.runtime.home=runtime -Dxdi.designer.module.path.v1=runtime/modules -Djavax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom=net.sf.saxon.xpath.XPathFactoryImpl --add-modules=ALL-SYSTEM -Xss256k <ADDITIONAL_JVM_PARAMS_HERE>

Make sure to change paths and other parameters to suit your environment.

See Configure the Designer for more information about Java options.