Is callback function in saveXML() synchronous?

When we invoke the saveXML() method to retrieve the new BPMN XML we pass in a callback function that is invoked with the new XML as a parameter. My question is "Is this invoked synchronously to saveXML()"?

To be clear, if I call saveXML() am I assured that the callback function will be invoked before the return from saveXML() or might it be invoked subsequently to the return from saveXML()?

There is no guarantee that #saveXML is synchronous, if it is right now.

In the future, the method will return a promise that guarantees it is asynchronous.

Don’t rely on the method being synchronous.

1 Like