I assume you have a BO Document and a daughter BO Revision and it is 1 to N relationship. Document has an attribute Revisions of revision type and Revision has a matching attribute MyDocument, RevisionNo and Status with initial value Active. Then you can try this approach. Note however that you need to check syntax of code lines below as I am typing from memory
Add attribute CurrentRevision to Document and this rule to define it
If (Document.Revisions IS DEFINED AND Document IS NEW) OR (NOT(Document IS NEW) AND Document.Revisions WAS CHANGED) Then
Document.CurrentRevision=COUNT Revision WHERE (Revision IN Document.Revisions) -1
Add this rule to Revision
If Revision IS NEW Then Revision.RevisionNo=Revision.MyDocument.CurrrentRevision+1
And this one to Document
If Revision WAS ADDED TO Document.Revisions Then
ChangeStatus
where ChangeStatus is a process with input Document:
FIND Revision WHERE Revision IN Document.Revisions AND Revision.RevisionNo=Document.CurrentRevision-1
Revision.Status=Archived
greg