The Command Line Console is a command-line client that enables you to perform administrative action on the LSPS Server from command line. It is provided as batch and bash file lsps-cli
in the $LSPS_RUNTIME_HOME/cli-tools
folder of the LSPS Runtime package.
Note: Before using the Command Line Console, make sure you have installed a supported JDK and set up the environment variable JAVA_HOME since the batch and shell scripts are wrapper scripts that run the respective java method with the LSPS libraries on the classpath and forward it the call parameters.
To send a call using the Command Line Console, do the following:
Note that --properties
and --filterProps
are defined as pairs of values, for example, property1 value property2 value2
. If the properties use whitespaces, use the quotes for the given property or value, for example, "property 1" value property2 "value 2"
The lsps-cli tool provides the following commands:
modelList lists the models in the model repository on the LSPS Server;
Long Option | Short Option | Description |
---|---|---|
--host | -h | host URL (required) |
--username | -u | user name (required) |
--password | -p | password (required) |
--name | -n | model name (supports wildcards) |
--version | -v | model version (supports wildcards) |
modelUpload uploads a model;
Important: You can upload only Modules exported with the GO-BPMN export.
Long Option | Short Option | Description |
---|---|---|
--host | -h | host URL (required) |
--username | -u | user name (required) |
--password | -p | password (required) |
--model | -m | list of model filenames or directories |
--dbUpdateStrategy | strategy for database handling (required);possible values: nothing, update, validate, drop |
modelUnload removed the module from the server; note that roles and role assignment remain unchanged.
Long Option | Short Option | Description |
---|---|---|
--host | -h | host URL (required) |
--username | -u | user name (required) |
--password | -p | password (required) |
--name | -n | model name (supports wilcards) |
--force | do not prompt on unload |
When calling any of the management commands, make sure to define the model instances you perform the command on. If you want to work with one model instance with a particular id, define its id using the --modelInstance
parameter. If you want to perform the command over multiple instances, use one of the filter parameters:
--modelInstanceFile
parameter with a file with the IDs--filterStatus
, filterFrom
and filterTo
, --filterProps
, etc. for multiple model instances based on their properties.modelInstanceList returns possibly filtered list of model instances;
Long Option | Short Option | Description |
---|---|---|
--host | -h | host URL (required) |
--username | -u | user name (required) |
--password | -p | password (required) |
--modelInstance | model instance ids | |
--modelInstanceFile | file containing the base model | |
--filterModelId | IDs of the base models | |
--filterModelName | model name patern (wildcards supported) | |
--filterModelVersion | model version (wildcards supported) | |
--filterStatus | models in the defined execution status (CREATED, RUNNING, SUSPENDED, FINISHED) | |
--filterFrom | model instance(s) initiated after TIMESTAMP, format: yyyy-MM-dd HH:mm:ss | |
--filterTo | model instance(s) initiated before TIMESTAMP, format: yyyy-MM-dd HH:mm:ss | |
--filterProps | model instance properties defined as key1 value1 key2 value2 | |
--filterExpression | boolean expression; Only the model instances for which the expression evaluates to true are returned. |
export exports a model instance as an XML file;
Long Option | Short Option | Description |
---|---|---|
--host | -h | host URL (required) |
--username | -u | user name (required) |
--password | -p | password (required) |
--modelInstance | model instance IDs | |
--modelInstanceFile | file with model instance IDs | |
--location | output location and file prefix (model instance IDs are appended to the prefix) |
suspend suspends model instances;
Long Option | Short Option | Description |
---|---|---|
--host | -h | host URL (required) |
--username | -u | user name (required) |
--password | -p | password (required) |
--modelInstance | model instance IDs | |
--modelInstanceFile | file with model instance IDs to be requested | |
--filterModelId | IDs of the base models | |
--filterModelName | model name patern (wildcards supported) | |
--filterModelVersion | model version (wildcards supported) | |
--filterFrom | model instance(s) initiated after TIMESTAMP, format: yyyy-MM-dd HH:mm:ss | |
--filterTo | model instance(s) initiated before TIMESTAMP, format: yyyy-MM-dd HH:mm:ss | |
--filterProps | model instance properties defined as key1 value1 key2 value2 | |
--filterExpression | boolean expression; Only the model instances for which the expression evaluates to true are returned. | |
--testFilter | boolean expression; displays the model instances affected by the command (the command is not executed) |
resume resumes model instances;
Long Option | Short Option | Description |
---|---|---|
--host | -h | host URL (required) |
--username | -u | user name (required) |
--password | -p | password (required) |
--modelInstance | model instance IDs | |
--modelInstanceFile | file with model instance IDs to be resumed | |
--filterModelId | IDs of the base models | |
--filterModelName | model name pattern (wildcards supported) | |
--filterModelVersion | model version (wildcards supported) | |
--filterFrom | model instance(s) initiated after TIMESTAMP, format: yyyy-MM-dd HH:mm:ss | |
--filterTo | model instance(s) initiated before TIMESTAMP, format: yyyy-MM-dd HH:mm:ss | |
--filterProps | model instance properties defined as key1 value1 key2 value2 | |
--filterExpression | boolean expression; Only the model instances for which the expression evaluates to true are returned. | |
--testFilter | boolean expression; displays the model instances affected by the command (the command is not executed) |
finish finishes model instances
Long Option | Short Option | Description |
---|---|---|
--host | -h | host URL (required) |
--username | -u | user name (required) |
--password | -p | password (required) |
--modelInstance | model instance IDs | |
--modelInstanceFile | file with model instance IDs to be resumed | |
--filterModelId | IDs of the base models | |
--filterModelName | model name patern (wildcards supported) | |
--filterModelVersion | model version (wildcards supported) | |
--filterFrom | model instance(s) initiated after TIMESTAMP, format: yyyy-MM-dd HH:mm:ss | |
--filterTo | model instance(s) initiated before TIMESTAMP, format: yyyy-MM-dd HH:mm:ss | |
--filterProps | model instance properties defined as key1 value1 key2 value2 | |
--filterExpression | boolean expression; Only the model instances for which the expression evaluates to true are returned. | |
--testFilter | boolean expression; displays the model instances affected by the command (the command is not executed) |
When calling any of the model update commands, the commands will be executed on all model instances of the model as defined in the provided muc file.
If you want to work only with one model instance with a particular id, define its id using the --modelInstance
parameter. If you want to perform the command over multiple instances, use one of the filter parameters:
--modelInstanceFile
parameter with a file with the IDs (each ID on a new line)--filterStatus
, filterFrom
and filterTo
, --filterProps
, etc. for multiple model instances based on their properties.Consider using the --testFilter
parameter to trigger a dryrun and check the resulting set of model instances.
Note: To acquire the model update command, you can set up a test model update and use the Show command line script feature in PDS.
Example model update command
modelUpdate updates models instances based on the provided muc file
Long Option | Short Option | Description |
---|---|---|
--host | -h | host URL (required) |
--username | -u | user name (required) |
--password | -p | password (required) |
--muc | muc file (required) | |
--datamapping | data mapping definition | |
--modelInstance | model instance IDs | |
--modelInstanceFile | file with model instance IDs to be updated | |
--filterStatus | only model instances in the defined execution status are updated (RUNNING, SUSPENDED, UPDATED, UPDATE_ABORTED) | |
--filterFrom | model instance(s) initiated after TIMESTAMP, format: yyyy-MM-dd HH:mm:ss | |
--filterTo | model instance(s) initiated before TIMESTAMP, format: yyyy-MM-dd HH:mm:ss | |
--filterProps | model instance properties defined as key1 value1 key2 value2 | |
--filterExpression | boolean expression; Only the model instances for which the expression evaluates to true are returned. | |
--testFilter | boolean expression; displays the model instances affected by the command (the command is not executed) |
continueTransform triggers the transformation phase of update on the model instances;
Long Option | Short Option | Description |
---|---|---|
--host | -h | host URL (required) |
--username | -u | user name (required) |
--password | -p | password (required) |
--modelInstance | model instance ids | |
--modelInstanceFile | file containing the base model | |
--filterModelId | IDs of the base models | |
--filterModelName | model name patern (wildcards supported) | |
--filterModelVersion | model version (wildcards supported) | |
--filterFrom | model instance(s) initiated after TIMESTAMP, format: yyyy-MM-dd HH:mm:ss | |
--filterTo | model instance(s) initiated before TIMESTAMP, format: yyyy-MM-dd HH:mm:ss | |
--filterProps | model instance properties defined as key1 value1 key2 value2 | |
--filterExpression | boolean expression; Only the model instances for which the expression evaluates to true are returned. | |
--testFilter | boolean expression; displays the model instances affected by the command (the command is not executed) |
continuePostprocess triggers the postprocess phase of model update;
Long Option | Short Option | Description |
---|---|---|
--host | -h | host URL (required) |
--username | -u | user name (required) |
--password | -p | password (required) |
--modelInstance | model insance ids | |
--modelInstanceFile | file containing the base model | |
--filterModelId | IDs of the base models | |
--filterModelName | model name patern (wildcards supported) | |
--filterModelVersion | model version (wildcards supported) | |
--filterFrom | model instance(s) initiated after TIMESTAMP, format: yyyy-MM-dd HH:mm:ss | |
--filterTo | model instance(s) initiated before TIMESTAMP, format: yyyy-MM-dd HH:mm:ss | |
--filterProps | model instance properties defined as key1 value1 key2 value2 | |
--filterExpression | boolean expression; Only the model instances for which the expression evaluates to true are returned. | |
--testFilter | boolean expression; displays the model instances affected by the command (the command is not executed) |
abortModelUpdate aborts update of model instances;
Long Option | Short Option | Description |
---|---|---|
--host | -h | host URL (required) |
--username | -u | user name (required) |
--password | -p | password (required) |
--modelInstance | model instance ids | |
--modelInstanceFile | file containing the base model | |
--filterModelId | IDs of the base models | |
--filterModelName | model name patern (wildcards supported) | |
--filterModelVersion | model version (wildcards supported) | |
--filterFrom | model instance(s) initiated after TIMESTAMP, format: yyyy-MM-dd HH:mm:ss | |
--filterTo | model instance(s) initiated before TIMESTAMP, format: yyyy-MM-dd HH:mm:ss | |
--filterProps | model instance properties defined as key1 value1 key2 value2 | |
--filterExpression | boolean expression; Only the model instances for which the expression evaluates to true are returned. | |
--testFilter | boolean expression; displays the model instances affected by the command (the command is not executed) |
startModelInstance instantiates and starts a model instance
Long Option | Short Option | Description |
---|---|---|
--host | -h | host URL (required) |
--username | -u | user name (required) |
--password | -p | password (required) |
--modelName | base model name | |
--modelVersion | base model version | |
--modelId | base model ID | |
--properties | model instance properties defined a list of key-value pairs |
To use the command-line tool from a Java program, do the following:
<dependency> <groupId>com.whitestein.lsps.mconsolecl</groupId> <artifactId>lsps-mconsole-cl</artifactId> <version>${project.version}</version> </dependency>