Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Migrating older models to use relative IRIs improves model refactoring. First, you need to add the macro. Second, you need to execute that macro. Lastly, you need to use that macro to migrate your older model to use relative IRIs.This can be done using the Macro Engine. The modeling tool comes with the macro file installed in the tool's directory. Instructions on how to find the file are described in this page. 

To add the macro

...

  1. In your Concept Modeling Project, click click Tools >  > Macros >  > Organize Macros... or  or use shortcut key key Ctrl+Alt+M.

    Figure 1: Showing the steps to open the Organize Macros dialog.
  2. The
  3. The Organize Macros

  4. dialog
  5.  dialog opens.

    Image Modified
  6.  Figure
  7. Figure 2: Showing the Organize Macros that  holds the application's macros.
  8. Click Click Add. The  The Macro Information dialog  dialog opens. Fill out the the Name, Macro Language, and  and File containing  containing the macro's description.

    Figure 3: Showing the Macro Information dialog where you can insert the macro file.
    Info
    titleMacro Language

    The Macro Language is the macro's file extension. The modeling tool supports BeanShell, Groovy, JRuby, JavaScript, JavaScript Rhino, and Jython.

  9. To find the appropriate file, click on the three dots at the end

  10. of
  11. of File

  12. field
  13.  field. Your local directory opens. Find the application folder and

  14. select
  15. select data

  16. >
  17.  > Concept Modeler

  18. >
  19.  > scripts

  20. >
  21.  > UpdateIRI.groovy.

    Image ModifiedFigure 4: Showing the steps to find
  22. the
  23. the .groovy
  24. file
  25.  file
  26. Now that you have selected the file, click click Ok. Now you should see the macro added in the Organize Macros dialog.
  27. Click Close.
Info
titleMacro Language

The Macro Language is the macro's file extension. The modeling tool supports BeanShell, Groovy, JRuby, JavaScript, JavaScript Rhino, and Jython.


To execute the macro

...

  1. Click

  2. on
  3. on Tools

  4. >
  5.  > Macros

  6. >
  7.  > Macro Name e.g. UpdateIRIMacro.

    Image ModifiedFigure 5: Showing the steps to execute the newly added macro.
  8. The The Notification Window will  will notify you when the macro was executed.

To use the macro for your older modelexisting project

...

  1. Right - click on your model that you would like to update IRIs on as shown in Figure 6. 

    Image ModifiedFigure 6: Showing the option to make IRI relative to the model package.
  2. This prompts for you to select
  3. A dialog will open asking where to save

  4. the
  5. results in .csv

  6. file generated from this option
  7.  format.

  8. After selecting the file, the progress bar shows the progress of the migration.

  9. The notification window notifies you when the migration is done and where the results are stored. 

    Image Modified
  10. Find the Update IRI results in your designated location and view
  11. the Excel document containing
  12. the CSV file showing which elements were looked at and updated. The CSV file describes the "Element ID", "Old IRI","New IRI", and "Updated".


Note
titleIf you're working with a TWC project...
  • For Teamwork Cloud (TWC) projects, the script will try and lock an element before updating its IRI value. For any element that should be updated and cannot be locked, a message will be shown in the Notification Window: "Unable to lock and update IRI for '%s' due to an element being locked by another user".
  • For TWC projects, Property typed elements cannot be locked, so their owner will be locked instead.


Note
titleIf your element has no IRI...
  • If current element has no IRI value, then no IRI value will be created for it.