Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: megaman on May 06, 2009, 04:59:06 am
-
is there a way to ask an element for a specific tagged value? can we do such things as conditional statements in the RTF template? such as
if(element == usecase) ...
otherwise, how to separate use cases from other elements? i would like to do something like
Usecase
Requirements from this UseCase
Thanks
-
I would suggest you look at the RTF filtering available in the latest version. For more information see the section on filtering in the RTF whitepaper.
-
sorry i should have been more clear.
for example, i have a use case. it has connectors to the requirements it realizes, and one connector to the actor of the use case.
i only want to print the requirements associated with the use case. but the template only allows me to get all the connector->target->elements, not just some of them.
how would i only print the requirement targets for this use case?
-
also, this is being generated in a model document. this model document already has a filter set on it to return all use cases. what i need now is a way to filter parts of the template or do some conditional expression while the template 'iterates'.
is this possible??
-
In the latest Version: F8 | Options - allows filtering by Connector type and direction. This should allow differentiation between the Actor and the Requirements by setting the direction and type='Realization'.
-
so far that doesn't seem to have any effect. I excluded all connectors and i still get the same result.
on another note, here's an interesting result: i created a dummy requirement in a use case. i trace it to another requirement. via Relationship matrix. when i print the dummy requirement out, i am printing its connector->target->element->name. I get the right dummy requirement parent. But I also get the dummy requirement itself. what's the meaning of this? :o
-
Reagrding your first point; this option does work - I am not sure what you have done to get this.
Second Point: The Connector source and target both need to be displayed. It is best o use a table for this.
-
i tried generated from the model directly and the exclude Connector options seem to apply. However, using virtual documents F8 | Options seem to be ignored. How can we have model documents exclude connector types?
-
i've also observed the following:
use case is connected to (points to) requirement A.
requirement A is connected to another requirement B.
when printing connector->target->element->name for requirement A,
you get:
Requirement A
Requirement B
Requirement B is the only REAL target for requirement A. But Requirement A is the target of the Use Case. Why does EA not distinguish between these two cases? Does it simply look at all Connectors involving Requirement A and publish the targets without first checking to see if Requirement A is the source?
-
Regarding reply#7 - The filtering is set permanently for each individual Template in the RTF editor: File | Document Options. It is best to use this especialy for each Model Document.
Reply #8: It is necessary to use both the connector::target::element and the connector::Source::Element fields - what you are reporting are only the targets - these can differ depending on how they were originaly set.
-
thanks dermot.
using your suggestion for reply #7 was very helpful, i was able to only ask for the target elements by setting the direction to source->target. when would you ever have target->source?
-
sorry i should have been more clear.
for example, i have a use case. it has connectors to the requirements it realizes, and one connector to the actor of the use case.
i only want to print the requirements associated with the use case. but the template only allows me to get all the connector->target->elements, not just some of them.
how would i only print the requirement targets for this use case?
In case of requirements why can't you use template section Package::Element::External requirements ?
It should do the trick and allow you to print requirements realized by use case?
Regards
Kris
-
kris,
good idea, that would work too. i only tried it this way because i thought it would let me be a little more flexible on some filtering i wanted to do.
i was hoping there was some way to do filtering on requirement type from within the external requirements tag. but this doesn't seem possible