gaphor / gaphor

Gaphor is the simple modeling tool
https://gaphor.org
1.89k stars 202 forks source link

Ability to set owned behavior to Use Case #2562

Open sz332 opened 1 year ago

sz332 commented 1 year ago

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

marek-piirikivi commented 1 year ago

I would like to allocate behavior(s) to a Use Case (diagram being a BehavioredClassifier).

Is this similar to CallBehaviorAction?

For reference: image

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

sz332 commented 1 year ago

image

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:

image

And yes, you are right, it is the same type (Behavior) that we have for CallBehaviorAction.

image

That means, if we have a common component (behavior(s) selector) then it can be used for this purpose.

sz332 commented 1 year ago

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.

marek-piirikivi commented 1 year ago

@sz332 How is this handled by other tools? Let's research this.

sz332 commented 1 year ago

Remaining question:

marek-piirikivi commented 1 year ago

@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.

sz332 commented 1 year ago

@danyeaw can we involve the UI/UX guy who helped us previously?

danyeaw commented 1 year ago

I think we need to mock up or propose something using GTK or libadwaita widgets, then we could get feedback on the mockup.

marek-piirikivi commented 1 year ago

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:

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