[atl] foreach related with Called rule [message #77182] |
Wed, 19 March 2008 12:39 |
wong Messages: 54 Registered: July 2009 |
Member |
|
|
Hello,
I know the foreach statement does not work inside the called rule, but I
also got error in run time when I invoke a called rule form a matched rule
with a foreach statemnet.
rule Concept2Topic{
from ....
to
newLearnerStereotypes : distinct COURSE!LearnerStereotype foreach (e
in DOMAIN!LearnerStereotype.allInstances())(
type <- e.type,
knowledgeConstraints <-
Sequence{thisModule.ruleNewKnowledgeConstraint(e.knowledgeCo nstraints.first())}.debug('-------')
),
rule ruleNewKnowledgeConstraint(r1p1:DOMAIN!KnowledgeConstraint){
to
r1p2: COURSE!KnowledgeConstraint (
name <- r1p1.name
)
do{
r1p2;
}
}
Error:
[am3.atl] INFO: sfsdf: Sequence {mikaelLow!xml, mikaelLow!xml,
mikaelLow!java}
[am3.atl] INFO: sfsdf: Sequence {mikaelLow!xml, mikaelLow!xml,
mikaelLow!java}
[am3.atl] INFO: -------: Sequence {OUT!xmlGoal}
[am3.atl] INFO: -------: Sequence {OUT!xmlGoal2}
[am3.atl] SEVERE: ****** BEGIN Stack Trace
[am3.atl] SEVERE: exception:
[am3.atl] SEVERE: null
[am3.atl] java.lang.reflect.InvocationTargetException
[am3.atl] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[am3.atl] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
Source)
[am3.atl] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
[am3.atl] at java.lang.reflect.Method.invoke(Unknown Source)
[am3.atl] at
org.eclipse.m2m.atl.engine.vm.ClassNativeOperation.exec(Clas sNativeOperation.java:59)
[am3.atl] at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
[am3.atl] at org.eclipse.
...........
Thank you,
Wong
|
|
|
Powered by
FUDForum. Page generated in 0.03257 seconds