Skip to content

getState().getId() returns null when a submachine is reused in multiple parent states (UmlStateMachineModelFactory) #1187

Open
@windman83

Description

@windman83

🐞 Issue: getState().getId() returns null when reusing a submachine in multiple parent states

Description:

I've created a minimal project to demonstrate a bug that occurs when a single submachine is reused in multiple states of a parent state machine.

The issue is that when the submachine is reused in more than one parent state, stateMachine.getState().getId() unexpectedly returns null.

Reproduction:

A working test shows that if the submachine is used in only one state of the parent machine, everything works as expected.

A failing test demonstrates the bug: reusing the same submachine in multiple parent states results in getState().getId() returning null.

Expected behavior:

getState().getId() should return the correct state ID regardless of how many times a submachine is reused.

Repo:

You can find the full reproducible example here: repo

Let me know if you need any additional information or a stripped-down version of the project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/need-triageTeam needs to triage and take a first look

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions