Skip to content

TNO/capella-workflow-dse

Repository files navigation

Capella Workflow

A Capella addon for doing design space exploration (DSE) on Capella workflow models. To try it out, download a Capella release with this addon included from the release page (Windows only). For more information on how to install and use see the tutorial. This addon was presented on the Capella Days 2022 (slides and video).

The provided Capella release (from the release page) contains the following:

Setup development environment

Below you will find instructions on how to setup a development environment on Windows. When the terminal needs to be used, use Windows Command Prompt, not Windows PowerShell.

  1. First make sure Java 14 is installed and on your path. You can download it from here. The version can be checked by executing java -version in a terminal. Make sure that the JAVA_HOME environment variable points to the Java 14 installation directory. You can check this by executing echo %JAVA_HOME%. This should output something like: C:\java\jdk-14.0.2 (note there is no \bin postfix).
  2. Download and start the Eclipse installer
  3. In the right-top click the "hamburger" -> "ADVANCED MODE..."
  4. Select "Eclipse IDE for Eclipse Committers", set "Product Version" to "2020-06" and point "Java 1.8+ VM" to the location of Java 14, click "Next" twice.
  5. Change "Installation folder name" to "capella-workflow-dse". If you want to change the installation folder, enable "Show all variables" and change accordingly. Click "Next" and "Finish"
  6. Start Eclipse
  7. Now we are going to clone this repository. For this you need to have Git installed. Open a terminal and navigate to the directory where you want to clone the repository. Clone it high in the filesystem structure to prevent build errors later (e.g. directly under C:\). In a terminal execute:
    git clone https://github.com/TNO/capella-workflow-dse.git
    cd capella-workflow-dse
    
  8. Build the projects by executing:
    mvnw clean verify -f releng/nl.tno.capella.workflow.dse.target/pom.xml
    mvnw clean package
    
  9. In Eclipse, press "File" -> "Import..." -> "General" -> "Existing Projects into Workspace", click "Next"
  10. Click "Browse" next to "Select root directory" point it to the root of the cloned repository, click "Finish"
  11. Open nl.tno.capella.workflow.dse.target/platform.local.target, click "Set as Active Target Platform". The "Load Target Platform" indicator will now appear in the right bottom, wait till it completes.
  12. The development environment is now ready:
    • To launch the product, right click nl.tno.capella.workflow.dse/Product.launch -> "Run As" -> "Product"
    • To launch the tests, right click nl.tno.capella.workflow.dse.test/Test.launch -> "Run As" -> "Test".
      • The logs may show an error: ERROR => PROHIBITED SITUATION : There are many specifics mappings for the purpose <org.polarsys.capella.common.re>, this can be safely ignored.
    • To launch the app, open a terminal, navigate to the root of the cloned repository and execute:
      cd plugins/nl.tno.capella.workflow.dse.app/app
      set PATH=%cd%\node;%PATH%
      npm start -- -- "../../../tests/nl.tno.capella.workflow.dse.test/model/3D Reconstruction"
      
      • Before doing this make sure you launched the DSE at least once via the product (tests/nl.tno.capella.workflow.dse.test/model/3D Reconstruction/gen/dse has to exist)

Creating a new release

To create a new release, go to the CI GitHub action -> Run workflow -> Fill in version -> Run workflow. Wait till build completes and add the release notes.

License header

The Maven build uses license-maven-plugin to determine if the correct license headers are used for source files. If the header is incorrect the build fails.

Handy commands:

  • To only run the check execute: mvn license:check -Dtycho.mode=maven
  • To automatically add/update execute: mvn license:format -Dtycho.mode=maven