Using modules

Note

Modules are like a one level deep directory structure, you can create any number of modules within a project but you cannot create modules within modules.

Using modules have two important aspects:

  1. You create and manage modules and formula assets within them when you are developing your model.
  2. Modules define a runtime context for evaluating your model, that is whenever you evaluate your model, you are doing this with either an explicit or implicit list of modules. This list of modules provide visibility (scope) for expressions used during the evaluation.

Creating modules

../_images/using-modules-1.png

To create a new module open your project (click into it) and click on the New/Module button. In the dialog that appears type a name and optionally a short description. Then an empty module is created and the application navigates into it.

Moving Formulas and Tables

In order to move a Formula or Table (asset) from one module to another, do the following:

  1. Navigate to the Module containing the assets you want to move
  2. Select the assets you want to move
../_images/using-modules-2.png
  1. Click Move
  2. Finally select the target module, where the Formulas will be moved:
../_images/using-modules-3.png

Note

When you create modules you must have noticed that their names like the names of the projects have to be unique. This is because their purpose is not only grouping but scoping.

Specify Module imports

When your model is structured into modules you will need to properly specify module imports (module lists). While working with the system it will ask you for module lists when required.

However supposing that you just refactored your model into modules do not forget to check the following:

  • Evaluation configurations:
    • open the project
    • click Evaluate and
    • select the configuration to check the imported list of modules
  • Test suites:
    • navigate to Tests
    • open the Test Suite and
    • check the imported list of modules
  • API calculation groups:
    • navigate to API
    • open the Calculation Groups and
    • check the imported modules
  • Builds:
    • navigate to Deployment
    • select the Build Configuration from the dropdown list
    • click Options
    • check the imported modules
    • click Build to do the build