Ok, thanks... this now makes sense to me.

So, you have several options.

First is to check out the new quick start archetype provided by
http://platform.incode.org , in particular with the embedded camel
extension. This is basically the architecture that our app, Estatio, uses
to sync with our General Ledger system. It uses the PublisherService SPI
and an implementation that published to ActiveMQ. An internal Camel route
then picks up these events (obviously the Camel stuff could also run as a
separate webapp).

Alternatively, you could write your own implementation of the
PublisherSevice SPI and have every object published (this can be configured
globally). I think this might be the easiest solution. To create a json
representation of a domain object, see [1], but note that isn't public API.
Or, there's also an XmlSnapshotService that you could explore [2].

Another option is the AuditerService, which is very fine-grained, but a
custom implementation of this might work.

Hope that helps.
Dan.

[1]
https://github.com/isisaddons-legacy/isis-module-publishing/blob/master/dom/src/main/java/org/isisaddons/module/publishing/dom/eventserializer/RestfulObjectsSpecEventSerializer.java
[2] http://isis.apache.org/guides/rgsvc/rgsvc.html

On Sat, 30 Sep 2017, 13:32 Nikhil Dhamapurkar, <
[email protected]> wrote:

> Hi Dan,
>
> We plan to use apache ISIS for working with entities that are saved in
> different table/ schema/ database  (database A) this is a newer version of
> our API.
> The earlier version of API still has these entities with different column
> names in another tables which care still used in legacy flows  in  database
> B
>
> When a  ‘manual’ change is made via Apache ISIS in database A I would like
> a mechanism  that intercepts the change converts entity as a standard
> payload say JSON and send to another application that transforms the
> objects as Database B knows it and inserts or updates it.
>
> Instead of having a polling mechanism to Identify new or updated entities
> in database A and me worrying about conversion of entity to JSON as viewer
> is already doing it , I am thinking to use apache ISIS bus to tap into the
> objects,  use viewers ability to converts it to JSON and then send to the
> Other application listener over rest so it can insert or update database B?
>
> If needed the listener component can make add hock request over rest/ curl
> to swagger UI  and get  use the same viewer logic to convert entities to
> JSON which will avoid me to hit DB and read the entities from database A.
>
> Regards
> Nikhil
>
> From: Dan Haywood
> Sent: 29 September 2017 23:47
> To: [email protected]
> Subject: Re: Listening on event Bus of ISIS
>
> Hi Nikhil,
>
> It's certainly possible for the framework to support publishing scenarios,
> but I admit I don't quite understand the scenario that you are describing.
>
> The swagger UI is just a convenient frontend for making http calls against
> the rest API provided by the restful objects viewer, so it's the to viewer,
> not swagger, that's generating the json.
> It is possible to serialize objects into json, but what I don't understand
> is how you intend to associate a crud action (invoked via wicket?)  to a
> response to a rest API call?
>
> Dan
>
> On Fri, 29 Sep 2017, 12:55 Nikhil Dhamapurkar, <
> [email protected]> wrote:
>
> >
> > For one of our requirements we are planning to listen to Event bus of
> > apache ISIS, apache ISIS acts as admin GUI that makes changes on
> > preferences of different entities which are of interest to other
> > applications.
> >
> > After there are changes we are planning to use the swagger based rest UI
> > to request / respond to GET and POST Entities.
> >
> > Can I redirect the event of CRUD operation published on event bus to
> > Swagger GUI response  , I want to use the same Object to Jason
> > functionality that ISIS already provides me what is the best way to do
> this?
> >
> > Object Change → event on the Bus→ use Swagger’s ability to convert
> > Entities to JSON and send over rest
> >
> > Regards
> > Nikhil
> >
> >
>
>

Reply via email to