Ability to set owned behavior to Use Case
Is your feature request related to a problem?
During modeling, when refining a Use Case, a modeler allocates behaviors describing a use case. Those behaviors are described using state machines, sequence diagrams, etc.
Describe the solution you'd like
- I would like to allocate behavior(s) to a Use Case (diagram being a BehavioredClassifier).
- I would like to navigate to the diagrams of those behaviours from the use case some way.
I would like to allocate behavior(s) to a Use Case (diagram being a BehavioredClassifier).
Is this similar to CallBehaviorAction?
For reference:
"A UseCase specifies a set of actions performed by its subjects, which yields an observable result that is of value for one or more Actors or other stakeholders of each subject." [UML2.5.1,p649,https://www.omg.org/spec/UML/2.5.1/PDF].
Basically each usecase is a BehavioredClassifier, means you can connect behaviors to it using the ownedBehavior property. Among those there is one classifierBehavior.
A Behavior is an abstract class and it has specializations:
And yes, you are right, it is the same type (Behavior) that we have for CallBehaviorAction.
That means, if we have a common component (behavior(s) selector) then it can be used for this purpose.
This ticket also has the same problem of how to select one or multiple model elements in the properties settings, because this component is missing.
@sz332 How is this handled by other tools? Let's research this.
- You can press right mouse button on the use case, and a popup is displayed.
- You can select the corresponding diagrams (Sequence, Activity, State machine).
- The corresponding model element (interaction, activity, etc.) is added as a behavior to the use case.
- You can add multiple diagrams, therefore multiple behaviors.
Remaining question:
- What about removal?
@sz332 What about the way you can add, remove relationships in Jira?
You can just press + and then a dropdown option appears. And then you can see list of the relationships you have already added and just click (x) to remove it.
@danyeaw can we involve the UI/UX guy who helped us previously?
I think we need to mock up or propose something using GTK or libadwaita widgets, then we could get feedback on the mockup.
I'll reference this one https://github.com/gaphor/gaphor/pull/2665 purely because I described another feature that I think we should take into the consideration.
"Ideally, I would like to preserve the option to create the behavior when it does not exist on the property page; or defer its creation at the later point and just keep it as a text."
So:
- you can still just write text and if you do not select anything from the model browser, it just keeps the text and does not create the element.
- you can also at any time go back and finally select "Create element"; or select already existing one.
It is also aligning well with the ability to defer creating correct model to prevent interruptions in the flow.
Moreover, drag&drop would additionally be something that we may want to consider. Think: we can drag behavior from the model browser into the behavior selection. Later we can also expand this by giving an ability to drag the behavior directly on the diagram item.
Just some thoughts :slightly_smiling_face: @danyeaw @sz332