share-extras / js-console

Administration Console component for Alfresco Share, that enables the execution of arbitrary JavaScript code against the repository
Other
74 stars 53 forks source link

JSconsole strange execution flow #66

Closed joebujok closed 8 years ago

joebujok commented 8 years ago

This has happened on a few scripts but if a task takes a little while to run the jsconsole seems to restart itself.

A simple example of this is a script I have is where I iterate over a folder listing and gets all the access levels for all the users on the children folders and write it to a csv file in the repository. I have a line at the start to say the script has started and a line for when it completes. This is what the log files looks like ( I have only clicked on execute once).

12:14:19,903 INFO [org.alfresco.repo.jscript.ScriptLogger] AAF Access level report started 12:15:56,782 WARN [org.alfresco.repo.cache.TransactionalCache.org.alfresco.routingContentStoreTransactionalCache] Transactional update cache 'org.alfresco.routingContentStoreTransactionalCache' is full (10000). 12:16:20,478 INFO [org.alfresco.repo.jscript.ScriptLogger] AAF Access level report started 12:18:21,069 INFO [org.alfresco.repo.jscript.ScriptLogger] AAF Access level report started 12:18:44,829 WARN [org.alfresco.repo.cache.TransactionalCache.org.alfresco.routingContentStoreTransactionalCache] Transactional update cache 'org.alfresco.routingContentStoreTransactionalCache' is full (10000). 12:20:21,660 INFO [org.alfresco.repo.jscript.ScriptLogger] AAF Access level report started 12:21:31,487 WARN [org.alfresco.repo.cache.TransactionalCache.org.alfresco.routingContentStoreTransactionalCache] Transactional update cache 'org.alfresco.routingContentStoreTransactionalCache' is full (10000). 12:22:22,267 INFO [org.alfresco.repo.jscript.ScriptLogger] AAF Access level report started

12:23:59,504 WARN [org.alfresco.repo.cache.TransactionalCache.org.alfresco.routingContentStoreTransactionalCache] Transactional update cache 'org.alfresco.routingContentStoreTransactionalCache' is full (10000). 12:24:22,904 INFO [org.alfresco.repo.jscript.ScriptLogger] AAF Access level report started 12:26:23,495 INFO [org.alfresco.repo.jscript.ScriptLogger] AAF Access level report started

It seems like the script resets itself and runs multiple times.

binduwavell commented 8 years ago

I can confirm I've seen this too. However I've seen it with the ootb execute script action, so I assumed it was an Alfresco issue. I have written a js root object to block this from happening using the attribute service. Unfortunately this code can't be open sources.

jgoldhammer commented 8 years ago

@binduwavell Thanks for the hint. So, I will close the ticket because it is an Alfresco issue... @joebujok Please create a ticket via issues.alfresco.com

Thanks, Jens