In proprties-local.xml I have defined persistence layer:
<property
as="xs:string"
name="oxf.fr.persistence.provider.*.*.*"
value="MsSqlPersistance"/>
<property
as="xs:anyURI"
name="oxf.fr.persistence.MsSqlPersistance.uri"
value="http://10.7.3.63:8080/MsSqlPersistenceLayerImpl"/>
So now, everytime I click on save or send button, there is HTTP PUT request sent to my MsSqlPersistenceLayerImpl REST service.
Also there is
<property as="xs:anyURI" name="oxf.fr.detail.send.success.uri.*.*"
value="http://10.7.3.63:8080/orb_submit/orbSubmit"/>
<!-- HTTP method to use to navigate to the success page -->
<property as="xs:string" name="oxf.fr.detail.send.success.method.*.*" value="post" replace="all"/>
As I understand, after clicking on Send button there is a HTTP PUT request send to my MsSqlPersistenceLayerImpl component and after success, there is another POST request send to orb_submit service.
Now, I would like after clicking Send button (workflow-send), not to send any HTTP PUT requests to my MsSqlPersistenceLayerImpl service, I want only to call (after form validation) orb_submit service. Is it possible?
UPDATE
Customizing buttons seems really hard for me. Normally, after clicking save my form is saved in database and the success message is shown - it's default behaviour. But when I put this code
<property as="xs:string" name="oxf.fr.detail.process.save-draft.*.*">
save
then success-message("save-draft-success")
recover error-message("database-error")
</property>
into properties-local.xml after clicking save nothing happens (no save, no message;I'd excepct still normal behaviour of course). Morover, trying to customize workflow-send in the same way, it has no affect at all. Am I missing something?
Inline properties were not supported in 4.5. Try instead:
<property
as="xs:string"
name="oxf.fr.detail.process.save-draft.*.*"
value='
save
then success-message("save-draft-success")
recover error-message("database-error")'
/>
Related
I'm currently using Orbeon 2019.2 CE version
I'm trying to configure header-driven method for access control without using Liferay or default Login/Logout form in Orbeon.
I have already set these properties in properties-dev.xml
I'm have 2 roles (form-builder, form-viewer) sending via My-Roles-Header.
<property as="xs:string" name="oxf.fr.authentication.method" value="header"/>
<property as="xs:boolean" name="oxf.fr.authentication.header.sticky" value="true"/>
<property as="xs:string" name="oxf.fr.authentication.header.username" value="My-Username-Header"/>
<property as="xs:string" name="oxf.fr.authentication.header.group" value="My-Group-Header"/>
<property as="xs:string" name="oxf.fr.authentication.header.roles.split" value="(\s*[,\|]\s*)+"/>
<property as="xs:string" name="oxf.fr.authentication.header.roles" value="My-Roles-Header"/>
<property as="xs:string" name="oxf.xforms.forward-submission-headers" value="My-Username-Header My-Group-Header My-Roles-Header"/>
<property as="xs:string" name="oxf.http.forward-headers" value="My-Username-Header My-Group-Header My-Roles-Header"/>
However, I'm still able to access form builder and form runner without sending My-Username-Header My-Group-Header My-Roles-Header headers. It should redirect me to 403 page
Form Runner: the default is that each individual form must have permissions enabled or the form will be public. Make sure that "Enable permission for this form" is selected in Form Builder (doc).
Form Builder: see Form Builder permissions.
I configured a custom button that sends Orbeon data to a service. After the send is complete, I would like it to execute a JavaScript function.
Use the navigate action:
<property as="xs:string" name="oxf.fr.detail.process.send-to-myservice.*.*">
save
then send(uri="http://localhost:8080/myservice")
then success-message(message="Save Successful")
then navigate(uri="javascript:myFunction()")
recover error-message(message="Save Failed")
</property>
<property as="xs:string" name="oxf.fr.resource.*.*.en.buttons.send-to-myservice" value="Save"/>
Is it still possible to send custom headers to a customized CRUD interface?
I tried all of these with no success: According to logging non of these headers is passed to the interface when opening a form.
<property as="xs:string" name="oxf.http.forward-headers" value="Orbeon-Client Cookie"/>
<property as="xs:string" name="oxf.http.forward-headers.private" value="Orbeon-Client Cookie"/>
<property as="xs:string" name="oxf.xforms.forward-submission-headers" value="Orbeon-Client Cookie"/>
<property as="xs:string" name="oxf.http.forward-cookies" value="JSESSIONID MYSAPSSO2 ReferenceCode"/>
<property as="xs:string" name="oxf.http.forward-cookies.private" value="JSESSIONID MYSAPSSO2 ReferenceCode"/>
They found the issue and fixed it: https://github.com/orbeon/orbeon-forms/issues/2053
I am also working on trying to solve this problem without avail.
(FYI, we are upgrading from 4.5 to 4.8 right now in our test environment and ran into the issue that specified cookies asked to be forwarded in properties-local.xml are do not seem to be honored in the persistence layer).
A few posts I have seen as we are trying to fix this....
http://discuss.orbeon.com/Secure-persistence-API-access-td4659372.html
^ This post seems to indicate that it is broken(?) in 4.8 and will be added back to 4.9?
(Looking at the code for FormRunnerPersistenceProxy.scala doesn't seem to indicate this thou?)
http://discuss.orbeon.com/oxf-http-forward-cookies-issue-in-case-of-invalid-JSESSIONID-td4658705.html
^ Different but similar issue
I am working on Orbeon 4.5 forms.
While I try to open the form with a random documentid such as:
http://localhost:8080/orbeon/fr/AppName/formName/edit/randomDocumentId
I am getting "Orbeon form not found" error. I think it's influenced by the document_id.
If my understanding is correct, both the above link and:
http://localhost:8080/orbeon/fr/AppName/formName/edit
should give me the same result.
And I noticed Its working fine in 4.4 with same property file.
Below is my properties-local.xml
<properties xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:oxf="http://www.orbeon.com/oxf/processors">
<property as="xs:anyURI" name="oxf.fr.persistence.mysql.uri" value="/fr/service/mysql"/>
<property as="xs:string" name="oxf.fr.persistence.mysql.datasource" value="orbeonDS"/>
<property as="xs:string" name="oxf.fr.persistence.provider.*.*.*" value="mysql"/>
<property as="xs:string" name="oxf.fr.detail.buttons.app1.*" value="close clear pdf email workflow-send"/>
</properties>
Being a newbie to Orbeon web forms so I am not sure whether I missed any configuration to get this corrected in 4.5
Any inputs to resolve this issue is greatly appreciated.
URLs that look like:
http://localhost:8080/orbeon/fr/AppName/formName/edit/documentId
are meant to load form data with id documentId from the database. If there is no data with that id in the database, it is the correct behavior to get a "page not found" error.
Similarly, you should never be able to access:
http://localhost:8080/orbeon/fr/AppName/formName/edit
without a document id. It is also correct to get a "page not found" error.
To open a form definition without existing data, use instead:
http://localhost:8080/orbeon/fr/AppName/formName/new
Currently, I'm trying to integrate in Liferay one Orbeon form which retrieves the user name.
(I described the problem here: http://discuss.orbeon.com/Unable-to-retrieve-liferay-roles-in-Orbeon-proxy-portlet-td4656273.html - Post 2 )
To do this, I created a simple form with one input field and I want to get the Liferay user name in this field. I tested with all configurations in lower case (Unable to retrieve Header information on Orbeon 4.0.1 but works on 3.9) and nothing is returned.
First: I completed properties-local.xml using http://wiki.orbeon.com/forms/doc/developer-guide/admin/deployment-portlet and I put all properties in lower case.
properties-local.xml :
<!-- this is the property for orbeon forms 4.0 -->
<property as="xs:anyuri" name="oxf.fr.persistence.exist.exist-uri"
value="http://orbeonserver:8080/orbeon/exist/rest/db/orbeon/fr"/>
<!-- configure authentication properties through headers -->
<property as="xs:string" name="oxf.fr.authentication.method"
value="header"/>
<!-- if you want the liferay user email used for form runner authentication -->
<property as="xs:string" name="oxf.fr.authentication.header.username"
value="orbeon-liferay-user-email"/>
<!-- if you want liferay roles used -->
<property as="xs:string" name="oxf.fr.authentication.header.roles"
value="orbeon-liferay-user-roles"/>
<!-- to propagate username/roles to the persistence layer, if using authentication -->
<property as="xs:string" name="oxf.xforms.forward-submission-headers"
value="orbeon-username orbeon-roles"/>
After in my form, I used xxf:get-request-header() to get the Liferay user name :
<xf:bind id="userName-bind" name="userName" ref="userName"
xxf:default="xxf:get-request-header('orbeon-liferay-user-email')"/>
Finally to insert the form in Liferay, I used the orbeon proxy-portlet.war (no configuration in this side).
I see the form but field is still empty. Nothing is returned. I missed a step ?
FYI, I used: liferay-portal-6.1.1-ce-ga2 and orbeon-4.0.1.201303152357-PE (free trial license). Orbeon and Liferay are on 2 different server.
You might want to try a very recent version of Orbeon proxy portlet (4.1-ce from github), since the following issue got closed only a month ago:
https://github.com/orbeon/orbeon-forms/issues/886 "Proxy portlet: ability to configure forwarding of headers and parameters". Accordingly, the 4.01 version of Orbeon proxy portlet lacks this ability.