orbeon / orbeon-forms

Orbeon Forms is an open source web forms solution. It includes an XForms engine, the Form Builder web-based form editor, and the Form Runner runtime.
http://www.orbeon.com/
GNU Lesser General Public License v2.1
518 stars 220 forks source link

No success or error message when encountering issue saving with custom provider #6639

Closed avernet closed 6 hours ago

avernet commented 2 weeks ago

To reproduce:

+1 from customer

ebruchez commented 2 days ago

I reproduce this. I see that the persistence proxy returns the error correctly, and that the ProcessInterpreter obtains the error as well. The issue appears to be in running the process continuation.

ebruchez commented 2 days ago

Interestingly, we process this:

(nop then new-to-edit then success-message("save-success") recover error-message("database-error"))

This decomposes into a (expr, rest), where rest is Nil. This later causes the code not to execute rest.

But removing parentheses:

nop then new-to-edit then success-message("save-success") recover error-message("database-error")

returns a different (expr, rest) tuple, with rest being non-empty.

ebruchez commented 10 hours ago
ebruchez commented 8 hours ago

Assuming continue-with-failure is an action that fails:

continue-with-failure then (a then b recover c)

produces a result different from:

continue-with-failure then a then b recover c

This is by design. Parentheses create groups or blocks.