Author Topic: ODWEK 10.1 StoreDocument API to return Unique Document ID  (Read 141 times)

WietzeW

  • Newbie
  • *
  • Posts: 2
    • View Profile
ODWEK 10.1 StoreDocument API to return Unique Document ID
« on: February 10, 2021, 05:00:12 AM »
We are using CMOD 10.1. In our Java application we use ODWEK API's (10.1.0.6) to archive individual documents in CMOD (OnDemand server version is 10.1.0.5). In the applications we defined a field as Unique Document ID, which is auto-generated (server-side) when a document gets archived. We want to use that ID (as response) so our workflow can retrieve the archived document with the Unique ID. We can verify manually with the OnDemand client that the generation of this ID is successful. However, we would expect the ODHit that is returned by the call to ODFolder.storeDocument() to also contain this generated ID. Instead, what we see is that the value for this field is empty (the field exists though). Does someone know if there is a certain logic behind why the returned ODHit is incomplete? Maybe we overlooked some (ODWEK- or server-side) configuration in relation to such fields?

spond

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: ODWEK 10.1 StoreDocument API to return Unique Document ID
« Reply #1 on: February 10, 2021, 07:33:07 AM »
I see this in the ODWEK Java docs for 10.5.

NOTE: If the Application Group contains fields for which the value is not provided by this call -for example, 'Unique Id' or 'Hash SHA-256' fields - but rather generated on the server when the document is stored, the ODHit returned by this method will not contain the server generated values. In order to access those values, a new query should be performed.

I don't see that update in the 10.1 ODWEK Javadocs, but it applies to both versions.

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 1993
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: ODWEK 10.1 StoreDocument API to return Unique Document ID
« Reply #2 on: February 10, 2021, 07:39:08 AM »
Yup, this is consistent with my experience -- in order to get the benefits of the new features, you need to reload historical data to get CMOD Unique Document ID's, Document Hashes, and to enable OnDemand Encryption for data at rest.

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

spond

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: ODWEK 10.1 StoreDocument API to return Unique Document ID
« Reply #3 on: February 10, 2021, 08:02:03 AM »
To clarify ...

WietzeW is referring to the actual ODHit returned by the storeDocument operation during execution. What is returned there does not contain the server-generated values (refer to the 10.5 Javadocs I mentioned earlier), however, those server generated values exist in the AG row (database) that is stored for that document. A new *query* is required to access those values programmatically after the document is stored.

JD, what you're referring to is legacy data that was added to an AG that didn't have a Unique Id/Doc Hash field when it was stored (although you are correct, legacy rows are not auto-populated with server generated values).

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 1993
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: ODWEK 10.1 StoreDocument API to return Unique Document ID
« Reply #4 on: February 10, 2021, 08:41:23 AM »
Awesome, thanks for the clarification!  :)

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

WietzeW

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: ODWEK 10.1 StoreDocument API to return Unique Document ID
« Reply #5 on: February 11, 2021, 12:52:04 AM »
oke, so I'll have to use two steps to get the Unique ID
Thanks for your quick answers!

Jens Hildebrandt

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • 10m GmbH
Re: ODWEK 10.1 StoreDocument API to return Unique Document ID
« Reply #6 on: February 16, 2021, 06:43:35 AM »
As i know the doc-id returned from the API is not unique. Maybe for the moment when you query the document. But if the storage location changes the docid will change.

rjrussel

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: ODWEK 10.1 StoreDocument API to return Unique Document ID
« Reply #7 on: February 16, 2021, 08:36:39 AM »
OnDemand now has the ability to create and store a Unique ID with each hit. The is a 36-byte generated and stored at load time. That is what the  original question was referring to.

-Thanks


Jens Hildebrandt

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • 10m GmbH
Re: ODWEK 10.1 StoreDocument API to return Unique Document ID
« Reply #8 on: February 16, 2021, 03:14:47 PM »
Is this unique at all or only within an instance? And is i possible to generate it for old documents if you extend an existing applicationgroup with that field?