Just picking up on this mail of yours, James... A while back I introduced support for the Guava eventbus in the domain model, and introduced the @PostsPropertyChangedEvent. This will cause the old/new values of the change to be sent to any (domain service) subscriber.
One possibility might be to extend this idea with additional annotations, eg @PostsCollectionAddedToEvent, @PostsCollectionRemovedFromEvent, @PostsActionInvokedEvent, @PostsObjectPersistedEvent, @PostsObjectDeletedEvent. I think that this would probably cover most of the lifecycle events you would want to handle; it'd also be a pretty useful way of decoupling a domain model (without the overhead of publishing via Isis' PublishingService API). I've just created a new ticket [1] for this feature idea. It's not near the top of my todo list, but if you are interested in developing the idea, I'd be happy to support you. Cheers Dan [1] https://issues.apache.org/jira/browse/ISIS-550 On 19 September 2013 14:48, james agada <[email protected]> wrote: > ABL allows you to do declarative programming of business logic. Business > logic are defined to be executed when certain lifecycle events happen and > are self propagating ie if A happens and makes changes, B gets triggered > automatically and so on. In the case of ABL you can specify these at entity > ( Hibernate/JPA) level using annotation. For instance in the use case I am > doing, when you create a transaction, it triggers the update of the stock > ledger if required, notifies participants among other things. I have > implemented this by tying this to the persist() life cycle event. Of > course, I will have to think of what to do for other life cycle events - > delete, modify etc. > > > On Thu, Sep 19, 2013 at 2:32 PM, Dan Haywood > <[email protected]>wrote: > > > Glad that's sorted the issue. > > > > Am not familiar with ABL... what sort of features would you like > > incorporated? Either start a discussion here, or raise a ticket with > your > > ideas. > > > > Thx > > Dan > > > > > > > > On 19 September 2013 14:18, james agada <[email protected]> wrote: > > > > > Problem has gone away. My code works. Essentially I can almost > replicate > > > the functionality of ABL http://www.automatedbusinesslogic.com just by > > > utilizing the lifecycle events. How difficult will it be to add ABL > > > functionality in Isis? > > > > > > > > > On Sun, Sep 15, 2013 at 1:08 PM, Okwui <[email protected]> wrote: > > > > > > > Thanks a million. If my usage is correct, it makes Isis even more > > > powerful > > > > than I thought. > > > > > > > > Sent from my iPad > > > > > > > > On Sep 15, 2013, at 12:31 PM, Dan Haywood < > > [email protected]> > > > > wrote: > > > > > > > > > On 15 September 2013 12:28, james agada <[email protected]> > > wrote: > > > > > > > > > >>> I can see that using lifecycle callbacks [1] to > > create/update/delete > > > > >>> further objects could cause this. But I doubt you aren't doing > > > this. > > > > >> Aha. I am doing this. If this is the problem then I hope your fix > > will > > > > be > > > > >> it. > > > > > That's good to know; glad my guess turned right, then. > > > > > > > > > > > > > > > > > > > >>> In the meantime, the fix I'm putting in ISIS-533 might address > the > > > > >> issue, > > > > >>> whatever. > > > > >> How will I get this fix? Do I need to build from source all over > > > again. > > > > > > > > > > You will. But that just means "git pull" followed by "mvn clean > > > install > > > > > -o". No big deal. > > > > > > > > > > Just working on the fix now. > > > > > > > > > > Dan > > > > > > > > > >
