OCL Tuple Problem [message #585826] |
Tue, 22 August 2006 07:17 |
Chris Lenz Messages: 214 Registered: July 2009 |
Senior Member |
|
|
OK this is a little bit complex:
In the oclconsole I have to evaluate Methods:
One can evaluate only one expression, and the other can evaluate defines
and expressions.
I evaluate the following to statements:
define:
theCompoundQuery(InfC:Set(Information), LToolC:Set(LogicalTool)) :
Set(Tuple(
i : Information,
lt: LogicalTool,
r : Boolean )) =
InfC->collect( info:Information | LToolC->collect(
ltool:LogicalTool |
Tuple {
i : Information = info,
lt: LogicalTool = ltool,
r : Boolean = theCheck(info, ltool)
}))->asSet()
expression:
theCompoundQuery(self.informations,self.logicalTools)->asOrderedSet()- >at(1).i
My problem:
theCompoundQuery returns Tuples like
Tuple{i = Information XDF, lt = Paper Based System PN, r = false}
Tuple{i = Information XLI, lt = Paper Based System PN, r = true}
Tuple{i = Information XDF, lt = IT Base System PACS, r = false}
so the expression takes the first Tuple and returns the information.
My problem, if I use my method which adds the definition to the
IOCLHelper, everything works fine.
But if I use only the method for the expression, i get the following error:
The feature 'i' is not a valid feature
But if I evaluate:
theCompoundQuery(self.informations,self.logicalTools)->asOrderedSet()
I get the Tuples?
Chris
|
|
|
Powered by
FUDForum. Page generated in 0.02843 seconds