Page 1 of 1

Are Business Logic Events Triggered on XML Import

PostPosted: Fri Jun 28, 2019 1:28 pm
by Nina Tulic
Hi,
When importing business entries into Jiwa such as sales orders, stocktake or purchase orders via XML does Jiwa trigger business logic events in particular when contained in a custom plugin?

Thanks
Nina
[email protected]

Re: Are Business Logic Events Triggered on XML Import

PostPosted: Fri Jun 28, 2019 2:11 pm
by DannyC
Nina,
Mike or Scott may correct me, but we've found that yes they're fired when XML files are imported.

Cheers
Danny

Re: Are Business Logic Events Triggered on XML Import

PostPosted: Fri Jun 28, 2019 4:24 pm
by Mike.Sheen
You won't get the PropertyChanged events at the top level (eg: a sales order) - we suppress those during the legacy XML import - but you should get PropertyChanged events for things like properties of sales order lines.

Some other events are suppressed here and there - things like the serial selection event when quantities change. But, for the most part, you'll get the normal events.

EDIT: If that's a problem, in that if you added handlers for business logic events and you don't want that logic executed during the XML import, or you want different behaviour when importing, then note that the DeserialiseStart event is raised at the beginning of import AND the IsDeserialising property of the business logic is set to True until the conclusion of import - at which point the IsDeserialising flag is reset and the DeserialseEnd event is raised - so you have some options available for behaving differently during XML import (deserialisation).

Re: Are Business Logic Events Triggered on XML Import

PostPosted: Fri Jun 28, 2019 5:14 pm
by Scott.Pearce
and don't forget there is always a DeserialiseEnd event thrown after the import completes.

Re: Are Business Logic Events Triggered on XML Import  Topic is solved

PostPosted: Fri Jun 28, 2019 5:21 pm
by Mike.Sheen
Scott.Pearce wrote:and don't forget there is always a DeserialiseEnd event thrown after the import completes.


And don't you forget DeserialiseStart at the start of the import!

Re: Are Business Logic Events Triggered on XML Import

PostPosted: Mon Jul 01, 2019 11:48 am
by Nina Tulic
Thank you gentlemen much appreciated :)

Nina