Hi all,

offcourse i have studied the concurrency tutorial :)

I have a major challenge and am not sure following the "best" solution. Basically i am trying to find the best solution to implement something like the Oracle Forms message "record changed by another user", which happens even when that other user has not yet committed the updates.

The case is as follows:

1 table with a lot of columns – far too much to fit on one panel

5 datasources based on views on that table with a subset of the columns – DS1, DS2, DS3, DS4 and DS5.

one panel for each datasource – so 5 panels – P1, P2, P3, P4 and P5

One record from the table can be updated on every panel. But each time it is about different columns.

Suppose this sequence of events:

1) The user queries records on P1 (based on DS1)

2) The user queries the same records on P2 (based on DS2)

3) The user updates one of the records on P1.

4) The user goes to P2 and tries to update the same record as in step 3 (but other columns).

I have setup the concurrency column for all datasources. So when the user tries to commit these updates, he will get the error from the formspider concurrency mechanism.

But this is not what i want ! Suppose someone updates many records on P1 thru P5 and after all that work he gets an error and has to do it all over again %$#$@&!*!%#.

Is the following method the best way to prevent this situation?

Step 1) Create a “valueChanged” event on P1 thru P5 to signal that the same data is being modified on another panel and immediately present a message "commit first".

Step 2) Create a commit procedure in such a way that in case of committing DS1, the DS2 thru DS5 are automatically requeried. Otherwise the concurrency columns will never contain the right values.

So, when DS1 is being updated, updates on DS2, DS3, DS4 and DS5 are being blocked and after a commit, these datasource are automatically queried again. After the query the user can do subsequent updates.

Or is there an easier way?

asked 04 Oct '16, 12:04

Jan%20Willem%20Vermeer's gravatar image

Jan Willem V...
1231331
accept rate: 0%


Hi Jan Willem,

I understand why you have five panels. But I don't understand why you have five datasources. Why don't you create one datasource with all the columns and bind the UI components in these five panels to the columns in this one datasource?

There is no rule that says each panel must have a separate datasource. :-)

Kind Regards,
Yalim

link

answered 05 Oct '16, 03:11

Yalim's gravatar image

Yalim ♦♦
2.8k5
accept rate: 22%

Hi Yalim,

Perhaps you are right. One of the requirements is that all panels must be queried independently. So for example one panel shows all records while the other only shows a subset (with an argument or a filter). I think that when i try one datasource, all panels must show the same records. Or not?

Kind regards, Jan Willem

link

answered 05 Oct '16, 03:34

Jan%20Willem%20Vermeer's gravatar image

Jan Willem V...
1231331
accept rate: 0%

Hi Jan Willem, Yes, in the scenario I described all panels would show the same records.

(06 Oct '16, 08:24) Yalim ♦♦

Hi Yalim,

i have decided to use another architecture in such a way i can use one datasource for all panels.

It sounds easier than it is, because the datasource has several detail datasources. Because there is now only one parent left, i have to fetch all details at once and offcourse that takes more time than fetching only the required details for a specific form. However, it's better to wait a second longer than to hit the error message "changed by another user" everytime.

When the application becomes too slow, I will try to track the opened forms so i know which details are visible and need to be queried.

Kind regards, Jan Willem

link

answered 06 Oct '16, 15:37

Jan%20Willem%20Vermeer's gravatar image

Jan Willem V...
1231331
accept rate: 0%

Cool. I am happy to hear the issue is resolved. This indeed seems like a challenging screen.

(12 Oct '16, 10:26) Yalim ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×4
×2

Asked: 04 Oct '16, 12:04

Seen: 2,781 times

Last updated: 12 Oct '16, 10:26


© Copyright Gerger 2017