LSPS documentation logo
LSPS Documentation
Command-Line Console

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.

Before you can use the Command Line Console, install 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:

  1. Open your command line interface.
  2. On the prompt, run the lsps-cli script with the respective parameters. The supported parameters are described in Command Line Console Commands.

Example tool run

~/lsps-runtime/cli-tools$ ./lsps-cli.sh savedTodoExport -h http://localhost:8080/lsps-ws -u admin -p admin --todoId 12001 --location .

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:

Important: If you require an additional command for a management action, please, contact support.

Model Management

modelList lists the models in the model repository on the LSPS Server;

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--name -n model name (supports wildcards)
--version -v model version (supports wildcards)

* required parameters

~/lsps-runtime/cli-tools$ ./lsps-cli.sh modelList --host http://localhost:8080/lsps-ws --username admin --password admin
    Found 5 model(s).
    Id      Model name    Model version
    2003    15224         1.0
    18000   15224         1.0
    2002    ui            2.8
    2000    core          2.8
    2001    human         2.8

modelUpload uploads a model;

Important: You can upload only Modules exported with the GO-BPMN export.

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--model -m list of model filenames or directories
--dbUpdateStrategy*strategy for database handling possible values: none, update, validate, drop

* required parameters

lsps-cli modelUpload -host http://localhost:8080/lsps-ws -model "C:/models/TestUploadInvalidModel-1.0.zip" -user admin -password admin
~/lsps-runtime/cli-tools$ ./lsps-cli.sh modelUpload --host http://localhost:8080/lsps-ws --username admin --password admin --model /home/eko/lsps-workspace/Queries/ --dbUpdateStrategy validate
Info: Uploading files from /home/eko/lsps-workspace/Queries
Uploading files from /home/eko/lsps-workspace/Queries has finished.

modelUnload removed the module from the server; note that roles and role assignment remain unchanged.

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--name -n model name (supports wilcards)
--force do not prompt on unload

* required parameters

~/lsps-runtime/cli-tools$ ./lsps-cli.sh modelUnload --host http://localhost:8080/lsps-ws --username admin --password admin --name 15224
Found more models:
Are you sure to remove model '15224 (1.0)' from repository? (Y/N)y
Model 15224 (1.0) successfully unloaded.

Model Instance Management

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
  • filter parameters, --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 OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--modelInstance model instance ids
--modelInstanceFile file containing the base model
--filterModelId IDs of the base models
--filterModelName model name pattern (wildcards supported)
--filterModelVersionmodel 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.

* required parameters

./lsps-cli.sh modelInstanceList --host http://localhost:8080/lsps-ws --username admin --password admin --filterProps "my property" value "another property" "another value" --filterFrom "2017-10-31 12:14:00"

export exports a model instance as an XML file;

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--modelInstance model instance IDs
--modelInstanceFile file with model instance IDs
--location output location and file prefix (model instance IDs are appended to the prefix)

* required parameters

exportRaw exports a raw model instance state;

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--modelInstance model instance IDs
--modelInstanceFile file with model instance IDs
--location output location and file prefix (model instance IDs are appended to the prefix)

* required parameters

importRaw import a raw model instance state;

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--modelInstance* model instance ID
--file* file with model instance

* required parameters

suspend suspends model instances;

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--modelInstance model instance IDs
--modelInstanceFile file with model instance IDs to be requested
--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)

* required parameters

./lsps-cli.sh suspend --testFilter --host http://localhost:8080/lsps-ws --username admin --password admin --filterProps myProperty "value" --filterFrom "2017-10-31 12:14:00"

resume resumes model instances;

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--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)
--filterModelVersionmodel 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)

* required parameters

finish finishes model instances

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--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)

* required parameters

restart restarts running or suspended model instances

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--modelId ID of the model used for the restarted model instances (if not specified, each instance is restarted without model change)
--modelInstance model instance IDs
--modelInstanceFile file with model instance IDs to be restarted
--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)

* required parameters

Model Update

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)
  • filter parameters, --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

 lsps-cli modelUpdate --host http://localhost:8080/lsps-ws --username admin --password admin --muc "D:/my_workspaces/my.muc"  --filterStatus RUNNING SUSPENDED UPDATED

modelUpdate updates models instances based on the provided muc file

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--muc* muc file
--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)

* required parameters

continueTransform triggers the transformation phase of update on the model instances;

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--modelInstance model instance ids
--modelInstanceFile file containing the base model
--filterModelId IDs of the base models
--filterModelName model name pattern (wildcards supported)
--filterModelVersionmodel 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)

* required parameters

continuePostprocess triggers the postprocess phase of model update;

Long Option Short Option Description
--host* -h host URL
--username* -u user name
--password* -p password
--modelInstance model instance ids
--modelInstanceFile file containing the base model
--filterModelId IDs of the base models
--filterModelName model name pattern (wildcards supported)
--filterModelVersionmodel 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)

* required parameters

abortModelUpdate aborts update of model instances;

Long Option Short Option Description
--host* -h host URL
--username* -u user name
--password* -p password
--modelInstance model instance ids
--modelInstanceFile file containing the base model
--filterModelId IDs of the base models
--filterModelName model name pattern (wildcards supported)
--filterModelVersionmodel 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)

* required parameters

startModelInstance instantiates and starts a model instance

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--modelName base model name
--modelVersion base model version
--modelId base model ID
--properties model instance properties defined a list of key-value pairs

* required parameters

./lsps-cli.sh startModelInstance --host http://localhost:8080/lsps-ws --username admin --password admin --modelName orderModule --properties customerType enterprises compliant yes
# alternatively:
./lsps-cli.sh startModelInstance --host http://localhost:8080/lsps-ws --username admin --password admin --modelName orderModule --properties "customer type" "enterprises" "compliant" "yes"

Document Management

savedDocumentExport exports a saved document

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password

* required parameters

savedDocumentImport imports a saved document

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--savedDocumentId*saved document id
--file* file with saved document state

* required parameters

To-Do Management

savedTodoExport exports a saved to-do

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--todoId* to-do id
--location output location prefix (todo id will be appended)

* required parameters

savedTodoImport imports a saved document

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--todoId* todo ID
--file* file with to-do state

* required parameters

Engine Management

listSettings lists the engine settings

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password

* required parameters

updateSetting updates the engine setting with the value

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--name -n setting name
--value -v setting value

* required parameters

addSetting adds a new setting with the defined value

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--name -n setting name
--value -v setting value

* required parameters

deleteSetting removes a setting

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--name -n setting name

* required parameters

Person Management

updatePerson updates person's password

The server must be restarted to apply any password changes.

Long Option Short OptionDescription
--host* -h host URL
--username* -u user name
--password* -p password
--new-password*-np new password

* required parameters

./lsps-cli.sh updatePerson -h http://localhost:8080/lsps-ws -u admin -p admin -np admin2