Skip to content

Use so_default_state as a parent state for an another state #13

@zamazan4ik

Description

@zamazan4ik

Hi!

Is it possible with SObjectizer to use default agent state (which is returned with so_default_state) as a parent state for another state? I am trying to do something like this:

state_t NotStarted{initial_substate_of(so_default_state()), "NotStarted"};

Unfortunately initial_substate_of takes a non-const reference but so_default_state returns const reference, so it doesn't compile.

Is there any workaround (except introducing own "default" state and making it as a parent for another events)? Is it a limitation by design?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions