Orbeon persistence API - telling if a GET is for view or edit?

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

Orbeon persistence API - telling if a GET is for view or edit?

bwallis42
Is there any way I can tell when my persistence API receives a GET request such as

GET /persistence/cpf/crud/CPF/adv-care-plan-disc-record/data/201602244/data.xml

if this request was for a user viewing a form or opening the form for an edit? There don't seem to be any differences between the two requests that I am seeing, the headers are all the same.

I want to be able to tell if two users are trying to edit the same form at the same time. I can see that there are two get requests but one or both might just be to view the form. The problem I have is that if two users edit a form and both do a save, the second save will overwrite the first and I currently have no way to detect that this has happened. I don't want to implement a pessimistic lock on edits but I don't see how I can do an optimistic lock either.

Ideas?

thanks
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon persistence API - telling if a GET is for view or edit?

bruno.buzzi
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon persistence API - telling if a GET is for view or edit?

Alessandro  Vernet
Administrator
In reply to this post by bwallis42
Hi Brian,

Adding to what Bruno mentioned, I don't think you can do this in your implementation of the persistence API alone. We have some more thoughts about this in this RFE:

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

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