From e5451f74d6d1f387ecb78d4a1ef449cb004efd2d Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Tue, 13 Nov 2018 17:22:12 -0800 Subject: [PATCH] DRYD-540: Partial fix for qualifying a document type when looking up its Nuxeo lifecyle. --- .../nuxeo/client/java/DocumentModelHandler.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocumentModelHandler.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocumentModelHandler.java index 3f87b3e9c..c5970e51c 100644 --- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocumentModelHandler.java +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocumentModelHandler.java @@ -100,15 +100,22 @@ public abstract class DocumentModelHandler String docTypeName = null; try { - docTypeName = this.getServiceContext().getDocumentType(); + docTypeName = this.getServiceContext().getTenantQualifiedDoctype(); result = getLifecycle(docTypeName); + if (result == null) { + // + // Get the lifecycle of the generic type if one for the tenant qualified type doesn't exist + // + docTypeName = this.getServiceContext().getDocumentType(); + result = getLifecycle(docTypeName); + } } catch (Exception e) { if (logger.isTraceEnabled() == true) { logger.trace("Could not retrieve lifecycle definition for Nuxeo doctype: " + docTypeName); } } - return result; + return result; } /* -- 2.47.3