10
Views
6
Comments
Few/whole records is missing when passing from Block Event to Screen handler

Hi,

I have a scenario, where we are using the common UI block for mobile and Web application. 

We are happing form and input field and passing the value from input to screen using a event . Following are the below observations, when passing the records from Block to Screen.

  1. Out of 100, we 5-10 times records is not getting passed to screen handler what ever we are passing from block input. This is not a consistent behaviour, it is happening random.
  2. From block we are passing the value in key-value pair (e.g 'FirstName':'Dileep' )into the input of the screen and getting into screen using handler and then storing to database table.
  3. Sometimes out of 10 records 2-3 records are missing which is not coming into the screen handler and sometimes all the records from particular block are missing which is passed from block to screen.
  4. It is not reproducible  in DEV and UAT Environment, its directly coming in Prod environment with few case (almost-4-5%).

Can you please give me a clue where I am wrong, it will help me to resolve this type of scenarios issues.

Thanks,

Dileep Verma

mvp_badge
MVP
Rank: #17

Hi Dileep,

The new revamped OutSystems forum allows you to select also the application type (mobile, TWA, RWA) that you are using, for the question you ask. Many times the solution to a problem depends on that. Please next time select the application time when you post a question, so we don't have to ask now what application type are you developing: mobile, TWA, RWA.

My experience with RWA, is that if you have heavy logic client site and db data changes, and users quickly enter and navigate from input field to input field, you can get issues with the fact that event handlers are processed asynchronically. The fact that you cannot reproduce this in DEV and UAT could be just that your users in PROD enter the data differently (faster?) than you. 

Are you sure the events are not fired, how did you conclude that? By the fact the data changes did not happen, or did you actually debug or trace that the events did not happen? 

Regards,

Daniel


Rank: #686

Hi Daniel, thanks for the quick reply.

Next time I will select Application type also while posting Question.

Yes I am using RWA. where single web block is used for both and mobile.

Answering to your questions, there are below observations

1- We tried to debug in UAT and Dev environment, every time event get fired and we got all the records on Screen Handler, so we don't really know the event is getting fired or not in case missing data.

2- But Some scenario, only few records are missing, that means if event is having 10 records as input (in key-value) only 8 is coming  to screen handler, 2 got missed somewhere.

3- Yes we are passing more than 20 records (in key-value pair), sometimes more than 50 records as a event input.

4- The flow is as below:

From UI block-> Mapping all input value to key and assign the input value enter by user in block-> assign the whole records to Event Input-> Screen Event handler-> get the all the records and loop it and store to DB table one by one ( FirstName, Lastname, Occupation etc).

Hope it will give you more idea about the scenario.


Regards,

Dileep Verma


mvp_badge
MVP
Rank: #17

Did you confirm already that the missing data is not due to data quality issue like a text to long for entity attribute? 

Without looking at the code its kinda hard to come up with possible reasons why this happens.

What you could do is, try and log in the block the data that you pass to the parent block/screen.

And also log what you receive in the parent block/screen. Thereby you can identify the data that is not passed to the parent block/screen. Maybe that will give you a clue why the data is not passed/processed.

Rank: #686

Sure Daniel, will try to put some log to get better idea in block where we are passing data and handler where we are receiving.

Many thanks,

Dileep

Rank: #245

Since you are using the block for mobile and web my guess would be this is a sync problem.

What patterns did you use for offline data sync in your mobile app?

Rank: #686

Hi Stefano, Its not related to Sync, its happening in web application, where there is no sync logic, we are directly storing data from coming from block event to server database entity in Web Screen handler, no sync logic applied.


Thanks

Dileep