I'm creating one document using the "temp_name" and "open" command in ACL, however when I call a java function through a java object which I created in the same function where my file was created, I can not read content from my document. I saw that only when I close my Arbortext is when the document shows it's content. If I open the new document while my function is "active" and Arbortext is Open, there's no content inside. =(
Does anybody know why is that? And how can I solve this issue?
As always I really appreciate your time and support. Best Regards.
Arbortext puts a file system lock on the file when it opens it, which is probably what is preventing your Java class from accessing the content. But if you have the document open in Arbortext, you should be able to pass the reference to the AOM representation of the document to your Java class (or pull it from the Java class).
Have you tried having your Java class access the document via AOM? There is example code in the $ARBORTEXT/samples directory showing how to do this. Once you have a handle for the ADocument object, you should be able to do whatever you need to do with it using the usual DOM or AOM objects and methods.