Configuring Controlled docs with AGS Solution - tsgrp/HPI GitHub Wiki

This page is being moved to the alfresco documentation

Background:

Why this exists:

  • When using Controlled Docs with AGS, as soon as a doc becomes effective it should become a record.
  • If we were just to declare that effective controlled doc a record, it could no longer be able to be checked out and checked back in since records are immutable (the controlled doc version chain would essentially be dead)
  • Therefore, the controlled docs with AGS solution will actually create a copy of the controlled document when it becomes effective so that that copy can be declared an AGS record and the controlled doc itself will still be able to be checked out and checked back in

Implications:

  • When a controlled doc becomes effective
    • A record copy is created of that controlled doc (and a rule will run to declare that copy as a record)
  • Disposition
    • When the record copy is dispositioned, a behavior will now run and delete the associated controlled document version as the record copy is dispositioned
  • superceded/obsolete
    • When a controlled doc becomes superceded or obsoleted, the record copy status will also be updated to show the change

Configuring the solution:

Prerequisites:

  1. You will need AGS installed in alfresco
  2. You will need a working controlled docs solutions such that documents are moved to the effective state
  3. You will need 2 separate object types - 1 for your controlled doc (for example acme:controlledDoc) and 1 type that your record should be copied to (for example acme:record)

The are 2 key pieces to configuring controlled docs with AGS

1. Enable the functionality by overriding the default values for these props

  • controlled.docs.with.ags=true
    • Set this to true to signify we are using the controlled docs with AGS solution
  • controlled.docs.with.ags.object.type={http://www.acme.com/model/content/1.0 (http://www.evergy.com/model/content/1.0)}record
    • Set the ObjectType for the created record copy of the node
    • this is the object type that we will use when we create the copy of the controlled document
    • It should be a different object type than the controlled document
  • controlled.docs.with.ags.association={http://www.acme.com/model/content/1.0}controlledRecordCopyAssoc
    • Set the Name of the Association to associate the controlled doc to its record copy
    • This is what ties the controlled document to its record copy so we can later look up the associated document to update status or disposition
  • controlled.docs.with.ags.behaviors.to.disable={http://www.alfresco.org/model/content/1.0}content,{http://www.tsgrp.com/model/tsg/1.0}renditioned
    • Set the list of behaviors that should be disabled when running the controlled doc with AGS logic
    • We suggest setting this to at least cm:content and tsg:Rendition since these content props will be automatically copied over and we don’t want them generated from jobs on our record copy
  • controlled.docs.with.ags.prefix.for.name.of.copy=REC_
    • Set the prefix we append to the name of the Record Copy of the controlled document to avoid collisions by copying with the exact same name
  • controlled.docs.with.ags.associations.to.copy.over=
    • list of associations we want to copy over from the controlled document to the Record copy
  • controlled.docs.with.ags.aspects.to.always.add={http://www.tsgrp.com/model/tsg/1.0}doNotAutoRender (http://www.tsgrp.com/model/tsg/1.0%7DdoNotAutoRender)
    • list of aspects to add (doesn’t need to be on controlled doc but can be)
    • Since we will copy over the rendition, add the do not autorender aspect

2. Setup a folder rule to declare the created copy as an AGS record

  1. Need to setup the folder Rule to actually declare our record copy as an AGS Record
    1. In the share site -> on the folder where you record copy will get created (or moved to if autofile is configured) -> under folder rules -> add rule
      1. on create or enter
      2. RUN WHEN - Content Type = Content (since we dont want this to run when folders are created in here)
      3. File Record -> to unfiled Records Folder
      4. Check Box to Run on Subfolders
  2. You can also then setup another rule on the unfiled records folder in the RM site to file the record to a more specific location