KBEC-00415 - How to export a project but exclude some procedures

Summary

This article describes how to export a project and it’s configuration, properties, etc. and then remove a particular procedure. While example in this arcticle shows a procedure removal, similar technique could be used to remove properties, email-configurations, schedules etс.

Solution

In the following example we have project with two procedures with a step in each.

yourProject-1.png

In order to export a project use the following steps:

1.Export needed project using generateDsl command (e.g.)

ectool generateDsl /projects/yourProjectName> fileName.dsl

2.Edit a file.

Change project name and delete the procedures/steps that you don’t need (bold text):

project 'yourProject2', {
 resourceName = null
 workspaceName = null

procedure 'yourProcedureOne', {
 description = ''
 jobNameTemplate = ''
 resourceName = ''
 timeLimit = ''
 timeLimitUnits = 'minutes'
 workspaceName = ''

step 'yourStepOne', {
 description = ''
 alwaysRun = '0'
 broadcast = '0'
 command = 'echo echoStep'
 condition = ''
 errorHandling = 'failProcedure'
 exclusiveMode = 'none'
 logFileName = ''
 parallel = '0'
 postProcessor = ''
 precondition = ''
 releaseMode = 'none'
 resourceName = ''
 shell = 'ec-js'
 subprocedure = null
 subproject = null
 timeLimit = ''
 timeLimitUnits = 'minutes'
 workingDirectory = ''
 workspaceName = ''
 }
 }

procedure 'yourProcedureTwo', {
 description = ''
 jobNameTemplate = ''
 resourceName = ''
 timeLimit = ''
 timeLimitUnits = 'minutes'
 workspaceName = ''

step 'yourStepOne', {
 description = ''
 alwaysRun = '0'
 broadcast = '0'
 command = 'echo echoStep'
 condition = ''
 errorHandling = 'failProcedure'
 exclusiveMode = 'none'
 logFileName = ''
 parallel = '0'
 postProcessor = ''
 precondition = ''
 releaseMode = 'none'
 resourceName = ''
 shell = 'ec-js'
 subprocedure = null
 subproject = null
 timeLimit = ''
 timeLimitUnits = 'minutes'
 workingDirectory = ''
 workspaceName = ''
 }
 }

// Custom properties
 ec_tags = ''
}
  1. Import edited project back to EFlow Server using evalDsl command (e.g.)
ectool evalDsl --dslFile fileName.dsl

Now, we have a copy of the project with only one procedure:

yourProject-2.png

Have more questions?

0 Comments

Please sign in to leave a comment.