Page 1 of 1

AuthorOperation finished event

Posted: Fri Jun 23, 2017 2:59 pm
by Johann
Hi everyone,

Is there any event fired when an AuthorOperation (more specifically an InsertFragmentOperation) is finished ?

Thanks !

Johann

Re: AuthorOperation finished event

Posted: Fri Jun 23, 2017 3:13 pm
by Radu
Hi Johann,

I need more context about your use case.
One option for you would be to extend our "ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation" with your custom operation which notifies a static set of listeners when it gets invoked. Then for all actions use your custom operation instead of ours.

Regards,
Radu

Re: AuthorOperation finished event

Posted: Fri Jun 23, 2017 3:30 pm
by Johann
Hi Radu,

Here is my use case.
I have a webservice which allows to insert an XML fragment at a specific XPath in my document. I would like to notify that the insertion has been done successfully in the response of the webservice.
At the moment, once the InsertOpeartion is invoked, the webservice response is returned... and problems seem to happen when several call of this webservice come one after another. The document seems not to have finished the insertion and try to do another one.

I would like to continue using InsertFragmentOperation and I want to know when the fragment has been really inserted and the document is ready for a new insertion.

Johann

Re: AuthorOperation finished event

Posted: Fri Jun 23, 2017 3:48 pm
by Radu
Hi Johann,

Is this question about the Author Component that you are using in your own Swing application or about our Oxygen Online Web editor?
If it's about the former modifications to the document must always be done on the AWT thread. So if you have multiple invocations of operations from multiple threads, you need to make sure only one of them executed changes at once and that all other invocation are blocked waiting for the current operation to finish.
About your remark:
The document seems not to have finished the insertion and try to do another one.
How did you realize this?

Regards,
Radu