Orbeon: success uri configuration - orbeon

I want to set success uri to Another Orbeon form.
Example:
After clicking on Workflow send Button, it should redirects to new Orbeon form
I have tried with
<property as="xs:anyURI" name="oxf.fr.detail.send.success.uri.*.*"
value="/fr/MY-app-name/My-form-name/new"/>
It seems it is calling this page after clicking send button, but it is Not showing any control of this form
I have also set this property:
<property
as="xs:boolean"
name="oxf.fr.detail.send.success.prune.*.*"
value="false"/>

Related

Custom Home button in Orbeon Form Builder Summary page

I have a task to change the behavior of 'Home' button in Form Builder Summary page.
When user click home button, it will navigate to the website that I want (example here: https://google.com)
Ref: https://doc.orbeon.com/configuration/properties/form-builder#action-buttons-on-the-form-builder-summary-page
I tried this code below but it didn't work. It still back to Form Runner Summary page.
*properties-local.xml
<property as="xs:string" name="oxf.fr.summary.process.home.orbeon.builder">
navigate(uri = "https://google.com")
</property>
Currently that URL is not configurable. The only thing you can do is omit the Home button.
It would be nice to able to do that and I added RFE #5214.

Orbeon Form - Is there anyway to disallow download attachment by default?

I found a useful document about it: https://doc.orbeon.com/form-runner/component/attachment
Therefore I did a similar approach, I added this line in properties-local.xml:
<property as="xs:string" name="oxg.xforms.xbl.fr.attachment.allow-download" value="false"/>
but it doesn't work. When I created Form Builder and added attachment, the setting still marked allow download.
I think that you just have a typo. Try the following (with the property name starting with oxf instead of org). I've tried this locally and it is working for me.
<property
as="xs:string"
name="oxf.xforms.xbl.fr.attachment.allow-download"
value="false"/>

How to set a form readonly (how to avoid the stay - leave popup)

We have the requirement that users, after terminating the input of a form, can only see the data; only authorized users can modify the data, see question
intermediate save and readonly after termination.
The first idea was to use the permission: owner can read the data.
This works smootly : afer saving, in the summary page the form is marked as readonly.
But there was also the requirement: users must be able to interrupt the input of the form and resume it later.
So in the permissions we had to set that the owner can read and update the data, and we use a field of the form to set the section to readonly.
The save-final button sets this field.
We have renamed this button to FINISH, and the save-draft button to intermediate save.
Clicking save-final also makes invisible the save buttons, so the user after clicking this button cannot change anymore the data.
Before clicking FINISH:
After clicking FINISH:
Selecting the form in the summary page and choosing review works smootly: the form is opened in view mode.
But clicking in the created or modified field opens the form in edit. And although all form fields are readonly, clicking at the summary button a window "Leave page Stay on page" is shown. I suppose, because of the vars of the database service the form results as a modified page.
After clicking leave Page, in the summary page a new draft form is shown. This draft form only an Administrator can delete. Because the user haven't the permission to delete.
So the question is:
is there a possibility to set the form read-only when the user clicks the FINISH button? So that in the summary page the form is marked as read only?
Or as another option: is there a possibility to disable the columns Created and Modified" in the summary page, so that only the first column in the summary page is clickable?
Link to the test code
Many thanks
I found as a possibility:
Inhibit the edit in the summary page
add an edit button to the detail page and associate it with the edit
action
Change the description of the Review button to Review/Edit
to 1) I inserted in the custom summary css the lines:
.orbeon .fr-summary-table-div td a,
.orbeon .fr-summary-table-div th a {
pointer-events: none;
}
to 2) Lines added in the properties-local.xml:
Add an edit button to the buttons of the detail page
<property as="xs:string" name="oxf.fr.detail.buttons.view.*.*" value="summary edit pdf"/>
Add the edit process to the edit button
<property as="xs:string" name="oxf.fr.detail.process.edit.apptest.*" value="edit"/>
Add descriptions to the edit key
<property as="xs:string" name="oxf.fr.resource.apptest.*.en.buttons.edit" value="EDIT"/>
<property as="xs:string" name="oxf.fr.resource.apptest.*.de.buttons.edit" value="Ă„ndern"/>
<property as="xs:string" name="oxf.fr.resource.apptest.*.it.buttons.edit" value="Aggiorna"/>
Show the edit button only if the input phase isn't terminated
<property as="xs:string" name="oxf.fr.detail.button.edit.visible.apptest.*">
//datenOK = false()
</property>
Summary page with review/edit button
Detail page with edit button (because the input phase isn't yet terminated)
Detail page without edit button (the input phase is already terminated)
In the test code was the action: Run action when the form loads
I changed the action in Run action when the control appears or changes its value
and now the popup page: stay on page - leave page appears anymore.

Trying to get form data as XML via REST API

It should be a simple thing and it probably is, but I'm not achieving to get the XML data of a draft form via the REST API described in the Orbeon docs.
I did the following changes to the properties-local-dev.xml file:
<property
as="xs:string"
processor-name="oxf:page-flow"
name="page-public-methods"
value="GET HEAD POST"/>
<property
as="xs:string"
processor-name="oxf:page-flow"
name="service-public-methods"
value="GET HEAD"/>
<property
as="xs:anyURI"
name="oxf.fr.persistence.exist.exist-uri"
value="/exist/rest/db/orbeon/fr"/>
<page public-methods="GET HEAD POST" view="view.xpl"/>
<service public-methods="GET HEAD" view="view.xpl"/>
Then I tried different URL's to call the data:
http://localhost:9090/orbeon/exist/rest/db/orbeon/fr/gsmn/hello-world/draft/f025a471b2c8452dd65267cc5886063d995757f5/data.xml
http://localhost:9090/orbeon/crud/gsmn/hello-world/draft/f025a471b2c8452dd65267cc5886063d995757f5/data.xml
http://localhost:9090/orbeon/fr/service/persistence/crud/gsmn/hello-world/draft/f025a471b2c8452dd65267cc5886063d995757f5/data.xml
Form Runner resides on :
http://localhost:9090/orbeon/fr/
Is there something obvious I'm missing?
Thanks
Noel
Assuming your app name is gsmn and your form name is hello-world, then the last URL you mentioned (copied below for clarity), should work.
http://localhost:9090/orbeon/fr/service/persistence/crud/gsmn/hello-world/draft/92aad35a44876b3bfac3b4d6f835130fbd1fe19e/data.xml
However, most likely, the issue is that you're trying this with eXist, and that, as of this writing, the autosave functionality isn't supported by Orbeon Forms on eXist; it is only supported on relational databases. For more on this, see the support matrix for different databases, and the RFE to add support for autosave on eXist.

Orbeon - Email Properties

I want to sent the document id of orbeon form to my email body, therefore I added the following property in my properties-local.xml file
<property as="xs:string" name="oxf.fr.resource.*.*.en.email.body" value="{xxf:document-id()}"/> but this will just display {xxf:document-id()} in my email body, need help please.....
This is not a feature yet. There is an RFE for it.

Resources