in src/Common/ProcessImporter.ts [775:800]
public async importProcess(payload: IProcessPayload): Promise<void> {
logger.logInfo("Process import started.");
try {
if (this._config.targetProcessName) {
payload.process.name = this._config.targetProcessName;
}
await Engine.Task(() => this._preImportValidation(payload), "Pre-import validation on target account");
if (this._commandLineOptions.overwriteProcessOnTarget) {
await Engine.Task(() => this._deleteProcessOnTarget(payload.process.name), "Delete process (if exist) on target account");
}
await Engine.Task(() => this._createProcess(payload), "Create process on target account");
await Engine.Task(() => this._createComponents(payload), "Create artifacts on target process");
}
catch (error) {
if (error instanceof ValidationError) {
logger.logError("Pre-Import validation failed. No artifacts were created on target process")
}
throw error;
}
logger.logInfo("Process import completed successfully.");
}