We'd like the pinboards associated with deleted workflow items to just drop away, to keep things relevant for users.
This lambda runs on a 6 hourly schedule and does the following...
- invokes
workflow-bridge-lambdato get active workflow IDs - for items with
pinboardIdNOT in the list of active workflow IDs- sets
isArchivedtotrue(note these items are then filtered out of relevant queries such aslistItems,getGroupPinboardIds,getItemCounts) - clear the
messageandpayloadfor storage reasons
- sets
- removes any archived pinboards from the
manuallyOpenedPinboardIdsfield of relevant users
... details of the above is all logged, such that we could restore if needs be (albeit with an ad-hoc script).