dominoGuru.com
Your Development & Design Resource
MixMaster v0.1 - NotesItem Manager - Preview
09/24/2008 11:39 PM by Chris Toohey
When it rains it pours as they say, and I was faced with several issues at once this week:
- While planning to upgrade Mail Databases to ND8, we found that certain
Design Elements - mostly Agents and Views - had the "Prohibit design refresh or
replace to modify" checked... which would be problematic as we need to remove
some of these elements. What makes this better is that - since the customer has
used multiple mail templates - there's no logic to who has these flagged Design
Elements. So we have a possible handful of possible duplicated Design Elements
where the
$Flags
NotesItem contains "P". - Had a "project champion" contact me, asking for an Excel report of various
information from her Lotus Notes Application. Simple enough, as I built EEE into the application... but then she went on to
inform me that the status levels were completely wrong, but that they needed to
be correct in the report. This results in several thousand NotesDocuments
where the
status
NotesItem is just plain wrong, and the only way to know what it should be is to evaluate several different conditions (ie., this is this while that is not that, etc.). - A workflow application - which is the bastardized "upgrade" of some hellspawn requisitions review and approval process - hiccups more often than it works anymore. This leaves me having to go in and push certain NotesDocuments through the constantly-fluxing routing process through direct NotesItem manipulation. I hate this application, as well as lament for the loss of accumulated hours of my life spent smacking it around.
And this was Monday. Monday morning actually.
I started thinking to myself about just what I could do to address the Mail Database Design Elements, the FUBAR'ed NotesDocuments whose status was truly a mystery, the bain-of-my-existence workflow application, work on my abs, clean the Augean stables, and cure Cancer while finding time to spend with my family between Football practices, Cheerleading practices, piano lessons, Lotusphere Abstract Submissions (due Friday, btw...), and all of the other things that keep me busy 27 hours out of the day.
So... I had an idea! What if I could logically control the NotesItems of
NotesDocuments in remote Domino Applications? I could write a simple
configuration-based utility application that would allow me to define a Domino
Application, define a collection of Design Elements or NotesDocuments, and
configure a NotesItems maintenance engine - all built on my freeware/tip
jar-ware application UI. I could use this utility application to remove the
"P" from the $Flags
NotesItem in my Mail Database Design Elements,
apply some user-supplied and developer-entered logic to update the
status
NotesItem on some NotesDocuments, and could potentially
allow me to provide a given application administrator with an API into
controlled-push of a stalled NotesDocument through a workflow
application. Not too sure what it's going to do about cancer or
cattle-cleaning... but they can't all be gems.
So with my idea, I grabbed a pad and pencil, and started mapping out a simple architecture outline via some napkin-development, and I came up with the following:
I had my utility application - which I'm calling MixMaster - which uses a Job document to access the target NotesDatabase and get a handle on defined-criteria target collection. Now, for that collection, I'm using a NotesNoteCollection, which allows me to access both NotesDocuments and Design Elements, and using a defined selection formula via the Job document's criteria NotesItem.
Once I have my target NotesDatabase collection (represented in the above
diagram as a single document - Document), I grab the the defined
Evaluation documents (which are children NotesDocuments of the given
Job document), each containing notesitem
and formula
NotesItems. We'll Evaluate
the formula defined in the
formula
NotesItem against the target NotesDocument (or Design
Element, which I'll render as... a NotesDocument - ta-da!), and save the result
to the target NotesDatabase NotesDocument NotesItem defined in the
notesitem
NotesItem. Yikes...
So outside of some bells and whistles - including a simple Sidebar-ready Form - that's pretty much it! Of course, if you're like me... you're interested more in the working-example application, video tutorial, and something that you can rip apart. Fair enough - and expect to see that tomorrow!