Author Topic: SysML Requirements - Copy relationship  (Read 1369 times)

JonTP

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
SysML Requirements - Copy relationship
« on: March 11, 2017, 03:14:35 am »
Hello everyone.

I am trying to create a copy of a requirement using the SysML copy relationship. I do this by selecting the relationship in the toolbox, clicking on the master requirement and clicking where I want the copy created. A requirement is created but it appears to be a new requirement block and not a copy, in the sense that the note section has not been transferred to the new block and leaving me free to alter the name. I want to do this so that I can have "copies" of the requirement in three different context packages, but all based on the master requirement. That way if I alter the master then all copies stay in sync.

Am I doing something wrong here or have I misunderstood how the Copy relationship is meant to work in SysML or EA? I've seen posts on the same subject from years ago but would have assumed it was 'fixed' by now.

Thanks in advance.

JP

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1174
  • Karma: +9/-3
  • Read The Help!
    • View Profile
Re: SysML Requirements - Copy relationship
« Reply #1 on: March 14, 2017, 11:03:54 am »
What you are seeing is correct - Copy creates a new, separate element. In release 13 there is an option to Clone an element - what release are you using?
Best Regards, Roy

JonTP

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: SysML Requirements - Copy relationship
« Reply #2 on: March 14, 2017, 09:40:23 pm »
Thanks for that confirmation Roy. I'm using version 13 so I'll look into the clone option. On first look it doesn't appear to be an option when using the Copy relationship but I will continue digging.

Thanks again.
JP

peterc

  • EA User
  • **
  • Posts: 33
  • Karma: +4/-0
    • View Profile
Re: SysML Requirements - Copy relationship
« Reply #3 on: March 14, 2017, 10:22:52 pm »
Do you really want "copies"? If you have the requirement defined in one package then you can include it in multiple diagrams - Just drag it from the project browser and drop it on each of the diagrams that you want to create using the element. Make sure that you have "link" selected in the Drop As option and you will have one element but used multiple times.

Or have I misunderstood what you are trying to achieve?

JonTP

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: SysML Requirements - Copy relationship
« Reply #4 on: March 15, 2017, 02:51:24 am »
Thanks PeterC

The full scenario is as follows. I am developing requirements for a system that will go into production following a capability concept development phase (CCD), prototyping phase and finally the production phase. At this end of the project we are looking at the vision for the final production system in terms of its desired behaviour, operational use, physical structure and thus, its requirements. Based on the key risk areas identified in thinking about the production model, we want to take a subset of the production requirements and use them again in the CCD phase. These will then be augmented with additional requirements specific to the CCD phase. I can foresee that the CCD requirements will comprise those that 'duplicate' requirements for the production system, those that are refined versions of the production phase requirements and new requirements.

So the capabilities I am looking for in the model I am developing are that I can create a copy of a requirement where the text/note is constant and linked but I am free to change the requirement name as I use copies in different package contexts (CCD or Production for example). This way as I change the text/note in the 'master', the copy text/notes stay in sync. It is my understanding that this is catered for within the SysML standard and that the relationships between the copies are maintained. It is not clear to me that EA does this out of the box. RoyC has pointed me at the clone behaviour but I suspect that will still need 'mandraulics' to maintain the relationships. What you suggest is kind of the default where I was before I discovered the <<Copy>> relationship and may be the way I end up doing things.

Thanks for the input.

philchudley

  • EA User
  • **
  • Posts: 531
  • Karma: +9/-0
  • UML/EA Principal Consultant / Trainer
    • View Profile
Re: SysML Requirements - Copy relationship
« Reply #5 on: March 15, 2017, 10:19:17 am »
Hi

When a copy relationship is used between SysML requirements, the tagged value named text is copied.

Create a SysML requirement diagram and set element Tag compartment to be visible
Create a requirement and enter some text in the SysML tagged value, named text
Create a second requirement and relate to the first via Copy relationship
Note the value in the Text tagged value in the second requirement, it is the same as the first requirement and read only
Make a change to the text tagged value in the first requirement and notice the change is replicated in the second requirement

Phil
follow me on Twitter

@SparxEAGuru

JonTP

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: SysML Requirements - Copy relationship
« Reply #6 on: March 16, 2017, 08:28:43 pm »
Hi Phil

That's brilliant. Exactly what I thought should happen. I do this with new requirements on an existing SysML 1.4 requirement diagram where I type my note text into the tag text field and everything works as you explain and, what I was indeed looking for. Strangely, when I do it on my existing requirements I don't get the same behaviour. The following is what happens:
1. Create a requirement in usual way of dragging block from toolbox onto diagram
2. Change name and add Notes text on Notes page
3. Run our own project browser script to take Notes text and write into SysML 1.4 tag field 'text' - now tag field populated as expected.
4. Add new requirement (destined to be the <<Copy>>) and link with <<Copy>> relationship.

In the final step the contents of the tag field from the master requirement do not get copied into the text field of the new requirement (copy). It was this behaviour that caused me to throw out the original question. Anybody got any ideas as to why this might be happening?

JP

peterc

  • EA User
  • **
  • Posts: 33
  • Karma: +4/-0
    • View Profile
Re: SysML Requirements - Copy relationship
« Reply #7 on: March 17, 2017, 12:34:24 am »
Not sure if this is the answer, but have you noticed that the SysML text field is "<memo>" and you edit it manually by clicking it on the ellipsis ...? Does you script write into the memo within the SysML1.4 "text" tag or directly into the tag? Hopefully it still has <memo> and the ellipsis after your script. Just wondering whether you are accessing the tag correctly or whether while you are storing the text it's in the wrong place.
Might be worth posting your script (or at least a fragment of how you are accessing the element).
Might also be worth writing a script that just accesses both your script modified element and a manually created requirement to display the text - you should obviously expect the script to display the "text" field value the same regardless of whether your script has written to it or you have manually created a requirement. If they don't then it would start to point at how the script is accessing the tag.

JonTP

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: SysML Requirements - Copy relationship
« Reply #8 on: March 17, 2017, 08:00:50 pm »
PeterC

You are right on the money. We played around with things and then re-read the f****** documentation and picked up on the tagged value memo and how it works. We were writing to the text tag. Now sorted and working as expected.

Thanks for caring.

JP