tsgrp / OpenContent

TSG's Web Services for ECM Repositories
8 stars 4 forks source link

Condition needed to determine if a controlled document is the "latest" #47

Open gsteimer opened 10 years ago

gsteimer commented 10 years ago

Some actions, like the new Obsolete Document action added for the controlled document solution, could benefit from a condition that determines if the node in question is the "latest" node for the given controlled document.

Talk to George / Ben / Dan before working on this one. Basically, a new node is created for each major version of a controlled document. This is due to limitations of Alfresco and how Security works. Consider:

1.0, Superseded - Node A 2.0, Effective - Node B, has a "supersedes" relationship with 1.0 as the child 3.0, Approved - Node C, has a "supersedes" relationship with 2.0 as the child

In the above case, the condition should only return true for node C.

Also consider:

1.0, Effective - Node A 1.1, Draft - Node B 1.2, Draft - Node B

In the above case, the should return true for Node B on version 1.2, but false for node B version 1.1 and Node A.

dgrumieaux commented 10 years ago

This should conceivably be simple by leveraging the IExtendedContent#getLatestVersion

gsteimer commented 10 years ago

@dgrumieaux - but does that take into account the multi-node nature of tsg:controlled documents? I'm guessing no, so we'll need a separate getLatestControlledDocVersion or something like that...

dgrumieaux commented 10 years ago

You are correct - I forgot the Alfresco implementations do not respect that logic. Those methods will need to be implemented. Since we already have tsg:controlled logic in AlfrescoEmbContentImpl, I'd argue that the AlfrescoEmbContentImpl#findCurrentVersionId should be updated to respect the multi-node controlled doc paradigm, and to treat non-controlled doc versions the same way it does now.

On Mon, Nov 10, 2014 at 11:32 AM, George Steimer notifications@github.com wrote:

@dgrumieaux https://github.com/dgrumieaux - but does that take into account the multi-node nature of tsg:controlled documents? I'm guessing no, so we'll need a separate getLatestControlledDocVersion or something like that...

— Reply to this email directly or view it on GitHub https://github.com/tsgrp/OpenContent/issues/47#issuecomment-62421132.

dgrumieaux commented 9 years ago

related to https://github.com/tsgrp/ActiveWizard/issues/74