Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import static de.netzwerk_universitaetsmedizin.codex.processes.data_transfer.ConstantsDataTransfer.BPMN_EXECUTION_VARIABLE_CONTINUE_STATUS;
import static de.netzwerk_universitaetsmedizin.codex.processes.data_transfer.ConstantsDataTransfer.CODESYSTEM_NUM_CODEX_DATA_TRANSFER_ERROR_VALUE_INSERT_INTO_CRR_FHIR_REPOSITORY_FAILED;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

import org.camunda.bpm.engine.delegate.BpmnError;
Expand Down Expand Up @@ -57,6 +59,7 @@ protected void doExecute(DelegateExecution execution, Variables variables) throw
dataLogger.logData("Received bundle", bundle);

dataClientFactory.getDataStoreClient().getFhirClient().storeBundle(bundle);
logger.info("stored bundle with entries: {}", entryIdsToList(bundle));

execution.setVariable(BPMN_EXECUTION_VARIABLE_CONTINUE_STATUS, ContinueStatus.SUCCESS);
}
Expand All @@ -74,4 +77,20 @@ protected void doExecute(DelegateExecution execution, Variables variables) throw
"Unable to insert data into CRR");
}
}

private List<String> entryIdsToList(Bundle bundle)
{
List<String> entryIds = new ArrayList<>();

for (Bundle.BundleEntryComponent entry : bundle.getEntry())
{
String fullUrl = entry.getFullUrl();
if (fullUrl != null && !fullUrl.isEmpty())
{
entryIds.add(fullUrl);
}
}

return entryIds;
}
}