Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Model visibility in ETL-guard
Model visibility in ETL-guard [message #1413402] Thu, 28 August 2014 12:45 Go to next message
Sebastian Zitzelsberger is currently offline Sebastian ZitzelsbergerFriend
Messages: 33
Registered: August 2014
Member
Hi there,

I am using a guard for an ETL-Rule.
In this guard, i want to check for a condition, that depends on data generated by the same rule in a previous instance.

The data that i want to check is not visible from the guard, however it is visible within the rule.

For example:

rule ATOB
transform a: MMA!A
to b : MMB!B {
guard: not MMB!B.all.exists(somecondition) <-- Data is not visible here

not MMB!B.all.exists(somecondition) <-- Data is visible here

}

Is this an intended behaviour (e.g. for transaction context reasons) or is this a bug?

I will provide a minimal example soon.
Re: Model visibility in ETL-guard [message #1413486 is a reply to message #1413402] Thu, 28 August 2014 16:43 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi Sebastian,

This is the intented behaviour. All guards are executed before the bodies of any of the rules are executed.

Cheers,
Dimitris
Re: Model visibility in ETL-guard [message #1413815 is a reply to message #1413486] Fri, 29 August 2014 13:38 Go to previous messageGo to next message
Sebastian Zitzelsberger is currently offline Sebastian ZitzelsbergerFriend
Messages: 33
Registered: August 2014
Member
Hi Dimitris,

Thanks for your answer.

Thats what i found out aswell while implementing the minimal example.

Could you please explain the reasoning behind this?
Because this makes it impossible to define dynamic guards.

Instead I must use if clauses within the body and manually delete the instances of the target entities that were pre-Created by the rule, if the dynamic "guard" is not fullfilled.

[Updated on: Fri, 29 August 2014 13:44]

Report message to a moderator

Re: Model visibility in ETL-guard [message #1415146 is a reply to message #1413815] Tue, 02 September 2014 07:26 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi Sebastian,

We've found that creating all target model elements in one pass, and then running the bodies of the rules improves the overall execution time considerably. Off the top of my head, a workaround for this could be to add a dummy @lazy rule which should change the behaviour of the execution engine to the one you are expecting.

Cheers,
Dimitris
Previous Topic:[EMF Model] XMI namespace URI
Next Topic:Processing an Ecore-Based Model as a Graph
Goto Forum:
  


Current Time: Thu Mar 28 12:25:50 GMT 2024

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

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

Back to the top