Quantcast
Channel: Nintex Connect: Active Threads
Viewing all articles
Browse latest Browse all 4245

Document Expiration handling

$
0
0

Within our HR department there was a need to have documents with various expiry dates (AWAs, EBAs etc)... here is how we came up with a multi-tier warning for these documents...

Firstly, we created a new Site Content Type called Document with Expiry Information, based on the standard Document Type.

Create the following columns for this content type;

  • Expiry Date - date that the document will expire
  • Expiry Notification - user(s) / group(s) that will be notified via email
  • Expiry Comments - free form text for any extra comments regarding the expiry (not required)
  • Expiry Warning - Integer - number of days prior to expiry to send first warning email

Once this is done, you can then attach this document type to a document library.  We are now ready to create the Workflow...

  • Create 3 new Workflow variables;
    • Expiry Warning Days - simply used to take the above field and switch it to a negative number
    • Expiry Warning Date - Calculated at runtime
    • Expiry Overdue Date - Calculated at runtime
  • Set the Workflow to start when items are created/modified

Now, to create the workflow;

  1. Check if the content type of the document is Document with Expiry Information.  If not then end the workflow immediately
  2. Calculate variables
  • Expiry Warning Days - maths calc - Warning days * -1
  • Expiry Warning Date - Expiry Date + Expiry Warning Days
  • Expiry Overdue Date - Expiry Date + 30 Days
  • Create a parallel action, the first branch handles the emails as follows;
    • Add a Run-If - Expiry Warning Date is greater than date when action executed
    • Add a Delay until Expiry Warning Date
    • Add an Email notification - sending to Expiry Notify
  • Expiry email
    • Covers essentially the same steps as above, using the Expiry Date this time.
  • Overdue email
    • Covers essentially the same steps as above, using the Expiry Overdue Date this time.
    • Then finally, add an end workflow task
  • Now, the other branch of the parallel action simply terminates the workflow if the document if modified (and the workflow will then restart)d
    • Add a wait for item update
    • Set it to wait for the modified date to be not equal the modifed date (as in checking itself)
    • Then add an end workflow task

    That's it.  The run-if checks for the dates being in the future is important, because if the date is in the past - the workflow will simply sit there waiting for the date and not continue.

    Basically at the end of this - you should have an email that is sent to the requested notifiers x number of days before the item is due to expire, then another one when it does - and finally (if they don't change the expiry date) another one 30 days later.

    If you want an export of the workflow, let me know - hope someone finds this helpful

    Cheers

    Tom


    Viewing all articles
    Browse latest Browse all 4245

    Trending Articles