Command Line Deployment

<< Click to Display Table of Contents >>

Navigation:  Bizagi Engine > Bizagi system administration > Deployment of processes and new versions >

Command Line Deployment

Overview

Once the automation of a process has been completed, the next step is to make it available for users and clients to interact live with it, which means that the following step after automation is Deployment.

 

Bizagi offers 2 main different ways to deploy a project, namely One-click Deployment and Advanced Deployment. The former provides an interface to step by step configure the deployment's variables and objects. The latter gives the user total control over what is going to be deployed and what is not. For more information on Deployment procedures refer to this article.

 

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 requires 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\).

 

The purpose of each executable file and where it should be used is described in the following table.

 

Executable

Purpose

Export.exe

Creates a .bex export file where you will have a package of objects from your Development environment of selected process versions.

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.

 

Export.exe

Use this executable to generate the initial package of objects you want to deploy from your Development environment.

This should be the only executable file which is configured to reference the Development environment database (the others will reference the Production environment database).

 

The execution of this file uses the following structure:

 

Export.exe --DSNDB "..." --Provider "..." --Outputfile "..." --Config "..." --Workflows "..." –-Options "..." --ExperienceObjects "..." --Log "..." --ErrorLogger "..."

 

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:

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

o[Login_password]: The password for the above login.

o[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.

o[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:

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

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

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

o[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.

o[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".

 

Outputfile: name of the .bex export file where you will have a package of objects from your Development environment of selected process versions. This parameter is mandatory.

 

Config: JSON file where the deployment configuration is set. This parameter is mandatory as long as no parameters have been defined through command line. The creation of this file is explained beyond.

 

Workflows:  JSON structure with all the processes to be deployed. This parameter is mandatory and should be included in the command line or in the config file for the execution (--Config attribute).

This parameter must be set in the following structure:

--Workflows "[{\"DisplayName\": \"Bilirubin\",\"Version\": \"1.0\"},{\"DisplayName\": \"Credit Card\",\"Version\": \"1.1\"}]"

 

Options: JSON structure with the additional possibilities to include or exclude those objects managed by Bizagi. This parameter is mandatory and should be included in the command line or in the config file for the execution (--Config attribute). All the values here are Boolean type.

 

OPTION

HOW TO USE IT?

WHEN TO USE IT?

Include environment parameter values

\"EnvironmentParamsValue\": true|false

You may include managed values for your given environments. It is recommended to make sure that these parameter values (such as the SMTP server, interfaces URL, etc) correspond each to their environment configuration.

Include user jobs

\"Custom Job\": true|false

If your project uses custom jobs, make sure you set this to true in order to ensure these are included.

Include organization

\"Org Tables\": {
 \"Position\": true|false,
 \"Skills\": true|false,
 \"Location\": true|false,
 \"Area\": true|false,
 \"Role\": true|false
},

Set true for any organization configuration you want to include in the deployment.

Include authentication options.

\"AuthOption\": true|false

You may include the authentication options you have previously customized in Bizagi Studio for this project. Nonetheless, these options can be managed through the Management Console in your production environment.

Include records of parameter entities managed in production

\"EntParamData\": true|false

You may initially and from Bizagi Studio options, make sure set true for each parameter entity whose records you will need to be deployed from the Development environment.

If you do have entities that need their values updated from the Development environment, make sure this item is set as true.

 

Example:

--Options "{\"Custom Job\": false,\"Org Tables\": {\"Position\": true,\"Skills\": true,\"Location\": true,\"Area\": true,\"Role\": true},\"EnvironmentParamsValue\": true,\"AuthOption\": true,\"EntParamData\": false}"

 

ExperienceObjects: JSON structure with all the Experience objects to be deployed. This parameter is mandatory and should be included in the command line or in the config file for the execution (--Config attribute).

This parameter must be set in the following structure:

--ExperienceObjects "[{\"Entity\": \"Librarian\",\"Type\": \"MySearch\",\"Name\": \"Search books\"},{\"Entity\": \"Patient\",\"Type\": \"EntityAction\",\"Name\": \"Start Triage\"},{\"Entity\": \"X-ray\",\"Type\": \"EntityConstructor\",\"Name\": \"EntityConstructor\"}]"

 

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.

 

note_pin

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

 

Export configuration file

In order to ease the construction of the parameters (either to paste them to the Command Prompt Window or to send them through the config file), Bizagi features an option available from the export method of Advanced Deployment. This option allows you to export a JSON file with the structure for the parameters --Workflows, –-Options, and --ExperienceObjects.

 

To generate the configuration file, follow these steps:

1. Follow the steps 1 to 4 described file in Advanced Deployment for export.exe.

 

2. Once the configuration has been made, click Settings menu and then, click Save option.

 

CLD_01

 

3. Select the path where the configuration file will be saved. The configuration file is saved as JSON type.

 

CLD_05

 

Once the configuration file is stored, you may use it by setting its full path in the --Config parameter. For further deployments, you may update this configuration file manually or by following again the steps mentioned.

If you want to include the information of your connection string in this file, add the Dsndb and Provider parameters before the Workflows parameter.

 

CLD_07

 

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.