class Administrator referenced, but no artifact for it...

class Administrator referenced, but no artifact for it...

Postby michael1979 » Wed 20 May 2020 15:55

Generate code for C1 in /home/michael/bouml/tutorial1/cpp/C1.h and /home/michael/bouml/tutorial1/cpp/C1.cpp
class Administrator referenced but does not have associated artifact


/home/michael/bouml/tutorial1/cpp/C1.h not modified

/home/michael/bouml/tutorial1/cpp/C1.cpp not modified

I'm trying to complete the code generation portion of the initial tutorial.

I tried changing the generation settings to ignore for stereotype actor instead of class, but still no code...

Also, I'm not understanding how to generate PHP4 instead of PHP5 code. Some change in generation settings?
michael1979
 
Posts: 5
Joined: Thu 23 Apr 2020 21:02

Re: class Administrator referenced, but no artifact for it..

Postby Bruno Pagès » Wed 20 May 2020 17:16

Hi,

michael1979 wrote:Generate code for C1 in /home/michael/bouml/tutorial1/cpp/C1.h and /home/michael/bouml/tutorial1/cpp/C1.cpp
class Administrator referenced but does not have associated artifact


That means in C1 source/header the class Administrator is used (can be inherited, can be used to type any element, etc) but that class does not have an associated artifact, because of that the C++ generator cannot know how to generate the #include for it, and Administrator is not generated. That deserves a warning at C++ code generation time.

michael1979 wrote:/home/michael/bouml/tutorial1/cpp/C1.h not modified

/home/michael/bouml/tutorial1/cpp/C1.cpp not modified


The means the current content of these file is already up to date and it is useless to rewrite them again, allowing to preserve their modification date.

michael1979 wrote:I tried changing the generation settings to ignore for stereotype actor instead of class, but still no code...


That change nothing concerning the fact Administrator does not have an associated artifact

michael1979 wrote:Also, I'm not understanding how to generate PHP4 instead of PHP5 code. Some change in generation settings?


I do not remember to have something special concerning Php 5, what is not compatible with Php 4 in code generation ?
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 664
Joined: Mon 20 Feb 2012 09:23
Location: France

Re: class Administrator referenced, but no artifact for it..

Postby michael1979 » Wed 20 May 2020 19:28

Administrator in the tutorial is an actor in a use case diagram.

I changed the generation settings from ignore for actor to class across: C++, Java, PHP, and IDL,

No code is generated by default for actors.

When I created package3 I dragged and dropped Administrator onto it. There were instructions
ito create class C1 and create an association with Administrator. I recall a one to many association.

As far as the PHP4 question, the tutorial suggests making some change to I believe the generation settings to avoid generating PHP5 code instead.
I think PHP6 and PHP7 are pretty stable these days, wondering if a future revision of BOUML will support generating PHP6 and PHP7 code?

Thank you for getting back so quickly. If my question is still unclear, I hope I can clarify it.

How do you generate a code artifact for a use case actor dragged and dropped onto a class diagram and associated with a class?
michael1979
 
Posts: 5
Joined: Thu 23 Apr 2020 21:02

Re: class Administrator referenced, but no artifact for it..

Postby michael1979 » Wed 20 May 2020 19:43

https://www.bouml.fr/tutorial/tutorial.html

I notice that this tutorial is evidently out of date and old... maybe that's why I'm having trouble. I'm using BOUML 7.0 on CentOS 8.
michael1979
 
Posts: 5
Joined: Thu 23 Apr 2020 21:02

Re: class Administrator referenced, but no artifact for it..

Postby Bruno Pagès » Wed 20 May 2020 19:56

michael1979 wrote:Administrator in the tutorial is an actor in a use case diagram.
...
How do you generate a code artifact for a use case actor dragged and dropped onto a class diagram and associated with a class?


The diagrams where that actor is shown or not are not relevant, a diagram is 'just' a (normalized) picture.

An actor is a class stereotyped "actor", to be generated a class need an associated artifact specifying in which file the code generation will be made. When a class (may be being an actor) is own by a class view itself associated to a deployment view, the menu of the class proposes "Create source artifact" if the class does not already have an associated artifact. When a class (may be being an actor) is own by a use case or a use case view there is no associated deployment view, so the entry proposing to create an associated artifact does not exist, in that case you have to create by yourself an artifact stereotyped "source" in a deployment view or to use an already existing artifact stereotyped "source", and to edit that artifact and through the tab Associated Classes to associated the class (may be being an actor).

It is a little similar when you want to associated several classes with a given artifact.

This is like that since always in BoUML.
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 664
Joined: Mon 20 Feb 2012 09:23
Location: France


Return to Examples - How to do / Exemples - Comment faire

Who is online

Users browsing this forum: No registered users and 1 guest

cron