From 2847edd04a56fe29f1b01e80fc88ec0eccb76d88 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Thu, 15 Feb 2018 17:38:29 -0500 Subject: [PATCH] Correct subscription read before send --- .../jpa/subscription/BaseSubscriptionDeliverySubscriber.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionDeliverySubscriber.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionDeliverySubscriber.java index a9fc82cab76..edb85628b86 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionDeliverySubscriber.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/BaseSubscriptionDeliverySubscriber.java @@ -58,7 +58,7 @@ public abstract class BaseSubscriptionDeliverySubscriber extends BaseSubscriptio // useful for resources created in a transaction, since they // can have placeholder IDs in them. IIdType payloadId = msg.getPayloadId(getContext()); - Class type = Class.forName(payloadId.getResourceType()); + Class type = getContext().getResourceDefinition(payloadId.getResourceType()).getImplementingClass(); IFhirResourceDao dao = getSubscriptionDao().getDao(type); IBaseResource loadedPayload = dao.read(payloadId); msg.setPayload(getContext(), loadedPayload);