LSPS documentation logo
LSPS Documentation
Module Management

Modules are parts of a business model that are either used to create model instances or are imported and used by other modules: they constitute a logical part of the model providing resources, related data structures, etc. used by other modules.

Modules are created in Designer. Once ready, you can upload them to an LSPS Server using one of the management tools. On upload, a module with all its module imports is uploaded to the Module Repository of the LSPS Server. Management tools allow you to manage the modules in the Module Repository: apart from uploading of modules, you can download and delete them.

Module List

When working with modules, the following properties are available to the management tools:

  • Name: arbitrary name as specified in module properties
  • Version: version as specified in module properties
  • Executable: whether the module can be used to create model instances
  • Upload date: time when the module was uploaded
  • Unfinished instances: number of unfinished (running and suspended) model instances based on the module (only on executable modules)
  • Hash: hash code counted based on the content and properties of the module
  • Id: id of the module unique on the server

Listing Modules in the Management Perspective

To list the modules uploaded on an LSPS Server in the Management Perspective, connect Designer to the LSPS Server and open the Management perspective: the list of modules is available in the Module Management view.

modulemanagement.png
If the view is not displayed, go to Window > Show View > Module Management

Listing Modules in Management Console

To list the modules uploaded on an LSPS Server in Management Console, log in to the console and open the Modules page.

modulemanagementweb.png

Listing Modules from the Command Line

To list the modules on the LSPS Server from the Command Line, use the modelList command.

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

* required parameters

$ java -jar lsps-cli-<VERSION>.jar modelList -d http://localhost:8080 -u admin -p admin
Id    Name             Executable Upload Date          Unfinished Instances Hash                                    
2004  formsforms - 1.0 true       2020-03-26 10:11:57  2                    f8cbc787302
2007  uiforms - 1.0    true       2020-03-26 10:23:09  4                    7e384c936f4
2011  uiforms - 1.0    true       2020-03-26 11:34:41  4                    11de15b3fbb
2012  createTodo - 1.0 true       2020-03-26 12:01:41  3                    809ec46fc69
2003  forms - 3.3      false      2020-03-26 12:01:41                       c0505fb1356
2014  uiforms - 1.0    true       2020-03-26 12:22:20  0                    5168fd905ab

Module Upload

When uploading a module to the Module Repository so it can be used by model instances, you need to define how to deal with any database changes the module might be introducing. The behavior is is set by the database update strategy:

  • Do not change: Existing schema remains unchanged.
  • Update by model: New tables, columns and relationships are added; no data is deleted.
  • Validate: Existing schema is validated against the new model schema (if inconsistencies are detected, the model launching fails).
  • Drop and create modeled DB tables: Existing schema is dropped and a new schema following the new model definitions is created.

If the database already contains data in the pertinent tables and you want to upgrade the schema to match the schema of new versions of the modules, first generate the schema update scripts, modify the scripts to migrate the schema with your business data before you upload the modules.

Uploading a Module from the Management Perspective

To upload a module from your workspace or a module zip file using the Management perspective of your Designer, do the following:

  1. Make sure your Designer is connected to the correct LSPS server.
  2. In the Module Management view, click the Upload button.
  3. In the Module Upload dialog, define the upload details:
    1. Select either a zip file with an exported module on your filesystem or a module from your workspace.
    2. Define the database update strategy.
    3. Unselect the Do not execute schema update scripts flag.
  4. Click OK.

Generating Schema Update Scripts

When upgrading the data model of your model to a version which is not backward compatible and you want to migrate the existing data or migrate the underlying database schema manually, generate the schema update scripts for your models, modify them as required and apply them on the database.

