Hi Florian, Change token does not solve our problem because the hold relationships are outside the objects themselves. Therefore, there is no last-modified date that we can reference. Neither the document nor the hold are updated when the hold relationship is added, so there is no timestamp to check. So, in our case, a change token would not help, as the objects themselves are not updated. If the hold were implemented with a multi-value property, this would make sense. But in our case, it's not.
One of the key requirements we received from product management was that customers need to do broad key-word searches for legal matters and may need to put 100s of thousands of documents on hold. They may do this iteratively as legal provides different keywords or removes some words from the list. It really seems like this sort of operation is beyond the scope of what MV properties are meant to support. To support such usage scenarios, our content server provide API to directly add/remove hold relationship in batches. But unfortunately similar API is not available in current CMIS 1.1 spec. Let me know if this is a valid requirement from CMIS standard perspective. Or do we have other alternatives that could be added in the next version of CMIS spec? Best Regards, Mike Li(李永亮) IBM Content Manager RM Development Tel:(86-10)82453403 Fax:(86-10)58851920 Tie-line: 905-3403 liyo...@cn.ibm.com From: Florian Müller <f...@apache.org> To: dev@chemistry.apache.org, Yong Liang Li/China/IBM@IBMCN Cc: Jay Brown <jay.br...@us.ibm.com>, Randy Richardt <rric...@us.ibm.com>, Srinivas Nv Gannavarapu <srinivas.gannavar...@in.ibm.com> Date: 2016/02/04 16:55 Subject: Re: A better way to add/remove hold in CMIS 1.1? Hi Mike, You may want to move this discussion to the CMIS TC. The Technical Committee is planning CMIS 1.2/2.0 at the moment. It would be a good time now to add it to the discussion. Adding change tokens support on the CMIS level is relatively easy even if the native repository doesn't support it. Just use the last modification date as the change token value. It's not perfect, but depending on the time resolution of your repository it is pretty effective. - Florian > Florian, > > Thanks for your response. In my case, our content server implements > hold as relationship like folder. There is no hold list stored for > each of the objects in content server. We need to query the > relationships related to the object to get all the holds. If a whole > list is updated, we need to query out all the existing holds and > compare the two list. > > In the most cases, from business' perspective, add/remove hold is > typical usage scenario because a specific user does not care much > about which hold is currently on a specific object. What he/she cares > is whether a new hold should be added or whether an existing hold > should be removed. One workaround that is under discussion is to > enforce user to add prefix like AddHold_ or RemoveHold_ to the object > ids that the user want to update in the list. This way, CMIS server > can easily understand the intention of the user and no need to do a > retrieve and compare. > > Unfortunately, our content server has no support to change token. > > Best Regards, > > Mike Li(李永亮) > IBM Content Manager RM Development > Tel:(86-10)82453403 Fax:(86-10)58851920 Tie-line: 905-3403 > liyo...@cn.ibm.com > > Florian Müller ---2016/02/03 16:57:52---Hi Mike, I hope I've some > answers for you. > > From: Florian Müller <f...@apache.org> > To: dev@chemistry.apache.org > Cc: Srinivas Nv Gannavarapu <srinivas.gannavar...@in.ibm.com>, Randy > Richardt <rric...@us.ibm.com>, Jay Brown <jay.br...@us.ibm.com>, Yong > Liang Li/China/IBM@IBMCN > Date: 2016/02/03 16:57 > Subject: Re: A better way to add/remove hold in CMIS 1.1? > > ------------------------- > > Hi Mike, > > I hope I've some answers for you. > > Re a) Holds are stored as a multi-value property. CMIS only allows > retrieving and updating multi-value properties as a whole. There is no > > support for partial retrieval or partial update. > But if a client doesn't modify the list of holds, it shouldn't send it > > to the server. Hence, there is no need for the server to retrieve the > list of holds all the time. > Do you except a frequent change of holds on an object? In the use > cases > I know, holds are not updated very often. > > Re b) That shouldn't happen if your server implements change tokens > correctly. Change tokens are supposed to prevent lost updates. > > - Florian > >> Hi all, >> >> In the current CMIS 1.1 spec, hold is supported by secondary type. >> Specifically, the user can add/remove ids from cmis:hold.rm_holdIds > to >> add/remove holds. There are two major issues here. >> a) The user need to firstly retrieve out the whole hold list > before >> the >> user can add/remove hold. The list might be a big one depends on >> business needs. In CMIS server side implementation, we need to >> firstly >> retrieve out this list from content server and compare it to the >> list in >> the update request. So that we get to know which one should be >> added/removed. Even though there is no change in this list, we > still >> need to do the retrieve and compare practice in each checkin. > This >> will >> not perform well. >> b) May result in inconsistences in consequent updates. For > example, >> user >> A is trying to add a hold, so it pass the original list plus the > one >> that it wants to add hold. Now user B wants to add another hold. > If >> user >> B's original list had been retrieved out before user A completed > the >> update, then user A's update will be overwritten by user B's > update, >> unintentionally. >> >> >> So, I wonder whether there is a better way to add/remove holds > without >> going through the retrieve and compare logic in an update(checkin). >> Thanks >> in advance! >> >> >> Best Regards, >> >> Mike Li(李永亮) >> IBM Content Manager RM Development >> Tel:(86-10)82453403 Fax:(86-10)58851920 Tie-line: 905-3403 >> liyo...@cn.ibm.com