Get started with deployment

When a model or an application is ready for testing, it must be deployed to a data location. The deployment creates the data storage structures corresponding to the entities, generates the jobs according to the rules and jobs defined in the model, and exposes the generated applications as defined in the model.

Introduction to deployment

Deployment consists in deploying a Model Edition in a Data Location.

Once this model edition is deployed, it is possible to load, access and manage data in the data location using the applications defined in the model.

In this process, the following components are involved:

  • A Data Location is a database schema into which successive Model Editions will be deployed. This data location is declared in Semarchy xDM, and uses a datasource also defined in the Semarchy xDM platform.

  • In a data location, a Deployed Model Edition is a model version deployed at a given time in a data location.

Deployment process

When a model is complete and need to be tested for run-time, the model designer may decide to deploy this model to a data location.

In this process, the model designer:

  1. Validates the model

  2. Creates a data location and deploys the model

  3. Connects to the application to test it.

  4. Later, when design changes are made to the model, the Designer may redeploy the model.

This document provides the basic tasks required to deploy a model in a development environment. For a full description of the deployment concepts, and a complete walkthrough of the tasks required for a multi-environment or a production deployment, refer to the next topics in this documentation.

Validate the model

An application or a component of the application (business views, forms) must be validated to ensure its correct behavior after deployment and raise possible issues.

To validate the application or one component from the diagram:

  1. In the Model Design view, select the node corresponding to your application right-click and then select Validate.

  2. If you have unsaved editors, select those to save when prompted.

  3. The validation process starts. At the end of the process, the list of issues (errors and warnings) is displayed in the Validation Log view. You can click an error or waning to open the object causing this issue.

Create a data location

A data location is a connection to a database schema via a datasource defined in the Semarchy xDM platform. Make sure that the Semarchy xDM administrator has configured the datasource, and that the database administrator has configured the database schema for this datasource.
You only need to create the data location to deploy the model the first time. Subsequent model changes can be applied by redeploy the model to the same data location.

To create a new data location:

  1. Click the Management button in the Application Builder header.

  2. In the Management view, right-click the Data Locations node and select New Data Location. The Create New Data Location wizard opens.

  3. In the Create New Data Location wizard, check the Auto Fill option and then enter the following values:

    • Name: Internal name of the object.

    • Label: User-friendly label for this object. Note that as the Auto Fill box is checked, the Label is automatically filled in. Modifying this label is optional.

    • Datasource Name: Select the datasource pointing to the schema that will host the data location.

    • In the Description field, optionally enter a description for the Data Location.

    • Select the Location Type for this data location.

    • Select the Deployed Model Edition: This model edition is the first one deployed in the data location.

  4. Click Finish to close the wizard. The data location is created and the first model edition deploys.

Open the application

You can connect to the deployed applications from the Welcome page.

To open an application:

  1. In the Application Builder, select the Welcome Page item in the User Menu.

  2. In the welcome page, click the application icon.

If an application cannot be connected, it appears with a disabled avatar.
You can bookmark the URL when connected to a given application to return directly to this application.
When you connect to an application for the first time, its structure is generated from the model and kept in a cache. To refresh this cache with changes performed in the model or in the application, click the Refresh option in the profile menu, in the upper right corner of the application.

Deploy a model edition

After the initial model edition is deployed, it is possible to deploy other model editions. This single mechanism is used for example to update the deployed model edition with the latest changes performed in an open model edition.

To deploy a model edition:

  1. Click the Management button in the Application Builder header.

  2. In the Management view, expand the Data Locations node, right-click the data location node and select Deploy Model Edition….

  3. If you have unsaved editors, select those to save when prompted.

  4. In the The Deploy Model Edition wizard, select in the Deployed Model Edition the model edition you want to deploy.

  5. Leave the Generate Jobs Definition option checked to generate new integration jobs.

  6. Select the Clear API Enricher Caches option to force the deletion of the enricher caches.

  7. Click Next. The changes to perform on the data location, to support this new model edition, are computed. A second page shows the SQL script to run on the schema to deploy this model edition.

  8. Click Finish to run the script and close the wizard.
    The model edition deploys the jobs first and then runs the SQL code to create or modify the database objects. You can follow this second operation in the Console view at the bottom of the Application Builder.

The new model edition is deployed and the previous model deployment appears under the Deployment History node in the data location.

Deploying a model edition does not modify data already in place in the data location.
When deploying a model edition, Semarchy lists the database objects in the data location schema and detects those it needs to create or modify. If you need to create database objects (such as indexes) in the data location schema, make sure to prefix their name with USR_. Semarchy always ignores objects named with this prefix.