9 Replies Latest reply: Jul 30, 2014 8:31 AM by Bhupesh Yadav RSS

    How to replace content (primary file) without a new revision?

    Martin Bikl

      Hi everybody,

       

      I need to replace a content (only primary file) without a new revision. Is it possible? Does it exist any Service?

       

      My idea is to use "UPDATE_DOCINFO", BUT only primaryFile... ;o)))

       

      Thank you.

       

      Martin

        • 1. Re: How to replace content (primary file) without a new revision?
          Anand U

          Hi Martin,

           

          There is no service to do this provided by the product, you will need to customize. You could opt to introduce a new revision and remove the earlier revision matching your criteria, if that works, but you will have a higher revision id on the content.

           

          HTH

          - Anand

          • 2. Re: How to replace content (primary file) without a new revision?
            Martin Bikl

            Hi,

             

            I forgot one information. I need to have the same dID. Is it not possible to create a new revision and to delete the previous revision.

             

            M.

            • 3. Re: How to replace content (primary file) without a new revision?
              Jiri.Machotka-Oracle

              There is no service to support that. Could you share reasons behind this requirement?

              • 4. Re: How to replace content (primary file) without a new revision?
                William Phelps

                Without testing it fully, just speculating -  you *might* be able to get there by changing the document within workflow.  Depending on the step definition, a user can review/edit the revision, which allows the document to be modified while maintaining the rev label id.  What is unknown is if the dID value is maintained as well as the rev label id.

                 

                Like Jiri, I'd be interested in the business case.  In general, tying any links to the dDocName value rather than dID is the recommended approach, so that dID is largely irrelevant.

                • 5. Re: How to replace content (primary file) without a new revision?
                  Martin Bikl

                  Hi

                   

                  My reason is:

                  1. Scanner makes scan document and save into DMS.

                  Aplication APP1 search this document and save dID of this document into APP1.

                  3. An user of APP1 says: "This document has a bad quality ". Please rescan it.

                  4. Scanner makes a new scan and now we want to change content/primary file without change dID, because scanner doesn't have connection to APP1.

                   

                  We don't use revisions, thus we cannot use dDocName. Using revisions is very huge change for APP1.

                   

                  M.

                  • 6. Re: How to replace content (primary file) without a new revision?
                    Anand U

                    Hi Martin,

                     

                    My suggestion,

                     

                    1. Scanner makes scan document and save into DMS.

                    2. Application APP1 search this document and save dDocName of this document into APP1.

                    3. An user of APP1 says: "This document has a bad quality ". Please rescan it.

                    4. Scanner makes a new scan and introduces a new new revision to DMS

                    5. Introduce a new metadata to mark the quality of images Ex: xImageQuality=Bad/Good

                    6. Document retrieve logic only needs to change to include a check on this metadata (Ex: DOC_INFO service call to know all revisions available and xImageQuality=Good) - Applies to Step 2

                     

                    Replacing dID is not a good practice as William mentioned.

                     

                    HTH

                    - Anand

                    • 7. Re: How to replace content (primary file) without a new revision?
                      Prateek Mohan

                      Or... similar to Anand's suggestion but with a minor alteration:

                       

                      1. Scanner makes scan document and save into DMS.

                      2. Application APP1 search this document and save dDocName of this document into APP1.

                      The retrieval logic in APP1 should fetch the file with additional parameters passed i.e. RevisionSelectedMethod=Latest or RevisionSelectedMethod=LatestReleased  (depending on whether you want to pick the "last revision" or "last RELEASED revision")

                      E.g. say you would pass following parameters

                               IdcService=GET_FILE

                               dDocName=<your content id>

                               RevisionSelectedMethod=LatestReleased

                               rendition=vault

                       

                      3. When a user of APP1 says: "This document has a bad quality ", scanner makes a new scan and introduces a new new revision against the same dDocName to DMS

                      4. Your logic of retrieving will now show your user the latest revision automatically.

                       

                      Would switching to dDocName, RevisionSelectedMethod & rendition parameters, be a big change for your APP1's document retrieval logic?

                      • 8. Re: How to replace content (primary file) without a new revision?
                        Jiri.Machotka-Oracle

                        And my 2 cents: both dDocName and dID are just identifiers. dDocName is slightly better, because unlike dID which is always auto-generated, you can enforce some semantics to dDocName. As Prateek and Anand wrote, there are OOTB means to search for the the current revision even with dDocName, so it should be no obstacle.

                         

                        Besides, check this: https://blogs.oracle.com/kyle/entry/maintaining_revision_levels

                        (if you need to get rid of old revisions not to occupy the space, or prevent confusion)

                        • 9. Re: How to replace content (primary file) without a new revision?
                          Bhupesh Yadav

                          Hi Martin

                          Ok first of all sorry for replying late but this question is still unanswered so I will suggest this solution:

                          You can call RESUBMIT_FOR_CONVERSION service , this service will give you VaultfilePath variable in binder, Navigating on this path you can manually delete the file and add your desired file using java i/o and do it in a java action .

                          On a separate note name of the file in vault directory is of format  dID.extension

                          I hope I helped.. Cheers

                           

                           

                          Hii I would like to make extra note which I forgot to mention.

                          I know it is not a good idea to call RESUBMIT_FOR_CONVERSION  service as it has no requirement for you, but there are only four services in content server that provides VaultfilePath variable. Out of these three only this one is suitable because other three are CHEKIN_NEW, CHEKIN_NEW_SUB, WORKFLOW_CANCEL, which will alter the behaviour completely.

                          Though their are other good answers above but this is just an alternative.