Hi, I'm a newbie in atl and starting a new project I encounter with an error when executing this
code module Convert;
create OUT : bpmn20 refining IN : bpmn20;
rule addTask{
from
prc : bpmn20!Process in IN
to
modPrc : bpmn20!Process(
flowElements <- prc.flowElements->including(newTsk)
),
newTsk : bpmn20!Task(
id <- 'newTask',
name <- 'newTask'
)
}
rule dropTask{
from
tsk : bpmn20!Task in IN (tsk.id = 'Task_2')
to
drop
}
the intended of this code is create a new task and remove one in the IN model, it is possible to execute on rule at a time but no the two together.
The error encountered when executing the above code is the following org.eclipse.m2m.atl.engine.emfvm.VMException
at __resolve__#13(Convert.atl)
local variables: self=Convert : ASMModule, value=IN!Task 2
at __resolve__#26(Convert.atl)
local variables: self=Convert : ASMModule, value=Sequence {IN!Start Event 1, IN!End Event 1, IN!Task 1, IN!<unnamed>, IN!Task 2, IN!<unnamed>, IN!Task 3, IN!<unnamed>, IN!<unnamed>, refiningTrace!<unnamed>}, e=IN!Task 2
at __applyaddTask#20(Convert.atl[12:4-12:55])
local variables: self=Convert : ASMModule, link=TransientLink {rule = addTask, sourceElements = {prc = org.eclipse.bpmn2.impl.ProcessImpl@32e357ff (id: process_1, anyAttribute: null) (name: Default Process) (isClosed: false, isExecutable: false, processType: None)}, targetElements = {modPrc = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@3102478e (eClass: org.eclipse.emf.ecore.impl.EClassImpl@46940594 (name: Element) (instanceClassName: null) (abstract: false, interface: false)), newTsk = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@4729e93 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@46940594 (name: Element) (instanceClassName: null) (abstract: false, interface: false))}, variables = {}}, prc=IN!Default Process, modPrc=refiningTrace!<unnamed>, newTsk=refiningTrace!<unnamed>
at __exec__#8(Convert.atl)
local variables: self=Convert : ASMModule, e=TransientLink {rule = addTask, sourceElements = {prc = org.eclipse.bpmn2.impl.ProcessImpl@32e357ff (id: process_1, anyAttribute: null) (name: Default Process) (isClosed: false, isExecutable: false, processType: None)}, targetElements = {modPrc = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@3102478e (eClass: org.eclipse.emf.ecore.impl.EClassImpl@46940594 (name: Element) (instanceClassName: null) (abstract: false, interface: false)), newTsk = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@4729e93 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@46940594 (name: Element) (instanceClassName: null) (abstract: false, interface: false))}, variables = {}}
at main#36(Convert.atl)
local variables: self=Convert : ASMModule
Java Stack:
org.eclipse.m2m.atl.engine.emfvm.VMException
at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:643)
at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:388)
at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:388)
at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:388)
at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:388)
at org.eclipse.m2m.atl.engine.emfvm.ASM.run(ASM.java:208)
at org.eclipse.m2m.atl.engine.emfvm.launch.EMFVMLauncher.internalLaunch(EMFVMLauncher.java:170)
at org.eclipse.m2m.atl.engine.emfvm.launch.EMFVMUILauncher.launch(EMFVMUILauncher.java:46)
at org.eclipse.m2m.atl.core.service.LauncherService.launch(LauncherService.java:136)
at org.eclipse.m2m.atl.core.ui.launch.AtlLaunchConfigurationDelegate.launchOrDebug(AtlLaunchConfigurationDelegate.java:307)
at org.eclipse.m2m.atl.core.ui.launch.AtlLaunchConfigurationDelegate.launch(AtlLaunchConfigurationDelegate.java:234)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: java.util.NoSuchElementException
at java.util.ArrayList$Itr.next(Unknown Source)
at org.eclipse.m2m.atl.engine.emfvm.lib.ExecEnv$173.exec(ExecEnv.java:1685)
at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:391)
... 15 more
Any help will be very helpful