AnsweredAssumed Answered

[SOLVED] Rule 'execute script' and search.luceneSearch gives SecurityContextError

Question asked by technaton on Jul 11, 2013
Latest reply on Jul 31, 2013 by technaton
Hello,

I'm trying to use Alfresco's search in a script executed from the "Execute Script" rules action. However, the result of
search.luceneSearch
is the following string: "A valid SecureContext was not provided in the RequestContext".

Here are the relevant lines of the script:

<javascript>var courseNumber = document.properties.name.match(/^SPO_(\d{4,4})_/)[1];
var parentFolders = search.luceneSearch(
        "title:" + courseNumber + " -* " +
            "AND TYPE:folder");</javascript>

Is there a separate login/get ticket functionality I need to use?

Thanks a lot in advance for any answers.

— Eric

Outcomes