Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » papyrus apply a stereotype twice on an elmenet(can not specify two kinds of hosts that performing a job concurrently)
papyrus apply a stereotype twice on an elmenet [message #1508301] Fri, 12 December 2014 09:35 Go to next message
hu xiang is currently offline hu xiangFriend
Messages: 8
Registered: December 2013
Junior Member
An action may need multiple hosts (resources) to be executed. In Papyrus, I can specify a stereotype of "PaStep" with two host on an action node. Nor can I specify two stereotypes of "PaStep" on the same node, and each one has a different host.

The problem above is that one kind of stereotype can not specified on one action node twice.

What can I do? There is a property in "PaStep" -- "usedResources", but I prefer not to use it. I think it natural that there exist several hosts to performing the job.

Please, help Razz
Re: papyrus apply a stereotype twice on an elmenet [message #1508480 is a reply to message #1508301] Fri, 12 December 2014 12:57 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1206
Registered: July 2009
Location: Canada
Senior Member

Hi,

In UML, a stereotype is conceptually an "extension" of a metaclass that
adds attributes to that metaclass. Repeating a stereotype would
logically repeat attributes in the extended metaclass, which does not
make sense. The UML does not permit repeated application of a
stereotype.

You would be better served by explicitly modeling the multiplicity of
nodes in your stereotype by either

- representing the node by a Class contained by the stereotype in a
property that has
multiplicity
- representing the node by a stereotype on some other kind of UML element and
defining an association between the two stereotypes

HTH,

Christian


On 2014-12-12 09:35:21 +0000, hu xiang said:

> An action may need multiple hosts (resources) to be executed. In
> Papyrus, I can specify a stereotype of "PaStep" with two host on an
> action node. Nor can I specify two stereotypes of "PaStep" on the same
> node, and each one has a different host.
>
> The problem above is that one kind of stereotype can not specified on
> one action node twice.
>
> What can I do? There is a property in "PaStep" -- "usedResources", but
> I prefer not to use it. I think it natural that there exist several
> hosts to performing the job.
>
> Please, help :p
Re: papyrus apply a stereotype twice on an elmenet [message #1509704 is a reply to message #1508480] Sat, 13 December 2014 12:52 Go to previous messageGo to next message
hu xiang is currently offline hu xiangFriend
Messages: 8
Registered: December 2013
Junior Member
Thanks for your detailed reply! Smile

But I do not quite understand the suggestion you offered. Should I represent an action with two hosts by two separate actions, and each of them has a host?
This may be a solution though not quite elegant.

And the "node" in your solutions refers to the action or the resource node? Could you please give some more explanation.
Re: papyrus apply a stereotype twice on an elmenet [message #1509706 is a reply to message #1508480] Sat, 13 December 2014 12:54 Go to previous messageGo to next message
hu xiang is currently offline hu xiangFriend
Messages: 8
Registered: December 2013
Junior Member
Thanks for your detailed reply! Smile

But I do not quite understand the suggestion you offered. Should I represent an action with two hosts by two separate actions, and each of them has a host?
This may be a solution though not quite elegant.

And the "node" in your solutions refers to the action or the resource node? Could you please give some more explanation.

Christian W. Damus wrote on Fri, 12 December 2014 07:57
Hi,

In UML, a stereotype is conceptually an "extension" of a metaclass that
adds attributes to that metaclass. Repeating a stereotype would
logically repeat attributes in the extended metaclass, which does not
make sense. The UML does not permit repeated application of a
stereotype.

You would be better served by explicitly modeling the multiplicity of
nodes in your stereotype by either

- representing the node by a Class contained by the stereotype in a
property that has
multiplicity
- representing the node by a stereotype on some other kind of UML element and
defining an association between the two stereotypes

HTH,

Christian


On 2014-12-12 09:35:21 +0000, hu xiang said:

> An action may need multiple hosts (resources) to be executed. In
> Papyrus, I can specify a stereotype of "PaStep" with two host on an
> action node. Nor can I specify two stereotypes of "PaStep" on the same
> node, and each one has a different host.
>
> The problem above is that one kind of stereotype can not specified on
> one action node twice.
>
> What can I do? There is a property in "PaStep" -- "usedResources", but
> I prefer not to use it. I think it natural that there exist several
> hosts to performing the job.
>
> Please, help Razz

Re: papyrus apply a stereotype twice on an elmenet [message #1509723 is a reply to message #1508480] Sat, 13 December 2014 13:12 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6769
Registered: July 2009
Senior Member
Hi

While repetition of exactly the same stereotype my be prohibited,
multiple application of the stereotype is not prohibited. You may chose
to introduce Source/Target derived stereotypes for your two hosts.

Regards

Ed Willink

On 12/12/2014 12:57, Christian W. Damus wrote:
> Hi,
>
> In UML, a stereotype is conceptually an "extension" of a metaclass that
> adds attributes to that metaclass. Repeating a stereotype would
> logically repeat attributes in the extended metaclass, which does not
> make sense. The UML does not permit repeated application of a stereotype.
>
> You would be better served by explicitly modeling the multiplicity of
> nodes in your stereotype by either
>
> - representing the node by a Class contained by the stereotype in a
> property that has
> multiplicity
> - representing the node by a stereotype on some other kind of UML
> element and
> defining an association between the two stereotypes
>
> HTH,
>
> Christian
>
>
> On 2014-12-12 09:35:21 +0000, hu xiang said:
>
>> An action may need multiple hosts (resources) to be executed. In
>> Papyrus, I can specify a stereotype of "PaStep" with two host on an
>> action node. Nor can I specify two stereotypes of "PaStep" on the same
>> node, and each one has a different host.
>>
>> The problem above is that one kind of stereotype can not specified on
>> one action node twice.
>>
>> What can I do? There is a property in "PaStep" -- "usedResources", but
>> I prefer not to use it. I think it natural that there exist several
>> hosts to performing the job.
>>
>> Please, help :p
>
>
Re: papyrus apply a stereotype twice on an elmenet [message #1509769 is a reply to message #1509723] Sat, 13 December 2014 14:06 Go to previous messageGo to next message
hu xiang is currently offline hu xiangFriend
Messages: 8
Registered: December 2013
Junior Member
Hi,

This is ture that I have tried to apply the stereotypes of "PaStep" and "GaStep"(also, "AcqStep" and "RelStep") on one action. But it seems not elegant.

What is "Source/Target derived stereotypes"? Could you please explain it more specifically or give some references.

Regards,
Xiang Hu



Ed Willink wrote on Sat, 13 December 2014 08:12
Hi

While repetition of exactly the same stereotype my be prohibited,
multiple application of the stereotype is not prohibited. You may chose
to introduce Source/Target derived stereotypes for your two hosts.

Regards

Ed Willink

On 12/12/2014 12:57, Christian W. Damus wrote:
> Hi,
>
> In UML, a stereotype is conceptually an "extension" of a metaclass that
> adds attributes to that metaclass. Repeating a stereotype would
> logically repeat attributes in the extended metaclass, which does not
> make sense. The UML does not permit repeated application of a stereotype.
>
> You would be better served by explicitly modeling the multiplicity of
> nodes in your stereotype by either
>
> - representing the node by a Class contained by the stereotype in a
> property that has
> multiplicity
> - representing the node by a stereotype on some other kind of UML
> element and
> defining an association between the two stereotypes
>
> HTH,
>
> Christian
>
>
> On 2014-12-12 09:35:21 +0000, hu xiang said:
>
>> An action may need multiple hosts (resources) to be executed. In
>> Papyrus, I can specify a stereotype of "PaStep" with two host on an
>> action node. Nor can I specify two stereotypes of "PaStep" on the same
>> node, and each one has a different host.
>>
>> The problem above is that one kind of stereotype can not specified on
>> one action node twice.
>>
>> What can I do? There is a property in "PaStep" -- "usedResources", but
>> I prefer not to use it. I think it natural that there exist several
>> hosts to performing the job.
>>
>> Please, help Razz
>
>

Re: papyrus apply a stereotype twice on an elmenet [message #1509824 is a reply to message #1509769] Sat, 13 December 2014 15:12 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6769
Registered: July 2009
Senior Member
Hi

A derived stereotype for your 'source' role possibly named "Source". etc...

Regards

Ed Willink

On 13/12/2014 14:06, hu xiang wrote:
> Hi,
>
> This is ture that I have tried to apply the stereotypes of "PaStep" and
> "GaStep"(also, "AcqStep" and "RelStep") on one action. But it seems not
> elegant.
>
> What is "Source/Target derived stereotypes"? Could you please explain it
> more specifically or give some references.
>
> Regards,
> Xiang Hu
>
>
>
> Ed Willink wrote on Sat, 13 December 2014 08:12
>> Hi
>>
>> While repetition of exactly the same stereotype my be prohibited,
>> multiple application of the stereotype is not prohibited. You may
>> chose to introduce Source/Target derived stereotypes for your two hosts.
>>
>> Regards
>>
>> Ed Willink
>>
>> On 12/12/2014 12:57, Christian W. Damus wrote:
>> > Hi,
>> >
>> > In UML, a stereotype is conceptually an "extension" of a metaclass that
>> > adds attributes to that metaclass. Repeating a stereotype would
>> > logically repeat attributes in the extended metaclass, which does not
>> > make sense. The UML does not permit repeated application of a
>> stereotype.
>> >
>> > You would be better served by explicitly modeling the multiplicity of
>> > nodes in your stereotype by either
>> >
>> > - representing the node by a Class contained by the stereotype in a
>> > property that has
>> > multiplicity
>> > - representing the node by a stereotype on some other kind of UML
>> > element and
>> > defining an association between the two stereotypes
>> >
>> > HTH,
>> >
>> > Christian
>> >
>> >
>> > On 2014-12-12 09:35:21 +0000, hu xiang said:
>> >
>> >> An action may need multiple hosts (resources) to be executed. In
>> >> Papyrus, I can specify a stereotype of "PaStep" with two host on an
>> >> action node. Nor can I specify two stereotypes of "PaStep" on the same
>> >> node, and each one has a different host.
>> >>
>> >> The problem above is that one kind of stereotype can not specified on
>> >> one action node twice.
>> >>
>> >> What can I do? There is a property in "PaStep" -- "usedResources", but
>> >> I prefer not to use it. I think it natural that there exist several
>> >> hosts to performing the job.
>> >>
>> >> Please, help :p
>> >
>> >
>
>
Re: papyrus apply a stereotype twice on an elmenet [message #1510388 is a reply to message #1509824] Sun, 14 December 2014 02:46 Go to previous messageGo to next message
hu xiang is currently offline hu xiangFriend
Messages: 8
Registered: December 2013
Junior Member
Thanks, but I still don't know how to specify them in Papyrus. In a activity diagram, an action with multiple "host", how to specify multiple stereotypes of "PaStep" on this action. In the view of "Model Explorer" or "Properties", I can't find any way to operate on stereotypes. The only thing I can do is to add/remove/edit a stereotype, how to specify derived stereotypes as you said.

Regards,

Smile
Re: papyrus apply a stereotype twice on an elmenet [message #1510738 is a reply to message #1510388] Sun, 14 December 2014 09:55 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6769
Registered: July 2009
Senior Member
Hi

You create another Stereotype that is derived from/inherits/specializes
the one you already have. Then you can add it.

Regards

Ed Willink

On 14/12/2014 02:46, hu xiang wrote:
> Thanks, but I still don't know how to specify them in Papyrus. In a
> activity diagram, an action with multiple "host", how to specify
> multiple stereotypes of "PaStep" on this action. In the view of "Model
> Explorer" or "Properties", I can't find any way to operate on
> stereotypes. The only thing I can do is to add/remove/edit a stereotype,
> how to specify derived stereotypes as you said.
>
> Regards,
>
> :)
Re: papyrus apply a stereotype twice on an elmenet [message #1510864 is a reply to message #1510738] Sun, 14 December 2014 12:25 Go to previous message
hu xiang is currently offline hu xiangFriend
Messages: 8
Registered: December 2013
Junior Member
Thanks again, your answers are of great help to me. Very Happy
Previous Topic:Navigating association class(stereotype) in an OCL constraint
Next Topic:Papyrus 1.0 SR1a
Goto Forum:
  


Current Time: Wed Jul 08 15:34:26 GMT 2020

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

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

Back to the top