Deployment Miscellaneous

<< Click to Display Table of Contents >>

Navigation:  Automation Server > Bizagi system administration > Deployment of processes and new versions > Command Line Deployment >

Deployment Miscellaneous

Overview

The Command Line Deployment have extra methods that can be taken into account to automate some manual operations. The information will be detailed in this article:

 

1. Environment Variables configuration.

2. Passwords Encryption.

3. Force entity replication.

4. Export configuration templates.

 

1. Environment Variables configuration

Bizagi has predefined and custom variables that can be configured depending on user's needs. This functionality helps to update a project's general configuration values, which will reflect on execution behaviors. For example, if you wish to change the time it takes for Bizagi to wipe its cache, you can modify the value of the corresponding Environment Variable in order to do so.

 

The way to specify the variables and its corresponding values is through the execution of BizagiAutomation.exe in a command line as follows:

 

BizagiAutomation.exe --runtype UpdateEnvironment --DSNDB "..." --Provider "..." –EnvironmentName "..." --BizagiValues "..." --CustomValues "..." --Config "..." --Log "..." --ErrorLogger "..."

 

Parameters notes and description:

--runtype: it is used to specify the type of execution of the BizagiAutomation.exe program. In this case the value of this parameter is UpdateEnvironment since Environment Variables are being updated.

--DSNB: Connection String to the project database. This parameter is mandatory.

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's database.

 

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's database.

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

--Provider: Database client. This parameter is mandatory.

oFor Oracle databases use the following string: Oracle

oFor SQL Server databases use the following string: MSSqlClient

--EnvironmentName: Name of the environment to configure. Could be one of Development, Test or Production. This parameter is mandatory.

--BizagiValues: predefined properties to be updated in JSON Syntax. This parameter is optional.

--CustomValues: user defined properties to be set in JSON Syntax. This parameter is optional.

--Log: File where the execution logs should be appended. This parameter is optional.

--ErrorLogger: File where the error logs should be appended. This parameter is optional.

--Config: File with the execution parameters in JSON syntax.

This parameter is an option the user has to send the parameters to the command line program that facilitates the process. In case you want to set the parameters for the execution using a file, you have to build a config file with the following format:

 

{

   "DSNDB":"[DSNB String as it was described above]",

   "Provider":"[MSSqlClient or Oracle]",

   "environmentName": "[Development or Test or Production]",

   "bizagiValues":{

     "sendEmailCopyTo": "alex@company.com",

     "enableEmail": false,

     "interfaceThresholdTime":2500

   },

   "customValues": {

     "AdmonEmail": "user@company.com",

     "defaultHolidays": "200"

   }

}

 

When choosing to send a config file with the parameters, the user should write it before hand and execute the BizagiAutomation.exe command with the --config parameter only. Providing next to it the path to the file containing the execution parameters. For example:

 

BizagiAutomation.exe --runtype UpdateEnvironment --Config "Path to file"

 

Please note that mandatory parameters should be specified in at least one way, either on the command prompt or the config file. In case it is specified on both, Bizagi will only consider the value given in the command prompt.

 

Regarding the BizagiValues and CustomValues, take into account that:

There should at least be one value for BizagiValues and one for CustomValues for the program to execute.

All CustomValues specified must match an existing one with the same exact name.

You can set as many of them as you like, defining them in JSON format.

All the BizagiValues available are:

 

AttribMaxLengthThreshold

EmailIntegrationPassword

QueryEngineDSNDB

UploadMaxFileSize

BizagiSchedulerInterval

EmailIntegrationPort

QueryEngineProviderType

UploadPath

CacheAvailableMemoryPercentageLimit

EmailIntegrationUsername

RepDsndb

WebDavFolder

CacheExpirationCheckInterval

EmailRecipient

RepProviderType

WebDavUrl

CryptographyEncryptionAlgorithm

EnableEmail

SendEmailBccTo

WebServicesTimeOut

CryptographyHashAlgorithm

EnableEntityLog

SendEmailCopyTo

WsLegacyEnabled

CryptographyKeyUrl

EnableMMFactLog

SkipRecipients

WsSecurityEnabled

DataStoreEnabled

EnablePushNotifications

SmtpAccount

WsSecurityPassword

DisableAbortNotifications

EnableTrace

SmtpEnableSsl

WsSecurityUserName

EmailIntegrationAccount

EntityTableCacheTimeout

SmtpPassword

WsSecurityX509CertFindType

EmailIntegrationConnectionType

EntityTesting

SmtpSenderAcc

WsSecurityX509CertFindValue

EmailIntegrationEnabled

InterfaceThresholdTime

SmtpServer

WsSecurityX509CertStoreLocation

EmailIntegrationEnableSsl

Logging

SmtpType

