Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » traceability(transTrace.transformations)
traceability [message #1723115] Thu, 11 February 2016 18:16 Go to next message
taghreed altamimi is currently offline taghreed altamimiFriend
Messages: 184
Registered: October 2014
Senior Member
Hi,
In OO2DB example its written in the post

post {
// Store traceability links in custom model
var trace : new Trace!Trace;
for (t in transTrace.transformations) {
var link : new Trace!TraceLink;
link.sources.add(t.source);
link.targets = t.targets;
link.description = "Transformed by " + t.getRule().name;
trace.links.add(link);
}

where is transTrace defined and located??
what information can i get from transTrace??

Thanks.

[Updated on: Thu, 11 February 2016 19:36]

Report message to a moderator

Re: traceability [message #1723184 is a reply to message #1723115] Fri, 12 February 2016 11:50 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

"transTrace" is a global variable that ETL/EGX/EML set up automatically.

It's always a TransformationTrace instance that you can query through EOL: keep in mind that "a.b" gets turned into "a.getB()" through Java reflection.

You can check the Javadocs for these related classes here:

http://download.eclipse.org/epsilon/javadoc/org/eclipse/epsilon/etl/trace/TransformationTrace.html
http://download.eclipse.org/epsilon/javadoc/org/eclipse/epsilon/etl/trace/Transformations.html
http://download.eclipse.org/epsilon/javadoc/org/eclipse/epsilon/etl/trace/Transformation.html

[Updated on: Fri, 12 February 2016 11:51]

Report message to a moderator

Re: traceability [message #1723263 is a reply to message #1723184] Fri, 12 February 2016 20:06 Go to previous messageGo to next message
taghreed altamimi is currently offline taghreed altamimiFriend
Messages: 184
Registered: October 2014
Senior Member
Thanks very much that really helps
Re: traceability [message #1724019 is a reply to message #1723184] Fri, 19 February 2016 21:17 Go to previous messageGo to next message
taghreed altamimi is currently offline taghreed altamimiFriend
Messages: 184
Registered: October 2014
Senior Member
Hello,
I am trying to use the following to create Trace.model :
link.sources= toString(t.getSource().name)+t.getSourceType()

I got error that getSourceType and toString are not exist .
Can you please tell me how can I use it or if I have to download any new software.

Thanks,

Taghreed
Re: traceability [message #1724027 is a reply to message #1724019] Fri, 19 February 2016 22:35 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Taghreed,

Could you please provide a minimal example [1] we can use to reproduce this?

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/minimal-examples/
Re: traceability [message #1724112 is a reply to message #1724027] Sun, 21 February 2016 03:18 Go to previous messageGo to next message
taghreed altamimi is currently offline taghreed altamimiFriend
Messages: 184
Registered: October 2014
Senior Member
Hello
The Epsilon version that I am currently using is:
Epsilon Core 1.2.0.201408251031 org.eclipse.epsilon.core.feature.feature.group Eclipse.org

my problem happens usually when I want to create a Trace model which is an instance of Lqn2umlTrace.ecore which has two attributes of type string
sources ,targets, so the post part in the TraceabilityFeb3.etl has the problem because i am trying to use the following 3 methods :
t. getSource().name
toString() to override java.lang.Object which results from t. getSource().name
t.getSourceType()

I attached Lqn2umlTrace.emf ---the metamodel for Trace.model
TraceabilityFeb3.etl
CompletedModelNov24Ph1Ph2ActivityGraph.um source model
Targetlqn.model target model
lqnmodel the target metamodel

so please do the following to reproduce the proplem
Run the launch file as it is and note the errors when using the above methods.

By the way I was abled to get Trace.model (as a temporary solution ) when I concatenated t.getSource().name to string like (link.sources= "source is"+t.getSource().name;) and i did the same thing for
t.getTargets().first() but I still got an error when using t.getSourceType()

Thanks very much for your help.

Taghreed.




[Updated on: Sun, 21 February 2016 03:22]

Report message to a moderator

Re: traceability [message #1724120 is a reply to message #1724112] Sun, 21 February 2016 10:35 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Taghreed,

In line 14 you're calling toString(t.getSource().name). There's no context-less built-in toString(...) operation in EOL and you don't appear to have declared such an operation yourself either, hence the error.

Cheers,
Dimitris
Re: traceability [message #1724164 is a reply to message #1724120] Mon, 22 February 2016 04:53 Go to previous messageGo to next message
taghreed altamimi is currently offline taghreed altamimiFriend
Messages: 184
Registered: October 2014
Senior Member
Hello Dimitris,
I am trying to use some methods(toString(),getSourceType())
from Class TransformRule which ari found here http://download.eclipse.org/epsilon/javadoc/org/eclipse/epsilon/etl/TransformRule.html#getSourceType(org.eclipse.epsilon.eol.execute.context.IEolContext).
Sorry I have just noticed that the methods which I need are not related to Transformation class ,it is related to TransformRule class.
Can you please tell me how can I use that methods in the same way you used getSource(),getTargets() in OO2DB example ?

Cheers,
Taghreed.
Re: traceability [message #1724170 is a reply to message #1724164] Mon, 22 February 2016 05:22 Go to previous messageGo to next message
taghreed altamimi is currently offline taghreed altamimiFriend
Messages: 184
Registered: October 2014
Senior Member
Hello
I am using getTargets method which return the target with its attributes and I need only the target ,how can I do that?? is there any other method I can use it??
To clarify more for example in the following rule :
rule AcceptEventAction2entryPh1Ph2
transform a : UML!AcceptEventAction
to e : lqnmodel!entry
what I need to return only entry but getTargets returns entry [name=InitialNode1, type=PH1PH2, openarrivalrate=0.0, priority=0, semaphore=default]

Thanks ,
Taghreed.
Re: traceability [message #1724214 is a reply to message #1724170] Mon, 22 February 2016 10:31 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Taghreed,

What you're getting back is an instance of "entry", so you should be able to call getTargets().first().name for example.

Cheers,
Dimitris
Re: traceability [message #1724262 is a reply to message #1724214] Mon, 22 February 2016 15:36 Go to previous messageGo to next message
taghreed altamimi is currently offline taghreed altamimiFriend
Messages: 184
Registered: October 2014
Senior Member
Hello ,
I have tried this before but it didn't work I got error says that Property 'name' not found in object precedence [].

can you please also take a look on my reply message #1724164 it seems that you didn't notice it because I posted 2 replies (sorry for confusing you).

Cheers,
Taghreed.
Re: traceability [message #1724266 is a reply to message #1724262] Mon, 22 February 2016 16:19 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Taghreed,

> I have tried this before but it didn't work I got error says that Property 'name' not found in object precedence [].

Could you please provide a minimal example I can use to reproduce this?

Cheers,
Dimitris
Re: traceability [message #1724268 is a reply to message #1724266] Mon, 22 February 2016 16:43 Go to previous messageGo to next message
taghreed altamimi is currently offline taghreed altamimiFriend
Messages: 184
Registered: October 2014
Senior Member
Yes sure .
The problem in the Post part :
link.targets = ""+t.getTargets().first().name;
Cheers,
Taghreed

[Updated on: Mon, 22 February 2016 16:47]

Report message to a moderator

Re: traceability [message #1724307 is a reply to message #1724268] Tue, 23 February 2016 01:00 Go to previous message
taghreed altamimi is currently offline taghreed altamimiFriend
Messages: 184
Registered: October 2014
Senior Member
Hello,
I have fixed the problem it seems that the version of Eclipse that I was using has a problem .

Thanks very much.

Taghreed
Previous Topic:EOL: How to parse Boolean
Next Topic:Egl file
Goto Forum:
  


Current Time: Wed Apr 24 21:01:35 GMT 2024

Powered by FUDForum. Page generated in 0.03607 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top