Data broadcasting issue

I just noticed that after creating a record in a web client (thin client) solution, the data is not showing in the parallel (or same) smart client form.

When I perform a search on the web client for that new record, it shows. When I search in the smart client, it doesn’t. After restarting the smart client, then the record is there. It’s obvious then that the web client is actually committing the record in the database. I think that there is a problem with data broadcasting within Servoy.

A couple of things:

  1. I am using Servoy version 5.1.2 -build 959
  2. This happens only when creating a record within a form in a tables panel (related record)

Is this an issue with data broadcasting or there is something I should be doing that I am not?

JC

JC,

Please try Servoy 5.2, we have fixed a databroadcast issue in that release.

Rob

Excellent.

One more question. I am experiencing a problem with table events ‘afterRecordInsert()’ and ‘afterRecordUpdate()’. When a record is created (or updated) from a form in a tabless panel (as related table), the events are not fired.

In other words, when I create or update a record from the table outside the tabless panel, the events/global methods are triggered and the data is inserted in the database as expected. But, when I do the same in the form within the tabless panel, the events/global methods are NOT triggered – or at least the data is not inserted in the database.

My question is: can this be related to the data broadcasting issue in Servoy 5.1.2?

BTW, to make sure that the table events are fired, I use the ‘afterRecord’ instead of the ‘onRecord’ events. I just wanted to make sure that Servoy uses the in memory data instead of using a query in the database. Don’t know if this really matters.

Thanks, JC

JC,

That is not related, the issue was that sometimes events were fired before the transaction was committed so that triggered clients could read old data.

Your issue is more related to when data is stored, not to when events are fired.

Rob

rgansevles:
Your issue is more related to when data is stored, not to when events are fired.

Should I create a new topic? There is definitely an issue when creating or updating a record in a panel (as related table). The events are not fired or for some other reason the data is not stored in the database.

JC,

Try and create a very small sample.
If you think there is a bug in Servoy, file a case with it.

If you change/create related data and call databaseManager.saveData() the records should save and the events should fire.

Rob

I’ll do!

Hi

Since we updated from Servoy 5.2.13 to 5.2.16 I find the problem again, that afterRecordUpdate uses old values. In the form I call databaseManager.saveData(record). This triggers the event. But whatever is calculated by this, uses the old values. I checked in Servoy 7: Same issue.

Help is very welcome. We appreciate table events to guarantee correct behaviour all over the app.

Regards
Birgit

Hi Birgit,

Have you filed this as an issue in the tracker? This very much sounds like a bug.

Hi Robert

No, I haven’t so far. We just finished dubugging, and I hoped, someone could confirm the behaviour.

Thanks and best regards
Birgit