Hi,
I'm on create a rule on folder which triggered when content deleted, but always fail (content move is success), until I found this old thread :
It's been a years issue as explained there.
Is there any info if this issue will be solved?
Thanks,
[bayu]
Solved! Go to Solution.
It already submitted 16 Sep 2014: [SHA-1363] Add a warning in the Rules UI that "On Delete" rules won't run in the background - Alfres...
Hope this issue will be solved sooner!
I use a "on content deleted or moved" rule, and it's also working on deleting content. version is 5.2 community
Hmm.... after reading your comments, I created a simple script to write a log file and works (move and deleted).
I will check my script again why it happens.
I also use 5.2 community version.
Thank you.-
Hi,
After check my script and the rule, I found the problem or might 'bug' finally.
The problem is on "Run in background" option of rule.
When it disabled, the the deleting action will trigger the rule, but when it activated/checked the deleting action will not trigger the rule.
Below is my simple script which will create the log file with time stamp.
Hi Martin Ehe, If you don't mind, I'd like you to test my script.
function main()
{
var currentDate = new Date();
var logFile = userhome.childByNamePath("myCreateLogs.txt");
if (logFile == null) {
logFile = userhome.createFile("myCreateLogs.txt");
}var currentDate = new Date();
logFile.content = "Log File: "+currentDate+"\n";
logFile.content += "Folder Name="+space.properties.name;
}main();
Thank you,
Hi Bayu,
You're right. The script is not executed if it's run in the background. It seems that the scripts are not triggered if "onDelete" is called in the background.
I even tried the "error" script mechanism, to see if there's a problem.
Tried your script and the script
logger.system.out("rule called");
and an "error" script of the same complexity
logger.system.out("an error occurred");
When removing the "run in background" option, your script runs fine and creates the log file in my home-dir.
Seems like we have a bug...
Hi Martin,
Thank you. If it hasn't been submitted to the bug report, I will report it.
Thanks!
It already submitted 16 Sep 2014: [SHA-1363] Add a warning in the Rules UI that "On Delete" rules won't run in the background - Alfres...
Hope this issue will be solved sooner!
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.