How to prevent multiple users from having concurrent access to a form instance ?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to prevent multiple users from having concurrent access to a form instance ?

James Newcombe
I have a form that has many instances - lots of filled-in copies of the form. There are also multiple users in each role, and role-based security is implemented.

I'm having a problem where two or more users in the same role can access the same instance of a form, and both users are able simultaneously to edit the form instance, which causes an issue when they also both save their copy of the form.

I want to have any user with the correct role access the form, but only one user in any role able to open the form for editing; I don't care if multiple users can simultaneously open the form to read it.

Singleton forms as implemented in Orbeon Server v4.8 doesn't seem to be the correct answer, yet this feels like a problem that would have been solved before. Can anyone give me some pointers please ?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent multiple users from having concurrent access to a form instance ?

Alessandro  Vernet
Administrator
Hi James,

This is something for which we have no support at the moment. Taking an optimistic approach to concurrent modifications, we could imagine:

- Upon opening a form, if someone else is editing the same piece of data, warn the user, telling her that should she decide to go ahead a "collision" might happen.
- If she decide to go ahead, warn the other user someone decided to edit the data at the same time he did.
- When saving, if the data has changed since it was loaded, warn the user she might overwrite changes done by someone else.

If the above was implemented, even a subset thereof, would that be good for the use case you have in mind?

As a placeholder, for now we have this RFE:

Alex

On Sun, Jun 21, 2015 at 2:09 PM, James Newcombe <[hidden email]> wrote:
I have a form that has many instances - lots of filled-in copies of the form.
There are also multiple users in each role, and role-based security is
implemented.

I'm having a problem where two or more users in the same role can access the
same instance of a form, and both users are able simultaneously to edit the
form instance, which causes an issue when they also both save their copy of
the form.

I want to have any user with the correct role access the form, but only one
user in any role able to open the form for editing; I don't care if multiple
users can simultaneously open the form to read it.

Singleton forms as implemented in Orbeon Server v4.8 doesn't seem to be the
correct answer, yet this feels like a problem that would have been solved
before. Can anyone give me some pointers please ?

Thanks.

--
View this message in context: http://discuss.orbeon.com/How-to-prevent-multiple-users-from-having-concurrent-access-to-a-form-instance-tp4660113.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: How to prevent multiple users from having concurrent access to a form instance ?

James Newcombe

Hi Alex,

 

I thought that might be the case. I get the impression that our solution is a relatively unusual use of your product.

 

Your approach sounds reasonable, although it’s probably a little more sophisticated than I was looking for. For our use case, we simply want to forbid a second user from opening the form if someone is already editing it, with a ‘go away’ message to the user attempting to open the form. Your solution assumes that users are intelligent and considerate, and I think my experience would lead me to a somewhat more proscriptive approach. I also need the solution fairly quickly, so I suspect I’ll have to engineer it myself.

 

I think that the simplest thing to do is to build a database table that records a lock for each form that is opened, and releases the lock when it is closed. I’d assume I’d be able to modify the behaviour of the ‘open form’ code and the behaviour of the ‘save’ and ‘submit’ buttons to do that. Can you tell me which source files I’d need to look at to find the code that opens the form and that handles the ‘save’ and ‘submit’ buttons ?

 

Thanks,

James.

 

From: Alessandro Vernet [via Orbeon Forms community mailing list] [mailto:ml-node+[hidden email]]
Sent: 24 June 2015 00:16
To: Newcombe, James
Subject: Re: How to prevent multiple users from having concurrent access to a form instance ?

 

Hi James,

 

This is something for which we have no support at the moment. Taking an optimistic approach to concurrent modifications, we could imagine:

 

- Upon opening a form, if someone else is editing the same piece of data, warn the user, telling her that should she decide to go ahead a "collision" might happen.

- If she decide to go ahead, warn the other user someone decided to edit the data at the same time he did.

- When saving, if the data has changed since it was loaded, warn the user she might overwrite changes done by someone else.

 

If the above was implemented, even a subset thereof, would that be good for the use case you have in mind?

 

As a placeholder, for now we have this RFE:

 

Alex

 

On Sun, Jun 21, 2015 at 2:09 PM, James Newcombe <[hidden email]> wrote:

I have a form that has many instances - lots of filled-in copies of the form.
There are also multiple users in each role, and role-based security is
implemented.

I'm having a problem where two or more users in the same role can access the
same instance of a form, and both users are able simultaneously to edit the
form instance, which causes an issue when they also both save their copy of
the form.

I want to have any user with the correct role access the form, but only one
user in any role able to open the form for editing; I don't care if multiple
users can simultaneously open the form to read it.

Singleton forms as implemented in Orbeon Server v4.8 doesn't seem to be the
correct answer, yet this feels like a problem that would have been solved
before. Can anyone give me some pointers please ?

Thanks.

--
View this message in context: http://discuss.orbeon.com/How-to-prevent-multiple-users-from-having-concurrent-access-to-a-form-instance-tp4660113.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

 

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet

 


To unsubscribe from How to prevent multiple users from having concurrent access to a form instance ?, click here.
NAML




Capgemini is a trading name used by the Capgemini Group of companies which includes Capgemini UK plc, a company registered in England and Wales (number 943935) whose registered office is at No. 1, Forge End, Woking, Surrey, GU21 6DB.
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
Reply | Threaded
Open this post in threaded view
|

RE: How to prevent multiple users from having concurrent access to a form instance ?

Alessandro  Vernet
Administrator
Hi James,

Yes, what you suggest is sometimes referred as a "pessimistic" approach, in that it completely stops users before they get a chance to get into a situation where they overwrite someone else's data.

However it isn't that simple as you need to decide when to release the lock on the form, and you can easily get into situations where you keep the data locked for too long or not long enough. Specifically, what does it mean to close a form? What if a user keeps it open in a tab for a while? You know the user won't be able to interact with it when her session expires, but you might not want to keep the lock for that long. You could rely on "pings" through Ajax the page does to the server from time to time; if the server doesn't get a ping a little while, it is most likely that the tab was closed. Let's say: send a ping every minute, and release the lock if you don't get any ping for 5 minutes. But what if, instead, the user closed the lid of her laptop and reopens it 10 minutes later? At that point, you'll want to re-acquire the lock, and if somebody already has the lock, block the user from editing the data. This is interesting, but not entirely trivial to implement well ;).

Alex

On Wed, Jun 24, 2015 at 1:19 AM, James Newcombe <[hidden email]> wrote:

Hi Alex,

 

I thought that might be the case. I get the impression that our solution is a relatively unusual use of your product.

 

Your approach sounds reasonable, although it’s probably a little more sophisticated than I was looking for. For our use case, we simply want to forbid a second user from opening the form if someone is already editing it, with a ‘go away’ message to the user attempting to open the form. Your solution assumes that users are intelligent and considerate, and I think my experience would lead me to a somewhat more proscriptive approach. I also need the solution fairly quickly, so I suspect I’ll have to engineer it myself.

 

I think that the simplest thing to do is to build a database table that records a lock for each form that is opened, and releases the lock when it is closed. I’d assume I’d be able to modify the behaviour of the ‘open form’ code and the behaviour of the ‘save’ and ‘submit’ buttons to do that. Can you tell me which source files I’d need to look at to find the code that opens the form and that handles the ‘save’ and ‘submit’ buttons ?

 

Thanks,

James.

 

From: Alessandro Vernet [via Orbeon Forms community mailing list] [mailto:[hidden email][hidden email]]
Sent: 24 June 2015 00:16
To: Newcombe, James
Subject: Re: How to prevent multiple users from having concurrent access to a form instance ?

 

Hi James,

 

This is something for which we have no support at the moment. Taking an optimistic approach to concurrent modifications, we could imagine:

 

- Upon opening a form, if someone else is editing the same piece of data, warn the user, telling her that should she decide to go ahead a "collision" might happen.

- If she decide to go ahead, warn the other user someone decided to edit the data at the same time he did.

- When saving, if the data has changed since it was loaded, warn the user she might overwrite changes done by someone else.

 

If the above was implemented, even a subset thereof, would that be good for the use case you have in mind?

 

As a placeholder, for now we have this RFE:

 

Alex

 

On Sun, Jun 21, 2015 at 2:09 PM, James Newcombe <[hidden email]> wrote:

I have a form that has many instances - lots of filled-in copies of the form.
There are also multiple users in each role, and role-based security is
implemented.

I'm having a problem where two or more users in the same role can access the
same instance of a form, and both users are able simultaneously to edit the
form instance, which causes an issue when they also both save their copy of
the form.

I want to have any user with the correct role access the form, but only one
user in any role able to open the form for editing; I don't care if multiple
users can simultaneously open the form to read it.

Singleton forms as implemented in Orbeon Server v4.8 doesn't seem to be the
correct answer, yet this feels like a problem that would have been solved
before. Can anyone give me some pointers please ?

Thanks.

--
View this message in context: http://discuss.orbeon.com/How-to-prevent-multiple-users-from-having-concurrent-access-to-a-form-instance-tp4660113.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

 

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet

 


To unsubscribe from How to prevent multiple users from having concurrent access to a form instance ?, click here.
NAML




Capgemini is a trading name used by the Capgemini Group of companies which includes Capgemini UK plc, a company registered in England and Wales (number 943935) whose registered office is at No. 1, Forge End, Woking, Surrey, GU21 6DB.
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

View this message in context: RE: How to prevent multiple users from having concurrent access to a form instance ?

Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: How to prevent multiple users from having concurrent access to a form instance ?

Erik Bruchez
Administrator
And I noticed we have a different RFE for this as well:

    https://github.com/orbeon/orbeon-forms/issues/1067

Since that one has more details, I closed #1332 as duplicate.

-Erik