[ATL] Problem when referencing a created target element within a rule [message #534485] |
Wed, 19 May 2010 10:38 |
kikou Messages: 7 Registered: May 2010 |
Junior Member |
|
|
Hello !!
I am trying this ATL code but when lunching the transformation i receive this notification "An internal error occurred during: "Launching Principal Program".
java.lang.String cannot be cast to org.eclipse.emf.ecore.EObject
I know that the source of my problem is the wrong way I used to reference the bevavior when I call the "createBehaviorVariable" Rule. (I have put it in red color).
Can you please tell me the right way to reference the behavior within the "createBehaviorVariable" rule.
I inclosed my source code to this message.
Thank you so much.
Best regards.
kikou
rule UIMLRulefromTask {
from
s: bpmn!Task
do {
thisModule.createBehavior (s.Id.toString());
thisModule.createBehaviorVariable(s.Id.toString(), 'string', true, s.Id);
}
}
rule createBehavior(id: String ) {
to c: xml!Behavior ()
do
{
c.id <- id;
}
}
rule createBehaviorVariable(name: String, type: String, value: String, behavior: xml!Behavior) {
to
variable: xml!Variable()
do
{
variable.name <- name;
variable.type <- type;
variable.value <- value;
behavior.variable <- variable;
}
}
[Updated on: Wed, 19 May 2010 10:44] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04867 seconds