Are Business Logic Events Triggered on XML Import  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Are Business Logic Events Triggered on XML Import

Postby Nina Tulic » Fri Jun 28, 2019 1:28 pm

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]
Nina Tulic
Occasional Contributor
Occasional Contributor
 
Posts: 35
Joined: Fri Feb 14, 2014 11:03 am
Topics Solved: 0

Re: Are Business Logic Events Triggered on XML Import

Postby DannyC » Fri Jun 28, 2019 2:11 pm

Nina,
Mike or Scott may correct me, but we've found that yes they're fired when XML files are imported.

Cheers
Danny
User avatar
DannyC
Senpai
Senpai
 
Posts: 635
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 29

Re: Are Business Logic Events Triggered on XML Import

Postby Mike.Sheen » Fri Jun 28, 2019 4:24 pm

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).
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Are Business Logic Events Triggered on XML Import

Postby Scott.Pearce » Fri Jun 28, 2019 5:14 pm

and don't forget there is always a DeserialiseEnd event thrown after the import completes.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221

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

Postby Mike.Sheen » Fri Jun 28, 2019 5:21 pm

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!
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Are Business Logic Events Triggered on XML Import

Postby Nina Tulic » Mon Jul 01, 2019 11:48 am

Thank you gentlemen much appreciated :)

Nina
Nina Tulic
Occasional Contributor
Occasional Contributor
 
Posts: 35
Joined: Fri Feb 14, 2014 11:03 am
Topics Solved: 0


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 3 guests