Process Utilities Plugin to bulk update Alerts

Due to different development cycles, by different teams over different periods in time I'm in a situation where i have over 100 process models that have been created with different Alert notification settings.
i suspect the majority of the PMs have over time been updated but without auditing each one individually im not sure of the actual numbers.

With that in mind i started to look at how / if it's possible to build update all the maps - to ensure that they use the correct settings (in our case an email group). i have found the Process Utils plug and specifically the Set Alert Recipients for PM Smart Service. The service appears to happily accept an array of PM uuids, which it will then alter the security on.

In theory i should be able to do the following ; 
First establish the Aplication UUID using the getallapplications function (from Application Plugins).
Use the function getapplicationprocessmodelsuuids(appuid) which gives me all the PM uuids.
I store this list in an array and then pass to the Smart service.

However I'm finding that in the list of PM UUID's I'm getting more id's than expected. For instance if the application has two PM's , i get three UUID's.
When the Smart service then executes - it generates an exception - "One of the passed UUIDs does not belong to a valid model 0002e18e-d114-8000-f92f-7f0000014e7a"

If i search for this UUID via designer - i do not get any objects returned.
I have exported the application and extracted the zip - but still unable to find a file with a matching uuid.

i thought that this UUID may have been for the folder itself, and tired to remove it from the array as in the above case it was the first index. this worked, but when i tried the same for a different application i had the same issue, but this time the missing uuid was in a different position within the the array - so im unable to code something to always remove that first entry. 

So Im looknig for help on either how to identify and ignore these rogue uuid's or if it's possible to just ignore the excpetion and continue through the list of PM uuid's to ensure i cover all the processes.






  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer

    Your method for getting UUIDs for all process models seems like it might be overly tedious.  Does it really need to be "by application"?  If not, you can create a modified copy of the "All Process Models" report and simply add a column that points to the (not-advertised) property "pm!uuid", then query all process models from the report via a!queryProcessAnalytics, and use the resulting list.  I'd guess that would return fewer (hopefully no) invalid UUIDs.

    If that solution doesn't work for you, then you could probably take the list of UUIDs returned by your current method, and filter them each through the getprocessmodeldetailsbyuuid() function (Content Utilities plug-in, iirc), and get rid of any that return a result of "Process Model Not Found".  Just be advised that this function is on the slow side, so running it against hundreds of process models might take a minute or so, any given time you run it.

  • hi Mike,

    Thanks for the pointers. The process report worked but for our use case using the getprocessmodeldetailsbyuuid() to validate the uuid's was the answer. Time to execute isn't a problem here as it'll be done out of hours.

    cheers

Reply Children
No Data