Stale Endorsement Collection in API

Discussions related to custom development with Select.
Post Reply
joe.mag
Posts: 122
Joined: Thu Aug 04, 2011 3:11 pm

Stale Endorsement Collection in API

Post by joe.mag »

We have a custom package that, as part of its data collection processing, enumerates the Endorsements collection (IOrder.Title.Endorsement) on the active order. My users have complained that sometimes the package is referencing endorsements they've removed from the order (our template automatically inserts several endorsements when the order is created). Skeptical of this I added test code to the package that posts a note to the order's notes collection every few seconds with the count of endorsements.

What I find surprises me. For a newly created order the first note correctly states 2 endorsements are active (from the template). When I delete one of the endorsements (from the Endorsements screen, select an endorsement and press "-" and confirm deletion) the next note still reports 2 endorsements. Figuring I just need to Save I do so but still the notes state 2 endorsements are active. In fact I can do any number of actions and those two endorsements are "there." I even added some endorsements and the count reflects the actual live endorsements and the one "shadow" endorsement.

When I close the order and reopen it the endorsements collection is correct at load time and then tracks all changes in real-time. Adding, deleting are all seen in the collection immediately. It's as if a newly created file never reloads its cache from the database once it's been initialized. While we could remove all endorsements from our template to get around this our actual hope was to add more to the template to speed up processing (since some of these endorsements are very common and only once in a while need to be removed).

Can anyone confirm this behavior and/or offer a workaround that doesn't involve closing and opening the order?

TIA
Randy Mellow

Re: Stale Endorsement Collection in API

Post by Randy Mellow »

The behavior you describe is due to the business object cache not refreshing from the database. Unfortunately, at this time (i.e. in the current version), the only way to ensure the cache is in synch with the database (specifically with collection counts) is to close and re-open the order.
joe.mag
Posts: 122
Joined: Thu Aug 04, 2011 3:11 pm

Re: Stale Endorsement Collection in API

Post by joe.mag »

Thanks for the prompt response. Any hope for a patch to fix this?
Randy Mellow

Re: Stale Endorsement Collection in API

Post by Randy Mellow »

This behavior is changing for our next major release, v3.0. In that version, the memory structure will be synchronized such that, for example, all collections will maintain the current count of elements. Adding elements increases the count and removing elements decreases the count.
joe.mag
Posts: 122
Joined: Thu Aug 04, 2011 3:11 pm

Re: Stale Endorsement Collection in API

Post by joe.mag »

When will the new version be available?
Randy Mellow

Re: Stale Endorsement Collection in API

Post by Randy Mellow »

We plan to have a technical preview available by the end of June. If you'd like to be included you'll need to contact Melissa McBerkowitz, she'll have all that information.
Melissa McBerkowitz
Posts: 91
Joined: Wed Sep 10, 2008 3:33 pm
Location: Raleigh, NC
Contact:

Re: Stale Endorsement Collection in API

Post by Melissa McBerkowitz »

Update: We also plan to address this issue with our next service pack, SP11, tentatively planned for release in mid-to-late May. The service pack will address this by filtering the deleted endorsements out of the collection as it is presented through the API.
Melissa McBerkowitz
VP of Product Strategy, SoftPro
Melissa McBerkowitz
Posts: 91
Joined: Wed Sep 10, 2008 3:33 pm
Location: Raleigh, NC
Contact:

Re: Stale Endorsement Collection in API

Post by Melissa McBerkowitz »

Joe,
Just wanted to confirm that this issue has been resolved for Boylan SP11, which will be available on 6/8.

Thanks,
Melissa
Melissa McBerkowitz
VP of Product Strategy, SoftPro
Post Reply