Hi all,
Has someone already coded the junction tree algorithm with LotusScript ?
Is required for an archive agent
Regards,
Hi all,
Has someone already coded the junction tree algorithm with LotusScript ?
Is required for an archive agent
Regards,
Subject: junction tree algorithm
I should probably know this but…
What’s a junction tree algorithm?
Subject: RE: junction tree algorithm
Also new term for me, but maybe someone can understand this:Department of Computer Science at North Carolina State University
Subject: junction tree algorithm
Hi all,
Thanks for all the good idea’s but i’m working on a 6 years old R4.6 database that needs to be optimized on speed and size. Don’t have the time to do a redesign.
regards,
Subject: RE: junction tree algorithm
My method did not require a redesign.
Subject: junction tree algorithm
Challenge is that i must code an archive agent for terminated projects in a pm application.
ex :
3 projects A, B and C
each project have several subprojects
A1,A2, B1, C1,C2,C3
A subproject can have several subprojects, etc… B1.1, B1.1.1, B1.1.2
A project can have multiple parents
Ex B1.1 has as parent B1,A1.2,C
A project and all of the subprojects can only be archived if all related nodes (parents, child, coparents, nephews, etc…) in the tree have a status closed.
Each document has 2 fields that contains the unids of his parent- and childprojects.
The root of a project is obviously a project that has no parents
It is playing with recursive functions
Subject: RE: junction tree algorithm
Wouldn’t it be much easier to have some field like “ProjectID” on each of those documents, and then make a view which sorts by project ID so you can archive all documents with the same ProjectID.
Subject: RE: junction tree algorithm
Make ProjectID a multi-value field so that it can contain values for multiple parent project documents.
Subject: RE: junction tree algorithm
I don’t think you a junction tree for this, based on what I’ve read. Here’s a cheap little way to do it (feel free to improve it.)
Dim statusList List as String
Sub getStatusList (doc as NotesDocument, statusList as Variant)
Dim nextDoc as NotesDocument
statusList(doc.UniversalID) = doc.status(0)
Forall parentUNID in doc.parentUNIDs
Set nextDoc = doc.parentDatabase.getDocumentByUNID(parentUNID)
getStatusList nextDoc, statusList
End Forall
Forall childUNID in doc.childUNIDs
Set nextDoc = doc.parentDatabase.getDocumentByUNID(childUNID)
getStatusList nextDoc, statusList
End Forall
End Sub
Then at the end, just loop through the list and check to see if all the values are “Closed.”
Technically, you could make this faster if it simply bombed out if it encountered anything that wasn’t closed, but this would probably be a more useful approach.