Orbeon form how to redirect to a mobile app link after successful submission?

Viewed 23

I'm trying to set up a submission button to redirect to my mobile app on successful submission. The mobile app URI looks something like my-app://

I tested the URI on an IOS simulator in Safari and it opens the app correctly, but when I submit an Orbeon form I'm redirected to the default Orbeon admin view (the one that shows all the form instances). So I assume the redirect failed or the URI wasn't able to be read by Orbeon.

Here's what the property looks like:

<property as="xs:string" name="oxf.fr.detail.process.close.*.*"> 
     relinquish-lease                                                         
     then navigate(uri = "{xxf:evaluate(xxf:property('props.services-url'))}")
     recover summary
</property>

Where props.services-url is set like so:

<property as="xs:string" name="props.services-url">
     if (xxf:get-request-parameter('Portal') = 'Web') then 'https://some-website.com'
     else if (xxf:get-request-parameter('Portal') = 'Mobile') then 'my-app://'
     else ''
</property>

Any help is appreciated, thanks.

1 Answers

I suspect that what you described as "default Orbeon admin view (the one that shows all the form instances)" is what in Orbeon Forms is called the summary page.

<property as="xs:string" name="oxf.fr.detail.process.close.*.*">
    relinquish-lease
    then navigate(uri = "{xxf:evaluate(xxf:property('props.services-url'))}")
    recover summary
</property>

Based on the code of your close process quoted above, the summary page is loaded if relinquish-lease fails. Is it possible that this is what happens in your case? What if you change the code for this process to just do the following, also hardcoding the URL for simplicity:

<property as="xs:string" name="oxf.fr.detail.process.close.*.*">
    navigate(uri = "my-app://")
</property>
Related