WsSecurityX509CertStoreName

EmailIntegrationHost

ParamEntityInstancesThreshold

SoaBusinessKeyEnforcement

WsSecurityX509CertValidationMode

 

2. Passwords Encryption

Password Encryption allows you to add an extra security layer to passwords or other relevant information in your project. This feature uses SHA-2 hashing function to encrypt any text string. This feature is also available through the Work Portal and can be used in every environment. For further information on this feature via the work portal, refer to this article.

 

Just as it works in the Work Portal, Bizagi allows you to generate encrypted passwords through Command Line Automation. In order to use this functionality you just need to run the BizagiAutomation.exe command line tool with GeneratePassword runtype parameter as follows.

 

BizagiAutomation.exe --runtype GeneratePassword --Password "Text to encrypt" --EncryptType "Encryption type" --Log "..." --ErrorLogger "..." --Config "..."

 

Parameters notes and description:

runtype: it is used to specify the type of execution of BizagiAutomation command line tool. In this case GeneratePassword is used as the value of this parameter since the need is to encrypt a password.

Password: it is used to specify the text that the user wants to encrypt. It should be passed as the value of this parameter. This parameter is mandatory and should be included in the command line or in the config file for the execution.

EncryptType: it is used to indicate the encryption type required. The different possible values are P for project file's passwords, and C for configuration file's passwords. mandatory. This parameter is mandatory and should be included in the command line or in the config file for the execution.

Log: its value indicates the file where the execution logs will be appended. This parameter is optional.

ErrorLogger: its value indicates the file where the error logs will be appended. This parameter is optional.

Config: File with the execution parameters in JSON syntax. This parameter is mandatory when one or more mandatory parameters are not sent.

 

note_pin

The result of the execution will be the encrypted value which will be returned on the command prompt.

You can copy and paste this string wherever it is required.

 

3. Force entity replication

Bizagi can be integrated with external data sources to obtain information from other systems that an organization may already have in place. One of those mechanisms is data replication, which consists of local copies of external data sources that are updated periodically to provide current information from other systems to a Bizagi application. For more information on Data Replication refer to this article.

 

When a deployment process is done, the database will start from scratch by default. This means that there will be no information whatsoever of any entity, including replicated tables. To avoid waiting for the update process of the data replication to run and populate the required information, Bizagi provides a way to enforce the replication of the information via the Command Line Deployment.

 

To do so, users may execute the BizagiAutomation command line tool with the ForceReplication runtype specified. The command should be executed as follows.

 

BizagiAutomation.exe --runtype ForceReplication --DSNDB "Database info" --Provider "Provider info" --Config --Log --ErrorLogger

 

Parameters notes and descrption:

Parameters enclosed in squared brackets ("[", "]") are optional. This means that the user may or may not use them for the execution.

Parameters not enclosed in squared brackets are mandatory. This parameters should be included in the command line or in the config file for the execution.

runtype: it is used to specify the type of execution of BizagiAutomation command line tool. In this case ForceReplication is used as the value of this parameter since the need is enforce the replication of the external data source.

DSNB: Connection String to the project database. This parameter is mandatory.

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's database.

 

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's database.

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

Provider: Database client. This parameter is mandatory.

oFor Oracle databases use the following string: Oracle.

oFor SQL Server databases use the following string: MSSqlClient.

Log: its value indicates the file where the execution logs will be appended. This parameter is optional.

ErrorLogger: its value indicates the file where the error logs will be appended. This parameter is optional.

Config: File with the execution parameters in JSON syntax. This parameter is mandatory when one or more mandatory parameters are not sent.

 

4. Export configuration templates

If you are still not sure or confident enough to write the commands to perform a successful Command Line Deployment, Bizagi offers a way to generate examples of how each application should be executed. This will generate a folder containing all the examples for each of the runtypes of the BizagiAutomation tool.

 

To generate the templates execute the following lines in your command prompt.

 

BizagiAutomation.exe --runtype GenerateTemplates

 

Inside the MC tools folder, a new folder will be generated containing all the examples for each runtype.

 

1. Open a Command Prompt an navigate to MC folder (C:\Program Files\Bizagi\Bizagi Studio\MC).

 

CLD_02

 

2. Run the command described before.

 

CLD_03

 

3. Check the location stated in the command prompt and you will find the generated folder with its contents.

 

CLD_04

 

4. Each sub-folder corresponds to an application of BizagiAutomation.exe. Inside you will find an example config file, Execution (bat file) using the config file, Execution (bat file) using command prompt parameters and a ReadMe with further considerations.

 

CLD_06

 

5. Explore the generated files to understand how they work and replace the default parameters with your own in order to perform the Deployment as you need it. The .bat and config files may be opened with the text editor of your choice in order to see or edit their content.