ST6RI-863 Actions in a case will cause a crash of the visualization (PlantUML) by himi · Pull Request #667 · Systems-Modeling/SysML-v2-Pilot-Implementation

@himi

Since VCase cannot handle actions properly, the model below causes a crash.

case c1 {
        first start;
        then action a;
}

This PR fixes this issue and lets the visualizer properly render actions as well as cases.

@himi

…: Recursively render actions as well

@himi himi added the bug

Something isn't working

label

Jul 3, 2025

@himi

@seidewitz seidewitz changed the title Actions in a case will cause a crash of the visualization (PlantUML) ST6RI-863 Actions in a case will cause a crash of the visualization (PlantUML)

Jul 4, 2025

@seidewitz

This fixes the crash, so the example case renders as
image
If the example is changed to an analysis case or a verification case, it renders similarly. However, a use case renders as
image
without the start symbol. Why is that?

@himi

Opps, it is because UseCases::UseCase::start redefines Actions::Action::start and the current code uses:
return "Actions::Action::start".equals(f.getQualifiedName());

Is there any good utility function to check if the element belongs to start or done? If not, I will simply compare the qualified name with UseCases::UseCase::start as well.

@seidewitz

Opps, it is because UseCases::UseCase::start redefines Actions::Action::start and the current code uses: return "Actions::Action::start".equals(f.getQualifiedName());

Is there any good utility function to check if the element belongs to start or done? If not, I will simply compare the qualified name with UseCases::UseCase::start as well.

If f is a Type, then you can check f.specializesFromLibrary("Actions::Action::start").

@himi

  specializesFromLibrary() to check it is a start/done action
  or its specialization.

@himi

seidewitz