Bug in Orbeon's Alfesco Integration when sending PDF of form with non-visible control

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

Bug in Orbeon's Alfesco Integration when sending PDF of form with non-visible control

Lyle Sidor
If Orbeon Forms Runner is configured to send a PDF version of the form to Alfresco, it will fail to send anything if the form contains a control which is required and non-empty even if the control is not visible in the form.

It would seem that Orbeon performs some validity check of all the fields, even the non-visible ones, prior to generating the PDF version of the form in preparation for sending the form to Alfresco. If Orbeon is not configured to send the PDF version of the form, this check is not performed and the XML version will be successfully stored in Alfresco.

The correct behavior of ignoring the validity of non-visible fields is observed when filling out the form, as indicated by the "Save" and "PDF" buttons being activated or deactivated regardless of the validity of non-visible fields.
Reply | Threaded
Open this post in threaded view
|

Re: Bug in Orbeon's Alfesco Integration when sending PDF of form with non-visible control

Erik Bruchez
Administrator
I think you are right that the behavior can change if the PDF is
generated. See this line:

https://github.com/orbeon/orbeon-forms/blob/master/src/resources/apps/fr/includes/persistence/persistence-model.xml#L559

The fr-pdf-service-submission runs if the PDF is sent to Alfresco, and
if PDF generation fails, the rest of the process is interrupted.

Now the question is why the PDF submission would fail, as it has
relevant="false" and validate="false", which means it should not check
validity and relevance!

-Erik

On Wed, Oct 12, 2011 at 4:05 PM, lylesidor <[hidden email]> wrote:

> If Orbeon Forms Runner is configured to send a PDF version of the form to
> Alfresco, it will fail to send anything if the form contains a control which
> is required and non-empty even if the control is not visible in the form.
>
> It would seem that Orbeon performs some validity check of all the fields,
> even the non-visible ones, prior to generating the PDF version of the form
> in preparation for sending the form to Alfresco. If Orbeon is not configured
> to send the PDF version of the form, this check is not performed and the XML
> version will be successfully stored in Alfresco.
>
> The correct behavior of ignoring the validity of non-visible fields is
> observed when filling out the form, as indicated by the "Save" and "PDF"
> buttons being activated or deactivated regardless of the validity of
> non-visible fields.
>
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Bug-in-Orbeon-s-Alfesco-Integration-when-sending-PDF-of-form-with-non-visible-control-tp3900025p3900025.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Bug in Orbeon's Alfesco Integration when sending PDF of form with non-visible control

Lyle Sidor
I don't understand the code well enough to figure out why fr-pdf-service-submission seems to be ignoring the validate="false" attribute. My guess would be that it's failing validation when the XML data is being merged with the XML form.

The wiki has some info on advanced submissions that may be relevant. Could it be that fr-pdf-service-submission also needs an xxforms:calculate="false" attribute to be set?

The bug is easy to reproduce if Orbeon is already configured to send the PDF and XML to Alfresco:
1) Create a new form.
2) Copy and paste the control which was automatically created in the new form.
3) Set the copied field to be required and invisible.
4) Add "Send" and "PDF" buttons to the bottom of the source code after the </fr:body> tag:
            <fr:buttons>
                <fr:workflow-send-button/>
                <fr:pdf-button/>
                <fr:save-button/>
                <fr:close-button/>
            </fr:buttons>
5) Save and publish the form.

The interactive form and the PDF button behave as expected, ignoring the invisible required field. Pressing the Send button results in nothing being sent to Alfresco. If the form is changed so that the field is no longer required, the PDF and XML data will both be sent to Alfresco successfully.
Reply | Threaded
Open this post in threaded view
|

Re: Bug in Orbeon's Alfesco Integration when sending PDF of form with non-visible control

Lyle Sidor
I was examining the persistence-model.xml file on my own installation and noticed that it does NOT have the validate="false" attribute set. Apparently that is a change that was made since 3.9 20110515 stable was released. I'll add the attribute and see how it goes.
Reply | Threaded
Open this post in threaded view
|

Re: Bug in Orbeon's Alfesco Integration when sending PDF of form with non-visible control

Lyle Sidor
Yes, that fixed it. I added the validate="false" attribute to fr-pdf-service-submission in apps/fr/includes/persistence-model.xml in the orbeon-form-runner.jar file in the 3.9 stable release and it now sends the PDF to Alfresco successfully.

Thanks for your help Erik.
Reply | Threaded
Open this post in threaded view
|

Re: Re: Bug in Orbeon's Alfesco Integration when sending PDF of form with non-visible control

Erik Bruchez
Administrator
Lyle,

Good to hear. Also, this had already been changed in May to address
another issue:

https://github.com/orbeon/orbeon-forms/commit/4ed1009d1af9622c06202377a79cfe670d9aafb0

-Erik

On Tue, Nov 1, 2011 at 1:11 PM, lylesidor <[hidden email]> wrote:

> Yes, that fixed it. I added the validate="false" attribute to
> fr-pdf-service-submission in apps/fr/includes/persistence-model.xml in the
> orbeon-form-runner.jar file in the 3.9 stable release and it now sends the
> PDF to Alfresco successfully.
>
> Thanks for your help Erik.
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Bug-in-Orbeon-s-Alfesco-Integration-when-sending-PDF-of-form-with-non-visible-control-tp3900025p3965209.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws