Changing the Automatically Applied Disposition Actions in Alfresco Records Management

Alfresco_logo_RGB

 

 

Tested in Alfresco 4.2.3 and RM 2.2

As you know, Alfresco has an events driven Retention and Disposition process, as part of the optional Records Management (RM) module.

There is a job executed that checks for the eligibility of any file to have a retention/disposition action automatically applied to it. If the action is manually applied before the job has a chance to run, there’s no harm done. But this job comes along behind and cleans up any missed files that are eligible for an action.

The actions that are available to be automatically executed are Retain, Cutoff, Destroy, Transfer and Accession.

The actions, however, that are actually configured to auto-occur out of the box are Cutoff and Retain. This means that if you want a file destroyed as soon as (or at least within 5 minutes in an out of the box configuration) it has become eligible for destruction, you have to do a little bit of configuration.

Now, this job (rm.dispositionlifecycletrigger) has regular schedule for execution – and the execution schedule is defined in  <installdir>/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/module/org_alfresco_module_rm/alfresco-global.properties:

#
# Global RM disposition lifecycle trigger cron job expression
#
rm.dispositionlifecycletrigger.cronexpression=0 0/5 * ?

This basically means that, out of the box, the job runs at every 5 minutes (a primer on cron expressions is available here).

If you want to change the frequency at which the job runs:

Place a

rm.dispositionlifecycletrigger.cronexpression

value into your <installdir>/tomcat/shared/classes/alfresco-global.properties file

for example,

rm.dispositionlifecycletrigger.cronexpression=0 0/15 * ?

To have the job run only every 15 minutes (at 0, 15, 20, 45 minutes past the hour), instead of every 5.

To change the actual retention/disposition Actions that are automatically applied to eligible files during the job:

  1. Do this in your Test environment only to start with and be aware of the consequences of enabling auto-Destroy…
  2. Copy tomcat/webapps/alfresco/WEB-INF/classes/alfresco/module/org_alfresco_module_rm/rm-job-context.xml to tomcat/shared/classes/alfresco/extension/rm-job-override-context.xml
  3. Edit the file to look as follows (colour added to assist with a  later reference):
    <?xml version='1.0' encoding='UTF-8’?>
    <!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
    <beans>
      <bean id=“dispositionLifecycleJobExecuter" class=“org.alfresco.module.org_alfresco_module_rm.job.DispositionLifecycleJobExecuter” parent="baseRMJobExecuter”>
        <!-- list of disposition actions to automatically execute when eligible —>
        <property name="dispositionActions">
          <list>
            <value>cutoff</value>
            <value>retain</value>
          </list>
        </property>
        <property name="nodeService" ref="nodeService" />
        <property name="searchService" ref="searchService" />
        <property name="recordsManagementActionService" ref="recordsManagementActionService" />
      </bean>
    </beans>
  4. Add the appropriate value keys to the dispositionActions <list> – e.g.:
        <property name="dispositionActions">
          <list>
            <value>cutoff</value>
            <value>retain</value>
            <value>destroy</value>
          </list>
        </property>

    Legitimate values are: retain, cutoff, destroy, transfer, accession

  5. Save the file tomcat/shared/classes/alfresco/extension/rm-job-override-context.xml
  6. Restart the repository
  7. TEST TEST TEST
  8. Rollout in Production 🙂

 

4 thoughts on “Changing the Automatically Applied Disposition Actions in Alfresco Records Management”

Leave a Reply

Your email address will not be published. Required fields are marked *