Passing and id back from the persistence API

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Passing and id back from the persistence API

bwallis42

When I save a form edited from the url:

http://localhost:8080/orbeon/fr/cpf/fredd/new?patientId=IHN:123401§ionId=Correspondence&documentCode=EHF1001

it is saved via my persistence layer that is called via the following URL.

http://localhost/persistence/cpf/crud/cpf/fredd/data/028c7848c128e3cd4a53f84ce2f91af67b425238/data.xml

When I want to view or edit that form, I use a different ID, so, for example, view would be:

http://localhost:8080/orbeon/fr/cpf/fredd/view/2015060417

This other ID is our system's unique document identifier. My persistence layer search functions return our IDs so when you list the documents the IDs returned are our IDs.

This is all OK except in the case where we save a form and want to redirect to the view or edit URL after saving. At this point orbeon does not know about our new ID and we don't know (anymore) about the orbeon generated ID.

My persistence api does return our unique ID when the form is PUT'd as a little bit of XML

<DocumentInfo>
  <masterId>2015060417</masterId>
  <versionId>2</versionId>
</DocumentInfo>

Is there anyway I can get access to these values from the XPL that implements the save button process? If so then I might be able to redirect to the view form page using 'navigate' and using our form identifier instead of the orbeon generated one.

thanks
brian...