Generate a package using command line

<< Click to Display Table of Contents >>

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

Generate a package using command line

Overview

You can generate a package using commands in a command prompt. This section explains how you can generate packages form a command.

 

Important

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

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 file

The Command Line Deployment uses an executable file featured by the Advanced Deployment, each having its own parameters.

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

 

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.

 

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 make sure 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 described in Generate a package from Studio.

 

2. Once the configuration has been made, click the Save button.

 

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