Skip to content

Conversation

@himi
Copy link
Member

@himi himi commented Jul 3, 2025

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 himi added the bug Something isn't working label Jul 3, 2025
@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
@himi himi requested a review from seidewitz July 4, 2025 05:14
@seidewitz seidewitz added this to the 2025-06 milestone Jul 4, 2025
@seidewitz
Copy link
Member

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
Copy link
Member Author

himi commented Jul 4, 2025

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
Copy link
Member

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").

  specializesFromLibrary() to check it is a start/done action
  or its specialization.
@himi
Copy link
Member Author

himi commented Jul 5, 2025

@seidewitz, thank you! It works quite well.

image

@seidewitz seidewitz merged commit db5ecc5 into master Jul 5, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants