Home » Modeling » Papyrus » papyrus apply a stereotype twice on an elmenet(can not specify two kinds of hosts that performing a job concurrently)
|
Re: papyrus apply a stereotype twice on an elmenet [message #1508480 is a reply to message #1508301] |
Fri, 12 December 2014 12: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 :p
|
|
| |
Re: papyrus apply a stereotype twice on an elmenet [message #1509706 is a reply to message #1508480] |
Sat, 13 December 2014 12:54 |
hu xiang 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:57Hi,
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
|
|
|
Re: papyrus apply a stereotype twice on an elmenet [message #1509723 is a reply to message #1508480] |
Sat, 13 December 2014 13:12 |
Ed Willink Messages: 7655 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 |
hu xiang 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:12Hi
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
>
>
|
|
|
Re: papyrus apply a stereotype twice on an elmenet [message #1509824 is a reply to message #1509769] |
Sat, 13 December 2014 15:12 |
Ed Willink Messages: 7655 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
>> >
>> >
>
>
|
|
| | | |
Goto Forum:
Current Time: Fri Apr 19 11:34:47 GMT 2024
Powered by FUDForum. Page generated in 0.02199 seconds
|