From ac999deea29d01ae4d89e8185f71c18f40e73f39 Mon Sep 17 00:00:00 2001 From: rishikrsharma Date: Thu, 31 Oct 2024 20:16:10 +0000 Subject: [PATCH] DTSCCI-1093 adding log messages (#5755) --- .../GenerateCUIResponseSealedFormCallBackHandler.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/uk/gov/hmcts/reform/civil/handler/callback/camunda/docmosis/GenerateCUIResponseSealedFormCallBackHandler.java b/src/main/java/uk/gov/hmcts/reform/civil/handler/callback/camunda/docmosis/GenerateCUIResponseSealedFormCallBackHandler.java index 548a6764b85..2e19b2dbe7a 100644 --- a/src/main/java/uk/gov/hmcts/reform/civil/handler/callback/camunda/docmosis/GenerateCUIResponseSealedFormCallBackHandler.java +++ b/src/main/java/uk/gov/hmcts/reform/civil/handler/callback/camunda/docmosis/GenerateCUIResponseSealedFormCallBackHandler.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import uk.gov.hmcts.reform.ccd.client.model.AboutToStartOrSubmitCallbackResponse; @@ -33,6 +34,7 @@ import static uk.gov.hmcts.reform.civil.callback.CaseEvent.GENERATE_RESPONSE_CUI_SEALED; import static uk.gov.hmcts.reform.civil.documentmanagement.model.DocumentType.DEFENDANT_DEFENCE; +@Slf4j @Service @RequiredArgsConstructor public class GenerateCUIResponseSealedFormCallBackHandler extends CallbackHandler { @@ -64,14 +66,20 @@ public List handledEvents() { private CallbackResponse prepareSealedForm(CallbackParams callbackParams) { CaseData caseData = callbackParams.getCaseData(); + log.info("GENERATE_RESPONSE_CUI_SEALED for case {}", caseData.getCcdCaseReference()); CaseDocument sealedForm = formGenerator.generate( caseData, callbackParams.getParams().get(BEARER_TOKEN).toString() ); + log.info("sealedForm {} for case {}", sealedForm, caseData.getCcdCaseReference()); CaseData.CaseDataBuilder caseDataBuilder = caseData.toBuilder(); + log.info("isLipvLipOneVOne {} isLipVLipEnabled {} for case {}", caseData.isLipvLipOneVOne(), + featureToggleService.isLipVLipEnabled(), caseData.getCcdCaseReference()); if (stitchEnabled && caseData.isLipvLipOneVOne() && featureToggleService.isLipVLipEnabled()) { + log.info("if condition for case {}", caseData.getCcdCaseReference()); List documentMetaDataList = fetchDocumentsToStitch(caseData, sealedForm); if (documentMetaDataList.size() > 1) { + log.info("documentMetaDataList {} for case {}", documentMetaDataList.size(), caseData.getCcdCaseReference()); CaseDocument stitchedDocument = civilDocumentStitchingService.bundle( documentMetaDataList, callbackParams.getParams().get(CallbackParams.Params.BEARER_TOKEN).toString(), @@ -79,7 +87,7 @@ private CallbackResponse prepareSealedForm(CallbackParams callbackParams) { sealedForm.getDocumentName(), caseData ); - + log.info("stitchedDocument {} for case {}", stitchedDocument, caseData.getCcdCaseReference()); CaseDocument updatedStitchedDoc = stitchedDocument.toBuilder().documentType(DEFENDANT_DEFENCE).build(); caseDataBuilder.respondent1ClaimResponseDocumentSpec(updatedStitchedDoc) .systemGeneratedCaseDocuments(systemGeneratedDocumentService.getSystemGeneratedDocumentsWithAddedDocument( @@ -89,6 +97,7 @@ private CallbackResponse prepareSealedForm(CallbackParams callbackParams) { assignCategoryId.assignCategoryIdToCaseDocument(stitchedDocument, DocCategory.DEF1_DEFENSE_DQ.getValue()); } } else { + log.info("Else sealedForm {} condition for case {}", sealedForm, caseData.getCcdCaseReference()); caseDataBuilder.respondent1ClaimResponseDocumentSpec(sealedForm) .systemGeneratedCaseDocuments(systemGeneratedDocumentService.getSystemGeneratedDocumentsWithAddedDocument( sealedForm,