gaphor / gaphor

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

Unable to form "refine" relationship between a requirement and a value property #2968

Open marek-piirikivi opened 9 months ago

marek-piirikivi commented 9 months ago

Describe the bug

I am unable to form fully connected relationship between a requirement and a value property

To Reproduce

Steps to reproduce the behavior:

  1. Add requirement
  2. Add a block
  3. Add a value
  4. Form a composite relationship between a block and a value
  5. try to form refine relationship between a value property and a requirement - it is seen that the relationship is not created

Expected behavior

A relationship should be formed. SysML specification says that refinement can be formed between a requirement and any model element.

OS

Version

Version of Gaphor: 2.22.1

Additional information

Should be an easy fix.

marek-piirikivi commented 9 months ago

The problem seems to be with actions, activities etc as well. I was able to form refine relationship only between a requirement and a block.

amolenaar commented 6 months ago

Refine connects sourceContext to targetContext. Both are of type Classifier.

You can create a refine relationship between any classifier, including Activity and State Machine.

See https://github.com/gaphor/gaphor/blob/main/gaphor/SysML/sysml.py#L46-L50.

amolenaar commented 6 months ago

@marek-piirikivi I need a bit more context in order to solve this issue. Can you maybe provide an example model?