|Re: CallEvent matching with class operation [message #541768 is a reply to message #541709]
||Tue, 22 June 2010 13:06
| Christian W. Damus
Registered: July 2009
The error message tells you everything that you need to know to fix this
First, it indicates that it is looking for an '=' operation accepting a
String argument. The only String-type expression that you have is
'e1.name'. So, the type in which the parser is looking for this
operation (the 'Bag(Operation)' type) must be the target of the '='
operation, that is, 'CallEvent.allInstances().operation'.
You cannot compare a Bag of Operations with a String.
So, you could instead do this:
This will give you the owned operations of 'self' that are called by
*some* behaviour model. It won't ensure that this call is in an
Interaction (rather than, say, an Activity), nor that it is in a
particular interaction, nor *which* call event(s) call which
operation(s). It also doesn't account for inherited operations, if
that's potentially important.
On 22/06/10 05:41 AM, pkojo wrote:
> I am trying to match CallEvent operations from sequence diagram to class
> diagram using OCL Interpreter, I run following query to do this: but got
> an error and tries many other possibilities but got the same error
> Error: Cannot find operation (=(String)) for the type (Bag(Operation))
> Can any one point me what should I do to resolve this query.
> Thanks in advance,
Powered by FUDForum
. Page generated in 0.01833 seconds