Synchronizing by using Ant tasks

You can use a Decision Center Ant task to synchronize your projects.

With Ant tasks, you can automate the publishing and updating of projects. Use the following code to synchronize with Ant tasks:

ant synchronize -Ddata=<C:/workspace> -DprojectName=<Project name> -Daction=<publish|retrieve|disconnect>
[-Doverride=true|false] [-Dselector=query] [-Dbranch=branch]

The following example shows how to publish a branch (MyBranch) in a project (MyProject) from your workspace by using Ant:

ant synchronize -Ddata=C:/workspace -DprojectName=MyProject -Daction=publish
-Doverride=true -Dbranch=MyBranch

MyProject must be contained in a folder with the same name within the workspace.

The following example shows how to publish a branch (MyRelease) in a decision service (main project = MyService) from your workspace by using Ant:

ant synchronize -Ddata=C:/workspace -DprojectName=MyService -Daction=publish
-Doverride=true -Dbranch=MyRelease -DuseDgf=true

MyService is the main project of your decision service.

The following table describes the parameters that you can specify.

Table shows parameters for Ant synchorization.
Parameter Description
useDgf

Specifies whether to publish a project using the decision governance framework. The default value is false.

data [workspace location]

Specifies the workspace location

project [projectName]

Name of the project to synchronize.

The project must be contained in a folder with the same name within the workspace location.

action

Synchronize by publishing to Decision Center, retrieving from Decision Center, or disconnecting from Decision Center. Use only one of the following actions for each command:

  • publish

  • retrieve

  • disconnect

override

(Optional) Specifies whether the publish or retrieve action overrides existing conflicts between Decision Center and Decision Server. The default value is false.

Synchronization that uses Ant tasks does not override potential conflicts unless you set the -Doverride option.

selector [query]

(Optional) BQL query to select rules to be synchronized.

Note:

You cannot use queries for Event projects.

branch

(Optional) The branch of the project. If this parameter is left empty, the main branch (sometimes called the current branch) is synchronized. (Optional)