Command Line for Advanced Deployment

<< Click to Display Table of Contents >>

Navigation:  Automation Server > Deployment  > Advanced Deployment > How to apply a deployment package >

Command Line for Advanced Deployment

Overview

Some users may require to automate the deployment process by simply running a .bat file or they wish to perform changes on specific components on their production environment without performing a complex deployment process. Bizagi acknowledges these situations and offers deployment automation via Command Line Deployment. This is a third way of deploying projects which only require the edition of config files from the user or the specification of parameters.

 

When to use the Command Line Deployment?

Deployments of Processes is done once the automation stage is completed and when you wish to publish your processes into a Test or Production environment.

The Command Line Deployment is useful when you want to automate the deployment process by running a .bat file.

 

How does the Command Line Deployment work?

Command Line Deployment works by following the Export and Import steps from Advanced Deployment by enabling the execution of these steps by command line.

 

Important

Before you continue, make sure you acknowledge the following considerations.

The target environment must have a database of Bizagi's model. Thus, make sure that you run CreateDatabase.exe when performing the deployment process for the first time.

The parameters should not contains the double dash prefix --.

Any backslash character \ inside the configuration file should be replaced with double backslash character \\.

Any quote character " set in the command line window should be preceded by a backslash character \.

 

Required profile

The profile of the user working with the Advanced Deployment needs to:

1. Have a basic understanding of JSON structure (in order to configure the configuration files).

2. Have access to the project environments' Databases (with the superuser credentials).

3. Have expertise or important know-how, about the concepts involved in a Deployment of a project in Bizagi.

For more information about the treatment for deploying objects in Bizagi, refer to deployed objects.

4. Have an understanding of the implemented Processes in the project.

This means knowing about these processes' purposes, data model, versions, integrations, security settings, environment settings management (i.e policy, alarms, parameter entity values), and general workings.

 

Take into account that for proper testing (carrying our user acceptance tests), this will include being able to tell which is the expected behavior of the Processes in the Work Portal (under the different business scenarios).

 

Command Line Deployment executable files

The Command Line Deployment uses two of the executable files featured by the Advanced Deployment, each having its own parameters.

These executable files come in by default installed where the Management Console is installed (at C:\Program Files\Bizagi\Bizagi Studio\MC\). To apply the package you need to use the CreateImport.exe.

 

Executable

Purpose

CreateImport.exe

Applies the changes into your Production environment. This is done after analysis of the .bex export file against the Production environment, and considering how any existing information should be handled (i.e merge of records).

 

For examples of how to build .bat files which run the executed files above, please refer to Export configuration templates.

 

CreateImport.exe

Use this executable to review and apply the package you created through Export.

To use CreateImport.exe, first make sure you have already copied the whole MC folder in a local path of a machine that has network access to your Production environment database (the MC folder contains all 3 executable files and the dll files needed). Furthermore, the export file created before must be accessible from your production environment.

 

The execution of this file uses the following structure:

 

CreateImport.exe --DSNDB "..." --Provider "..." --FilePath "..." --Log "..." --ErrorLogger "..." --Config "..."

Parameters notes and description:

DSNDB: Connection String to the source project database. This parameter is mandatory and should be included in the command line or in the config file for the execution  (--Config attribute).

When using SQL Server:

"Persist Security Info=True;User ID=[SQL_Login];Password=[Login_password];Data Source=[DB_Server]\[Named_instance];Initial Catalog=[Database];"

Consider:

[SQL_Login]: The login account used to connect to that SQL Server database instance.

[Login_password]: The password for the above login.

[DB_Server]: Name or IP address of the database server. Use \[Named_instance] when applies, if your database instance is not the unnamed default one.

[Database]: The name of the project environment's database. Recall that specifically for the CreateDatabase, this database you specify is the one that will be created.

 

When using Oracle:

"Data Source=[DB_Server]:[Port_number]/[Service];User ID=[User_schema];Password=[User_schema_password];Unicode=True;"

Consider:

[DB_Server]: Name or IP address of the database server.

[Port_number]: The TCP port used for the connection to the database service.

[Service]: The service identification for an Oracle instance.

[User_schema]: The name of the project environment's database. Recall that specifically for the CreateDatabase, this database you specify is the one that will be created.

[User_schema_password]: The password for that user schema. It is strongly recommended to encrypt the password using Password Encryption feature.

 

Provider: Client of the source project database. This parameter is mandatory and should be included in the command line or in the config file for the execution (--Config attribute).

The possible values are "MSSqlClient" or "Oracle".

 

FilePath: name of the .bex export file generated before. This parameter is mandatory and should be included in the command line or in the config file for the execution (--Config attribute).

 

Log: File where the trace of the deployment execution will be recorded. This parameter is optional.

 

ErrorLogger: File where the errors during the deployment execution will be recorded. This parameter is optional.

 

Config: JSON file where the configuration is set. This parameter is mandatory as long as no parameters have been defined through command line.

The config file should have the same mandatory parameters mentioned before. Example:

 

{

 "DSNDB": "Persist Security Info=True;User ID=[SQL_Login];Password=[Login_password];Data Source=[DB_Server]\\[Named_instance];Initial Catalog=[Database];;",

 "Provider": "MSSqlClient",

 "FilePath": "input.bex",

 "Log": "log.txt",

 "ErrorLogger": "error.txt"

}

 

note_pin

Even though some parameters are mandatory, if no parameters were set for the execution. The CreateImport will be executed using its own user interface.

 

What is next?

Once you have completed your process deployment through the Command Line Deployment, we recommend you clean up the server's cache before announcing that the deployment procedure is completed.

 

When running your processes in an IIS, after performing a command line deployment you should clear the cache of your Work portal and database.

In order to do this, invoke the following Bizagi web services as available in every project:

Render cache as stored in the database: http://[your_server][your_project]/webservices/cache.asmx?op=CleanRenderCache

Application cache: http://[your_server][your_project]/webservices/cache.asmx?op=CleanUpCache

 

Note that you should restart your IIS services.