IBM Support

Use Team Foundation Server builds for deployment in Rules for .Net

Question & Answer


Question

How to use TFS builds for deployment in IBM WebSphere ILOG Rules for .NET?

Cause

ILOG R4DN does not support TFS builds for ruleset compilation and deployment. Rule Studio uses custom MSBuild task defined at rule app level in ILOG.Rules.ExecutionServer.MSBuildTask.dll.

Answer

There are two options for automated builds. Both procedure have been endorsed as valid, before the support of TFS.

Option A: RulesetCompiler(C:\Program Files\IBM\WebSphere\ILOG Rules for .NET\Rule Studio for .NET\Bin\RuleSetCompiler.exe) is used/recommended by integrating it in an MS-Build task.

Option B: The devenv script has been used to perform automated Unit Test. For instance to compile the samples:

The key concept consists in using the "devenv" command corresponding to your Visual Studio version with the sln solution containing the rule project in argument.

The "devenv" command just corresponds to the Visual Studio command line. The following method (Compilation_cs_Release_Rule_Application) is invoked in NUnit tests.

In other words, <c:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe "Rule Application.sln" /build Release> once you are located in your command prompt into the installation directory of your sample.

public void Compilation_cs_Release_Rule_Application()

{

string s = "\"" + TestHelper._pathToRSInstallSamples +

category + Path.DirectorySeparatorChar +

name + Path.DirectorySeparatorChar +

language[0] + Path.DirectorySeparatorChar +

name + ".sln\" /build " + flag[0];

TestHelper.CompileSln(TestHelper._devenvPath, s);

}

static public void CompileSln(string cmd, string arg)

{

//System.Windows.Forms.MessageBox.Show(cmd + arg,"debug");

Process _devenvProcess = new Process();

_devenvProcess.StartInfo.FileName = cmd;

_devenvProcess.StartInfo.Arguments = arg;

_devenvProcess.Start();

while (!_devenvProcess.HasExited)

{

Thread.Sleep(1);

}

// Finding out whether compilation went well or not.

Assert.AreEqual(_devenvProcess.ExitCode, 0);

_devenvProcess.Dispose();

}

If it is required to include devenv invocation in MSBuild task, just add <exec cmd=xx arg=xx/> to the targets file.

[{"Product":{"code":"SS6MVU","label":"WebSphere ILOG Rules for .NET"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Studio","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21509385