Rule Designer API

ilog.rules.studio.dvs.execution
Class IlrDVSRunner

java.lang.Object
  extended by ilog.rules.studio.dvs.execution.IlrDVSRunner
Direct Known Subclasses:
IlrDVSArchiveRunner, IlrExcelRunner

public abstract class IlrDVSRunner
extends Object

An abstract implementation used to execute scenarios. This class provides convenience methods for running scenarios.

Subclass IlrDVSRunner when you implement a custom DVS launch configuration.

Since:
JRules 7.0

Field Summary
protected  boolean localExecution
           
protected  BufferedWriter out
           
protected  String url
           
protected  PrintWriter writer
           
 
Constructor Summary
IlrDVSRunner()
           
 
Method Summary
 void closeOutput()
          Closes the output report file.
protected  void closeTable()
          Closes the table in the report opened by calling openTable().
protected  void createOutput(String destFilePath)
          Creates the HTML output report.
protected  void displayFooter(String title, String name)
          Displays the footer that corresponds to the header written in the HTML report.
protected  void displayHeader(String title, String name)
          Displays a header in the HTML report
protected  void displayLine(String title, String value)
          Displays a row in the table opened in openTable().
protected  void displayReport(IlrScenarioSuiteTestResult report)
          Stores the execution report in the output report.
protected  void displayTrace(IlrScenarioSuiteTestResult report)
          Called after the output report is generated in order to add the Decision Warehouse traces.
protected  String[] extractCustomArgs(String[] args)
          Extracts custom arguments from the argument list.
protected  IlrDWTrace getDWTrace(IlrScenarioTestResult result)
          Returns the Decision Warehouse trace extracted from the result of a scenario run.
protected  void openTable()
          Starts to display a table in the report.
 void run(String[] args, IlrScenarioSuiteDescriptor scenarioSuite)
          Runs scenarios either locally or remotely depending on the parameters set automatically in the program arguments.
 void storeExceptionInOutput(Exception e)
          Stores an exception that should be generated during execution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected BufferedWriter out

writer

protected PrintWriter writer

localExecution

protected boolean localExecution

url

protected String url
Constructor Detail

IlrDVSRunner

public IlrDVSRunner()
Method Detail

extractCustomArgs

protected String[] extractCustomArgs(String[] args)
Extracts custom arguments from the argument list.

Parameters:
args - The arguments provided to the main method.
Returns:
The custom argument list.

run

public void run(String[] args,
                IlrScenarioSuiteDescriptor scenarioSuite)
         throws IOException
Runs scenarios either locally or remotely depending on the parameters set automatically in the program arguments.

Throws:
IOException - if there is a problem opening the ruleset archive.
Parameters:
args - The arguments provided in the main method.
scenarioSuite - The scenario suite descriptor.

getDWTrace

protected IlrDWTrace getDWTrace(IlrScenarioTestResult result)
                         throws IlrTestingException
Returns the Decision Warehouse trace extracted from the result of a scenario run.

Throws:
IlrTestingException - if the trace cannot be extracted.
Parameters:
result - The result of a scenario run. The trace is extracted from this parameter.
Returns:
The Decision Warehouse trace for result.

createOutput

protected void createOutput(String destFilePath)
                     throws IOException
Creates the HTML output report. This method only creates the file and the HTML header.

Redefine the following methods to change the output display:

Throws:
IOException - if there is a problem writing to the HTML report.
Parameters:
destFilePath - The absolute path to the report file.

displayHeader

protected void displayHeader(String title,
                             String name)
                      throws IOException
Displays a header in the HTML report

Throws:
IOException - if the report cannot be written.
Parameters:
title - The report title.
name - The referenced name to be used in the HTML. This parameter must not have any spaces.

openTable

protected void openTable()
                  throws IOException
Starts to display a table in the report.

Throws:
IOException - if the report cannot be written.

displayLine

protected void displayLine(String title,
                           String value)
                    throws IOException
Displays a row in the table opened in openTable().

Throws:
IOException - if the report cannot be written.
Parameters:
title - The label in the table.
value - The value corresponding to the label.
See Also:
openTable()

closeTable

protected void closeTable()
                   throws IOException
Closes the table in the report opened by calling openTable().

Throws:
IOException - if the report cannot be written.
See Also:
openTable()

displayFooter

protected void displayFooter(String title,
                             String name)
                      throws IOException
Displays the footer that corresponds to the header written in the HTML report.

Throws:
IOException - if the report cannot be written.
Parameters:
title - The title to display in the report.
name - The referenced name that will be used in the HTML. This parameter must not have any spaces.

displayTrace

protected void displayTrace(IlrScenarioSuiteTestResult report)
                     throws IlrTestingException
Called after the output report is generated in order to add the Decision Warehouse traces. Nothing is done in this default method.

Throws:
IlrTestingException - if there is a problem retrieving the trace for a scenario.
Parameters:
report - The execution report sent by the SSP after execution.

displayReport

protected void displayReport(IlrScenarioSuiteTestResult report)
                      throws IOException,
                             IlrTestingException
Stores the execution report in the output report. By default, the execution report is written to the HTML report.

Redefine the following methods to change the output display:

Throws:
IOException - if there is a problem writing to the HTML report.
IlrTestingException - if the Decision Warehouse trace cannot be extracted
Parameters:
report - The execution report sent by SSP after execution.

storeExceptionInOutput

public void storeExceptionInOutput(Exception e)
                            throws IOException
Stores an exception that should be generated during execution. By default the stack trace is written to the HTML report.

Redefine the following methods to change the output display:

Throws:
IOException - if there is a problem writing to the HTML report.
Parameters:
e - The exception to be generated.

closeOutput

public void closeOutput()
                 throws IOException
Closes the output report file. Redefine the following methods to change the output display:

Throws:
IOException - if there is a problem closing the output report file.

Rule Designer API

© Copyright IBM Corp. 1987, 2013