AnsweredAssumed Answered

Upload new Version calls onUpdateNode twice with bogus NodeRef

Question asked by technaton on Dec 5, 2014
Latest reply on Dec 5, 2014 by technaton
Hello everybody,

I've created a behavior along with a custom aspect that implements the
OnUpdateNodePolicy
interface. The behavior itself does nothing spectacular: It creates or updates a PDF using the content transformation service.

Now, when uploading a new version of the document that already has the aspect, the behavior is actually called twice: Once with the original document's NodeRef (that which has the aspect applied), and once with another NodeRef of a document/node that <em>does not exist</em>.

Of course I can easily check whether the file exists, i.e.

<blockcode>if (!fileFolderService.exists(srcNode)) {
         return;
      }</blockcode>

… which of course solves the immediate problem, but I'm interested in the Why: Where does this bogus noderef come from?

Thanks alot in advance for any hints1

Cheers,
Eric

Outcomes