xf:dispatch with delay behaving differently from what is depicted in documentation

8 views
Skip to first unread message

Marcin Słowikowski

unread,
Apr 30, 2026, 4:54:44 PMApr 30
to Orbeon Forms
Hello Dear Orbeon-Team,

Github issue:
https://github.com/orbeon/orbeon-forms/issues/7648
(Please don't ban me if I should not be making issues on github alongside, just scold me please)

I've noticed some of Your delayed dispatches does not work as depicted in Your documentation:
https://doc.orbeon.com/xforms/events/events-standard#delayed-events

It says:
"Event properties/context information of atomic types are now preserved and passed when the event is dispatched with a delay. Other types of event properties/context information (such as XML nodes) are not supported and will cause an error."

It says it's working
[[SINCE Orbeon Forms 2023.1]]
but I'm currently there and it's not. And currently my observations show it doesn't work either on version dispatched to demo.orbeon.com.

Despite that whenever I'm trying to dispatch such delayed event and propagate some simple string values, I'm ending up with an error:
"Java object cannot be converted to an XQuery value"

Here is example event observer I was able to observe this on:

                <xf:action ev:observer="fr-form-instance" event="xxforms-value-changed"
                           if="event('node')/name()='contA'">
                    <xf:dispatch name="async-setvalue" targetid="fr-form-model" xxf:show-progress="true" delay="1">
                        <xf:property as="xs:string" name="ref" value="'into-ref'"/>
                        <xf:property as="xs:string" name="value" value="string('into-value')"/>
                    </xf:dispatch>
                </xf:action>
                <xf:action event="async-setvalue" ev:observer="fr-form-model">
                    <xf:var name="intoref" value="event('ref')"/>
                    <xf:var name="intovalue" value="event('value')"/>

                    <xf:message level="modal" value="concat('debug info: ', $intoref, $intovalue)"/>
                </xf:action>
Removing delay attribute from xf:dispatch get it back to working (but sadly it breaks use case I was assigned to).

Error is observed on standalone Orbeon 2023.1 server but I've got same result on Your 2025.1.1.202604250538 PE version deployed on demo.orbeon.com (minus seeing Your server logs but for now I am assuming it's the same).

Kind regards,
Marcin

Alessandro Vernet

unread,
May 1, 2026, 5:26:09 PMMay 1
to orb...@googlegroups.com
Hi Marcin,

Thanks for the test case; this really helps. We've now fixed this issue. The fix will be in the 2025.1.2 and 2024.1.6 maintenance releases.

-Alex
Reply all
Reply to author
Forward
0 new messages