A project com.sodius.mdw.rhapsody.rhapsody2excel is created in the workspace.
This project contains in src folder only one package com.sodius.mdw.rhapsody2excel and only one file Class2List.mqr, please open this file.
Here is the behavior of this ruleset:
rhapsody when we wish to deploy this ruleset:
public ruleset Class2List(in rhp :rhapsody)
var exc : excel = context.getWorkbench().getMetamodelManager().getMetamodel("excel").createModel();
com.sodius.mdw.metamodel.rhapsody.proxy.ProxyPreloader when we want to use
instruction getInstances("Class") in a deployed ruleset (See tutorial):
var myProxyPreloader : ProxyPreloader = ProxyPreloader.getNewProxyPreloader(rhp);
myProxyPreloader.preload();
var workbook : excel.Workbook = exc.create("Workbook");
var sheet : excel.Sheet = exc.create("Sheet");
workbook.sheets.add(sheet);
var row : excel.Row = exc.create("Row");
var cell : excel.Cell = exc.create("Cell");
cell.value = class.name;
row.cells.add(cell);
sheet.rows.add(row);
var app : rhapsody.Application = rhp.getInstances("Application").first();
var path : String = app.activeProject.activeConfiguration.getPath();
exc.write("Excel Workbook", path + "\\output.xls");
c:\tmp and press Finish.<rhapsodyInstallationDirectory>\Sodius\RulesComposer\bin\rhp_generate.batC:\tmp\Rhp_Class_2_XLS_List.launch
| Note: | This tutorial can be used to deploy the sample "Rhapsody to Relational" (see using ATL in RulesComposer). |
Prev Section: Launch an external ruleset
Next Section: Deploy a Launch Configuration and use it in a Rich Client Program