06-26-2018 07:28 AM
Here i am getting docs value empty can anyone help me please.....PFB code.
public void run() throws NuxeoException { String tenantDocumentPath = getOrCreateCPODocTypesForGlobalUsageMangementDoc(tenantId, session).toString(); DocumentModelList docs = session.query(String.format( "Select * from FlexibleDocType where %s = '%s' AND ecm:path STARTSWITH '%s'", CPO_FLEXIBLE_DOC_TYPE_ID_PROPERTY, fmDocTypeId, tenantDocumentPath)); if (docs.size() == 0) { throw new NuxeoException("Can not fetch fm doc type with id: " + fmDocTypeId); } if (docs.size() > 1) { log.error("More than one fm doc type found for the id: " + fmDocTypeId + " .This must be fixed"); }
fmDocType = docs.get(0);
fmDocType.detach(true);
}