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.

Deployment process

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

In this process, model designers:

  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, they may redeploy the model.

This page outlines the basic tasks needed to deploy a model in a development environment. For a comprehensive explanation of deployment concepts and detailed orientation on the tasks required for multi-environment or production deployment, see the following sections in this documentation.

Validate the model

An application or a component of the application (i.e., business views, forms, etc.) 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 warning 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 redeploying 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. Since the Auto Fill checkbox is selected, the Label field 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.

    • In the Location Type field, select the type of data location.

    • In Deployed Model Edition, select a 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. On the Welcome page, click the application icon.

If an application cannot be connected, it appears with a grayed-out 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 the cache with changes performed in the model or 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 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, xDM 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_. xDM always ignores objects named with this prefix.