Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gendoc » Datas from use case with associated activity diagram
Datas from use case with associated activity diagram [message #1768662] Fri, 21 July 2017 06:24 Go to next message
samuel kallmeyer is currently offline samuel kallmeyerFriend
Messages: 47
Registered: March 2017
Member
Hi,
I did associate an activity diagram to a use case as Classifier Behavior property.
I would like to display this diagram, or at least, starting to retrieve the activity, I started with this:

[for (ac:uml::Class | uc.ownedBehavior->select(not uc.getAppliedStereotype('uml::Activity').oclIsUndefined()))]<drop/>

uc is the use case, but it reports nothing.

The uml file is containing this:
<packagedElement xmi:type="uml:UseCase" ....
<ownedBehavior xmi:type="uml:Activity" ....

I think I should better try by iterating through diagrams relationship for this, but how ?

Regards,
Re: Datas from use case with associated activity diagram [message #1768666 is a reply to message #1768662] Fri, 21 July 2017 06:40 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
Hello
I think the start is good but it seems you do some mistakes between stereotypes and type of elements in your query :
[for (ac:uml::Class | uc.ownedBehavior->select(not uc.getAppliedStereotype('uml::Activity').oclIsUndefined()))]<drop/>


you should filter like this :
[for (ac:uml::Activity | uc.ownedBehavior->filter(uml::Activity))]<drop/>

<drop> here you can consult gendoc tutorial
[for (d : diagram | ac.getPapyrusDiagrams())]
<image object='[d.getDiagram()/] >

</image>
[/for]

[/for]




Re: Datas from use case with associated activity diagram [message #1768809 is a reply to message #1768666] Mon, 24 July 2017 06:08 Go to previous messageGo to next message
samuel kallmeyer is currently offline samuel kallmeyerFriend
Messages: 47
Registered: March 2017
Member
Thanks Tristan,
Unfortunately it seems that the first step:
[for (ac:uml::Activity | uc.ownedBehavior->filter(uml::Activity))]<drop/>
doesn't work as I'm not able to enter in this loop. Probably uc.ownedBehavior is empty, but I don't know why...
Regarding UseCase api, it extends the BehavioredClassifier, and based on this in my uml model view, my activity is displayed in the UML Classifier Behavior field, and as described above in the .uml file, as <ownedBehavior xmi:type="uml:Activity"....
Shall I retrieve my datas by another way ?
Re: Datas from use case with associated activity diagram [message #1769380 is a reply to message #1768809] Mon, 31 July 2017 08:08 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
Okay it is strange did you try with the uc.classifierBehavior property ?



Re: Datas from use case with associated activity diagram [message #1769959 is a reply to message #1769380] Mon, 07 August 2017 06:42 Go to previous message
samuel kallmeyer is currently offline samuel kallmeyerFriend
Messages: 47
Registered: March 2017
Member
Hello Tristan,
Thanks for your answer: I didn't check with the uc.classifierBehavior property, I checked/rewrite my code again and I probably did a mistake somewhere...It's good now.
Previous Topic:size of static images
Next Topic:What HTML tags are supported in RichText?
Goto Forum:
  


Current Time: Thu Apr 25 06:58:45 GMT 2024

Powered by FUDForum. Page generated in 0.03356 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top