Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » execute rule only for one object
execute rule only for one object [message #715511] Sun, 14 August 2011 09:03 Go to next message
chuck  is currently offline chuck Friend
Messages: 160
Registered: July 2010
Senior Member
it's possible to write a rule that generate the output only with the first object matching?
Re: execute rule only for one object [message #715530 is a reply to message #715511] Sun, 14 August 2011 11:27 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

On 14/08/2011 10:03, chuck wrote:
> it's possible to write a rule that generate the output only with the
> first object matching?
Yes indeed.

But what is the question?

It might also help to know quite what programming language you are
interested in using. Prolog?

Regards

Ed Willink
Re: execute rule only for one object [message #715557 is a reply to message #715530] Sun, 14 August 2011 13:25 Go to previous messageGo to next message
chuck  is currently offline chuck Friend
Messages: 160
Registered: July 2010
Senior Member
sorry Smile i'm in atl... I would like to write a rule matching the first object and stop the execution...i don't know if it's possibile to do that with the filter...
Re: execute rule only for one object [message #716008 is a reply to message #715557] Tue, 16 August 2011 08:13 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
No it is not possible like that but you can use an entrypoint rule or an endpoint rule to explicitely call the lazy/called rule only for this object
Re: execute rule only for one object [message #716398 is a reply to message #716008] Wed, 17 August 2011 09:58 Go to previous messageGo to next message
chuck  is currently offline chuck Friend
Messages: 160
Registered: July 2010
Senior Member
I tried to create a boolean helper and set it to false ...insert into the filter rule this test on the attribute and set to true in the action block...but ...does works...
Re: execute rule only for one object [message #716404 is a reply to message #716398] Wed, 17 August 2011 10:18 Go to previous message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
No it won't work because of the flow of execution.
The filter are all evaluated and only after that the rules are executed.
Previous Topic:Back Propagation into model
Next Topic:[ATL] random function available?
Goto Forum:
  


Current Time: Sat Apr 20 02:00:43 GMT 2024

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

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

Back to the top