Search code examples
alfresco

Running an Alfresco Action after one week a rule is executed


I wrote a script to run for an Alfresco rule. but I want the script to run after specific time ( I need the script to run after 1 week). any solution?

I read about Scheduled_Actions , is this feature useful?


Solution

  • Yes, in fact a Scheduled Action is likely your only option for for running something after a certain amount of time has elapsed.

    At a high level your solution should look something like:

    1. Your rule sets some aspect/property on the relevant node, say ruleDate, which is the date the original rule ran.
    2. A scheduled action runs every day and detects nodes with a ruleDate 7 days or more in the past.
    3. The scheduled action does whatever changes are required.
    4. The scheduled action removes the ruleDate aspect/property.