Hi,
We are using OpenText TCP 10.0.1. We have configured below logical archives for the storing documents.
OI: For documents migrated from old application.
DB: For new documents uploaded by user from new application.
INT: For documents which are older than 1 year.
We have a requirement that if the documents are older than 1 year then move them to INT archive. So we need to move the documents from archives OI and DB to INT if they are older than 1 year.
We are using OpenText TCP context server APIs for implementing this functionality. Below is the code snippet.
DmsServiceFactory serviceFactory = DmsServiceFactory.getInstance();
DmsService service = serviceFactory.connect(
clientele,
domain,
user,
password,
protocol,
initialServerURLs
);
Entity entity = entityHelper.retreiveEntity(entityId, service);
System.out.println("entity.getArchiveId()= "+entity.getArchiveId());
entity.setArchiveId( "INT" );
service.commit(entity);
But we are getting below error when we are trying to set the archive id for the document.
ixos.dms.ConstraintException: (DMS:010014) The property Archive id (ixos.dms:ArchiveId) is not writable!
at ixos.dms.data.check.impl.BasicPropertyChecker.checkSetProperty(BasicPropertyChecker.java:793)
at ixos.dms.data.check.CheckerFactory.executeCheckSetProperty(CheckerFactory.java:1228)
at ixos.dms.impl.EntityImpl.executeCheckSetProperty(EntityImpl.java:2697)
at ixos.dms.impl.EntityImpl.checkSetProperty(EntityImpl.java:2507)
at ixos.dms.impl.EntityImpl.checkSetProperty(EntityImpl.java:2516)
at ixos.dms.impl.PropertySetImpl.setProperty(PropertySetImpl.java:382)
at ixos.dms.impl.EntityImpl.setProperty(EntityImpl.java:2425)
at ixos.dms.impl.EntityImpl.setArchiveId(EntityImpl.java:293)
at com.db.opentext.webservices.handler.DocumentHandler.viewDocument(DocumentHandler.java:222)
at sample.Test_WebService.viewDoc(Test_WebService.java:173)
at sample.Test_WebService.main(Test_WebService.java:51)
To resolve this issue we tried to modify the attributes of ixos.dms:ArchiveId property in TCP modeler as shown in attached diagram. But we couldn’t change these properties as those are disabled.
We have below questions:
- Is it possible to move documents from one archive to another?
- Could you please let us know if code snippet is correct for moving the documents from one archive to another?
- Will setting the Accessibility=Writeable solve our purpose? How to enable this property in TCP Modeler?
- If the code snippet is not right then please provide your suggestions on how to implement it?
Quick response on this would be appreciated.