Process Import and Export Using Deployment by Commands
Overview
In previous articles, it was explained how to export and import processes in Bizagi Studio using the Management Console. This section covers the necessary configuration and the steps required to do it through deployment by commands.
Parameters
The parameter values needed for the Process Import and Export using deployment by commands can be assigned by console or by means of a configuration file. These parameters are described below:
- Runtype: Feature to automate.
- Log: Path of the text file that logs the execution messages.
- ErrorLogger: Path of the text file that records the error details.
- DSNDB: DB connection on which the command is applied. For Export it is the source DB and for Import it is the destination DB.
- Provider: DB connection provider (Oracle/MSSQLClient).
- FilePath: Path and name of the .btex file to import. Applies only for the ImportProcessTemplate.
- outputPath: Path and name of the .btex file that is generated. Applies only for the ExportProcessTemplate.
- Workflows: Selected processes and sub-processes that is exported.
- ExperienceObjects: Entities selected for export.
- Options: The parameter is loaded by default, as it is mandatory for the command line deployment.
- Description: A description of the process to be exported.
- PasswordPackage (true/false): The password is optional when generating the .btex in the export.
- ValidationSettings (true/false): The user indicates if the information of the .btex should be validated. This only applies to the Import.
Exporting Process & Experience Templates
From Deployment by Commands, you can run the ExportProcessTemplate function using the Management Console. This generates a .btex package that exports the processes and experience of the project.
For this method, the parameter values can be assigned by console or by means of a configuration file (config.json), so that they are equivalent, as shown in the following example:
BizagiAutomation.exe –runtype ExportProcessTemplate –DSNDB “Persist Security Info=True;User ID=sa;Password=sa;Data Source=localhost\sqlexpress;Initial Catalog=databaseName;” –Provider “MSSqlClient” –OutputFile output.btex –Workflows “[{"DisplayName":"Process Templates Name 1","Version":"1.0"},{"DisplayName”:"Process Templates Name 2","Version":"1.1"}]” –ExperienceObjects “[{"Entity": "Entity Name 1","Type": "MySearch","Name": "Search Name 1"},{"Entity": "Entity Name 1","Type": "EntityAction","Name": "Action Name 1"},{"Entity": "Entity Name 2","Type": "EntityConstructor","Name": "Constructor Name 1"},{"Entity": "Entity Name 2","Type": "DataTrigger","Name": "Trigger Name 1"},{"Entity": "Entity Name 2","Type": "ProcessShortcut","Name": "ProcessShortcut 1"},{"Entity": “Entity Name 3","Type": “StakeholderSentenceContext","Name": “Stakeholder 1"},{"Entity": "Entity Name 3","Type": "StakeholderSentenceContext","Name": "Stakeholder 2"}]” –Options null –Description description –Log log.txt –ErrorLogger error.txt
or
BizagiAutomation.exe –runtype ExportProcessTemplate–config config.json
config.json text
{
"runtype": "ExportProcessTemplate",
"DSNDB": "Persist Security Info=True;User ID=sa;Password=sa;Data Source=localhost\\sqlexpress;Initial Catalog=databaseName;",
"Provider": "MSSqlClient",
"OutputFile": "output.btex",
"Log": "log.txt",
"ErrorLogger": "error.txt",
"Workflows": [
{
"DisplayName": "Process Templates Name 1",
"Version": "1.0"
},
{
"DisplayName": "Process Templates Name 2",
"Version": "1.1"
}
],
"ExperienceObjects": [
{
"Entity": "Entity Templates Name 1",
"Type": "MySearch",
"Name": "Search Name 1"
},
{
"Entity": "Entity Templates Name 1",
"Type": "EntityAction",
"Name": "Action Name 1"
},
{
"Entity": "Entity Templates Name 2",
"Type": "EntityConstructor",
"Name": "Constructor Name 1"
},
{
"Entity": "Entity Templates Name 2",
"Type": "DataTrigger",
"Name": "Trigger Name 1"
},
{
"Entity": "Entity Templates Name 2",
"Type": "ProcessShortcut",
"Name": "ProcessShortcut 1"
},
{
"Entity": "Entity Templates Name 3",
"Type": "StakeholderSentenceContext",
"Name": "Stakeholder 1"
},
{
"Entity": "Entity Templates Name 3",
"Type": "StakeholderSentenceContext",
"Name": "Stakeholder 2"
}
],
"Options": null,
"Description": "description"
}
Importing Process & Experience Templates
From Deployment by Commands, you can run the ImportProcessTemplate function using the Management Console. This generates a .btex package that imports the processes and experience of the project.
For this method, the parameter values can be assigned by console or by means of a configuration file (config.json), so that they are equivalent, as shown in the following example:
BizagiAutomation.exe --runtype ImportProcessTemplate --DSNDB "Persist Security Info=True;User ID=sa;Password=sa;Data Source=localhost\sqlexpress;Initial Catalog=databaseName;" --Provider MSSqlClient --FilePath input.btex --Log log.txt --ErrorLogger error.txt --ValidationSettings "{\"ValidateMetadata\": true}"
or
BizagiAutomation.exe --runtype ImportProcessTemplate--config config.json
config.json text
{
"runtype": "ImportProcessTemplate",
"DSNDB": "Persist Security Info=True;User ID=sa;Password=sa;Data Source=localhost\\sqlexpress;Initial Catalog=databaseName;",
"Provider": "MSSqlClient",
"FilePath": "input.btex",
"Log": "log.txt",
"ErrorLogger": "error.txt",
"ValidationSettings": {
"ValidateMetadata": true
}
}