Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » implemented usecases
implemented usecases [message #501172] Tue, 01 December 2009 07:13 Go to next message
pkojo is currently offline pkojo
Messages: 27
Registered: October 2009
Junior Member
Hi,

I am trying to define a query for implemented use case for sequence diagram.

context um::Model
def: findImplementedUseCases(): Set(UseCase) =
UseCase.allInstances()->select(u|UseCase.allInstances().subject = uml::Interaction)
inv: findImplementedUseCases().name -> asSet()

I think I am not in right direction, can any body help me to correct this.

Thanks,
Pkojo

[Updated on: Tue, 01 December 2009 07:14]

Report message to a moderator

Re: implemented usecases [message #501295 is a reply to message #501172] Tue, 01 December 2009 13:49 Go to previous messageGo to next message
Christian W. Damus is currently offline Christian W. Damus
Messages: 776
Registered: July 2009
Senior Member
--=-9LqDMFgacRxnwzUtoJyW
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi, Pkojo,

>From your attempt at an OCL formulation, I cannot guess what you mean by
"implemented use case." Uses cases typically are not "implemented" in
the sense that classifiers have run-time instances. Use cases and
actors can classify the parts of a Collaboration (which may then be
called a "use case realization"), use cases may reference one or more
Classifiers as "subjects" which realize the use cases in some way
through their behaviours, and use cases may own Behaviors that describe
the the exchange of control/data/etc. between the participants.

Are you looking for a way to

- find Use Cases that are specified by Interaction behaviors?
- find Use Cases that reference subject Classifiers (and hence are
realized by them)?
- find Use Cases that classify the parts of one or more
Collaborations?

Cheers,

Christian


On Tue, 2009-12-01 at 07:13 -0500, pkojo wrote:

> Hi,
>
> I am trying to define a query for implemented use case for sequence diagram.
>
> context um::Model
> def: findImplementedUseCases(): Set(UseCase) =
> UseCase.allInstances()->select(u|UseCase.allInstances().subject = uml::Interaction)
> inv: findImplementedUseCases().name = asSet()
>
> I think I am not in right direction, can any body help me to correct this.
>
> Thanks,
> Pkojo

--=-9LqDMFgacRxnwzUtoJyW
Content-Type: text/html; charset="utf-8"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Pkojo,<BR>
<BR>
>From your attempt at an OCL formulation, I cannot guess what you mean by &quot;implemented use case.&quot;&nbsp;&nbsp; Uses cases typically are not &quot;implemented&quot; in the sense that classifiers have run-time instances.&nbsp; Use cases and actors can classify the parts of a Collaboration (which may then be called a &quot;use case realization&quot;), use cases may reference one or more Classifiers as &quot;subjects&quot; which realize the use cases in some way through their behaviours, and use cases may own Behaviors that describe the the exchange of control/data/etc. between the participants.<BR>
<BR>
Are you looking for a way to<BR>
<BR>
&nbsp; - find Use Cases that are specified by Interaction behaviors?<BR>
&nbsp; - find Use Cases that reference subject Classifiers (and hence are realized by them)?<BR>
&nbsp; - find Use Cases that classify the parts of one or more Collaborations?<BR>
<BR>
Cheers,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Tue, 2009-12-01 at 07:13 -0500, pkojo wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hi,

I am trying to define a query for implemented use case for sequence diagram.

context um::Model
def: findImplementedUseCases(): Set(UseCase) =
UseCase.allInstances()-&gt;select(u|UseCase.allInstances ().subject = uml::Interaction)
inv: findImplementedUseCases().name = asSet()

I think I am not in right direction, can any body help me to correct this.

Thanks,
Pkojo
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-9LqDMFgacRxnwzUtoJyW--
Re: implemented usecases [message #501348 is a reply to message #501295] Tue, 01 December 2009 17:15 Go to previous messageGo to next message
pkojo is currently offline pkojo
Messages: 27
Registered: October 2009
Junior Member
Hi Chirstan

I am trying to implement this:


find Use Cases that are specified by Interaction behaviors?


regards,
pkojo
Re: implemented usecases [message #501479 is a reply to message #501348] Wed, 02 December 2009 09:04 Go to previous message
Christian W. Damus is currently offline Christian W. Damus
Messages: 776
Registered: July 2009
Senior Member
--=-UEB+LJodWDfbXvSkZ6qi
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi, pkojo,

Try this:


UseCase.allInstances()->select(ownedBehaviour->exists(oclIsKindOf(Interaction)))


HTH,

Christian


On Tue, 2009-12-01 at 17:15 -0500, pkojo wrote:

> Hi Chirstan
>
> I am trying to implement this:
>
>
> find Use Cases that are specified by Interaction behaviors?
>
>
> regards,
> pkojo

--=-UEB+LJodWDfbXvSkZ6qi
Content-Type: text/html; charset="utf-8"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, pkojo,<BR>
<BR>
Try this:<BR>
<BR>
&nbsp;&nbsp;&nbsp; UseCase.allInstances()-&gt;select(ownedBehaviour-&gt ;exists(oclIsKindOf(Interaction))) <BR>
<BR>
<BR>
HTH,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Tue, 2009-12-01 at 17:15 -0500, pkojo wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hi Chirstan

I am trying to implement this:


find Use Cases that are specified by Interaction behaviors?


regards,
pkojo
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-UEB+LJodWDfbXvSkZ6qi--
Previous Topic:eGet(ref) does not return a collection but only its first element
Next Topic:Remove double instances from set
Goto Forum:
  


Current Time: Fri Aug 29 08:14:57 EDT 2014

Powered by FUDForum. Page generated in 0.02235 seconds