To generate the schema update scripts for your modules do the following:

  1. Open Designer and connect to the LSPS Server with the current modules.
  2. Switch to the Management perspective.
  3. In the Module Management view, click the Upload button.
  4. In the Module Upload dialog, define the details:
    1. Select either a zip files with the new modules or modules from your workspace.
    2. Set Database Schema Strategy: Set Update by model to generate scripts that will update the current schema or Drop and Create Modeled DB Tables to generate scripts that will create the new schema from scratch.
    3. Select the Do not execute DB scripts scripts flag: This prevent the schema update scripts execution and makes the scripts available in the tab Schema Update Scripts. You can find details such as lists of problems and conflicts discovered in the current schema in the script details.
  5. Adapt the scripts as necessary:
    • Include the data stored in the tables of the old schemaUpdateScripts
    • Do not remove any tables or columns used by either the new or old models if their instances will be updated as part of migration (the new and old schema must be backward-compatible).
schemaUpdateScripts.png

Uploading a Module from Management Console

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

To upload a Module or a Model to the LSPS Server, do the following:

  1. In the Modules view, click the Upload button.
  2. Define the database update strategy.
  3. In the Model Upload dialog box, locate and select the model, and click Upload.
  4. Click the Upload button.

Uploading a Module from the Command Line

To upload a module from the Command Line, use the modelUpload Command over a module zip file; the zip file must be created with GO-BPMN Export.

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

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

* required parameters

~/lsps-tools/cli-tools$ java -jar lsps-cli-<VERSION>-full.jar modelUpload --destination http://localhost:8080 --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.

Module Details

Displaying Module Details in the Management Perspective

To view the details of a Module in the Management Perspective, do the following:

  1. Open the Module Management view.
  2. Click the Module ID.
  3. Expand the nodes to examine the Module structure.

Displaying Module Details in Management Console

To view the details of a Module in Management Console, do the following:

  1. Open the Modules view.
  2. Click the Module ID.
  3. Expand the nodes to examine the Module structure. For Goal, Plan, and Process diagram node, you can click the Diagram link to display the diagram content.
moduleDetails.png
Details of a Module

Module Unload

On unload, the module is deleted from the Module Repository, and if a module is also a model, its running model instances are terminated. Roles and role assignments are preserved (for further information, refer to Role Management). Exploring features may become unavailable.

Unloading a Module from the Management Perspective

To unload a Module from the LSPS Server, do the following:

  1. In the Module Management view select the model you wish to unload.
  2. Click the Unload ( ) button in the view toolbar.
  3. In the Warning dialog box, click Yes.

The Module is unloaded and no longer available. Any Model instances based on the Model are terminated.

Unloading Modules from Management Console

To unload a module, do the following:

  1. On the Modules page, select the module.
  2. In the view toolbar, click Unload .
  3. In the displayed dialog box, click Unload.

The model is unloaded from the server and any model instances based on the model are finished. Roles and role assignments remain unchanged.

Unloading Modules from the Command Line

To unload the modules from the LSPS Server from the Command Line, use the modelUnload.

Note that roles and role assignment remain unchanged.

Long Option Short OptionDescription
--destination* -d host URL
--username* -u user name
--password* -p password
--name -n module name (supports wilcards)
--version -v module version (supports wilcards)
--force do not prompt on unload

* required parameters

~/lsps-tools/cli-tools$ java -jar lsps-cli-<VERSION>-full.jar modelUnload --destination http://localhost:8080 --username admin --password admin --name <MODULE_NAME>
Found more models:
Are you sure to remove model '15224 (1.0)' from repository? (Y/N)y
Model 15224 (1.0) successfully unloaded.
Are you sure to remove model '15224 (1.0)' from repository? (Y/N)y
Model 15224 (1.0) successfully unloaded.
Unloading models from repository has finished.

Module Download

You can download an uploaded Model or Module from the Model Repository as an archive file and then import the Module into Designer with the GO-BPMN Import and edit it.

Downloading a Model or Module from the Management Perspective

To download a Module from an LSPS Server, do the following:

  1. Make sure Designer is connected to the correct server.
  2. In the Module Management view, select the model.
  3. Click the Download button.
  4. In the Save As dialog box, define the target location and edit the file name if necessary.

Downloading a Model or Module from Management Console

To download a module from the Module Repository of an LSPS Server, do the following:

  1. Open Management Console of the server.
  2. Open the Modules view.
  3. In the modules table, select the module.
  4. Click the Download button.
  5. In the dialog box, click Download.