ILOG JRules User Guide > Testing Rules with Rule Scenario Manager > Reference > Rule Scenario Manager XML and Java Artifacts > RSM Archive Definition

An RSM archive is a structured, executable zip-formatted file of Rule Scenario Manager artifacts. RSM archives can be uploaded to the Rule Scenario Manager Console, which imports the artifacts in the archive to the Console database. In particular, this allows developers to transfer scenarios, scenario suites, and simulations for online execution.

Executable artifacts in Rule Scenario Manager can also be downloaded as an archive file from within the Console. Archives created in this way will include all dependent elements of the artifact, such as input data and tests.

The contents of an RSM archive can include the following:

In addition, each archive must contain an XML file called archive-descriptor.xml, which indicates the root executable element within the archive. For example, an archive can contain a scenario suite with its member scenarios. You must specify that the suite is the root element and not one of the member scenarios.

An example archive descriptor file is the following:

<root schemaVersion="1.0">
   <name>ScenarioSuite1.xml</name> 
</root>

Note that the RSM archive must be intrinsically complete: all elements required for the execution of the scenario, scenario suite, and simulation definitions included in the RSM archive must also be present. Any extraneous elements, such as scenarios that are not ultimately referenced from the root executable element, would not be executed or loaded into the Console.

To create an RSM archive, set up a directory structure containing valid scenario, scenario suite, and simulation definitions including all dependent elements, as well as an archive-descriptor.xml file. Archive this structure using any standard zip tool.

Note that the directory structure of the archive, when loaded into the Console, translates into the virtual folder hierarchy used in the Console's navigation. For example, including input datasets in directories called inputs/excel and inputs/xml will create (if they do not already exist) the folders inputs and subfolders excel and xml in the Console, in which the loaded datasets will be located:

images/archiveFolders.png

Example

In the basics-javabinding sample, the class myPackage.MyArchiveJUnit runs as a JUnit test case and shows how to read and execute an RSM archive. In this example, the archive defines a simulation.

Related Concepts

Configurations
Scenarios
Scenario Suites
Simulations
Databinding

Related Task

RSM Archives Execution with Ant Commands

Related Reference

Scenario XML Definition
Scenario Suite XML Definition
Simulation XML Definition

Related Samples

How to Test Rules in Rule Scenario Manager Using Java Binding
How to Test Rules in Rule Scenario Manager using XML Binding