Skip to content

Instantly share code, notes, and snippets.

@jgoldhammer
Created October 29, 2017 11:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgoldhammer/442b18c730438114925f57616205203e to your computer and use it in GitHub Desktop.
Save jgoldhammer/442b18c730438114925f57616205203e to your computer and use it in GitHub Desktop.
alfresco-jscript-extension rules example
// log the docs that currently contain the word 'Alfresco' to a log file
var logFile = space.childByNamePath("alf docs.txt");
if (logFile == null)
{
logFile = space.createFile("alf docs.txt");
}
rules.enableRules(logFile);
print(rules.rulesEnabled(logFile));
rules.disableRules(logFile);
print(rules.rulesEnabled(logFile));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment