diff --git a/src/main/java/dev/dsf/bpe/CodeSystem.java b/src/main/java/dev/dsf/bpe/CodeSystem.java index 1d618af9..bfaa0e82 100644 --- a/src/main/java/dev/dsf/bpe/CodeSystem.java +++ b/src/main/java/dev/dsf/bpe/CodeSystem.java @@ -387,6 +387,10 @@ public enum Concept "send-message-http-502", "Sending a message to the remote instance resulted in HTTP status 502" ), + SEND_MESSAGE_HTTP_503( + "send-message-http-503", + "Sending a message to the remote instance resulted in HTTP status 503" + ), SEND_MESSAGE_HTTP_504( "send-message-http-504", "Sending a message to the remote instance resulted in HTTP status 504" @@ -432,6 +436,10 @@ public enum Concept "receive-message-http-502", "Received a message and responded with HTTP status 502" ), + RECEIVE_MESSAGE_HTTP_503( + "receive-message-http-503", + "Received a message and responded with HTTP status 503" + ), RECEIVE_MESSAGE_HTTP_504( "receive-message-http-504", "Received a message and responded with HTTP status 504" @@ -485,6 +493,10 @@ public enum Concept "local-binary-delete-http-502", "Local instance encountered a HTTP status 502 trying to clean up the binary resource" ), + LOCAL_BINARY_DELETE_HTTP_503( + "local-binary-delete-http-503", + "Local instance encountered a HTTP status 503 trying to clean up the binary resource" + ), LOCAL_BINARY_DELETE_HTTP_504( "local-binary-delete-http-504", "Local instance encountered a HTTP status 504 trying to clean up the binary resource" @@ -522,6 +534,10 @@ public enum Concept "remote-binary-delete-http-502", "Remote instance encountered a HTTP status 502 trying to clean up the binary resource" ), + REMOTE_BINARY_DELETE_HTTP_503( + "remote-binary-delete-http-503", + "Remote instance encountered a HTTP status 503 trying to clean up the binary resource" + ), REMOTE_BINARY_DELETE_HTTP_504( "remote-binary-delete-http-504", "Remote instance encountered a HTTP status 504 trying to clean up the binary resource" @@ -551,6 +567,10 @@ public enum Concept "local-binary-post-http-502", "Local instance encountered a HTTP status 502 trying to post the binary resource to its own FHIR server" ), + LOCAL_BINARY_POST_HTTP_503( + "local-binary-post-http-503", + "Local instance encountered a HTTP status 503 trying to post the binary resource to its own FHIR server" + ), LOCAL_BINARY_POST_HTTP_504( "local-binary-post-http-504", "Local instance encountered a HTTP status 504 trying to post the binary resource to its own FHIR server" @@ -592,6 +612,10 @@ public enum Concept "remote-binary-post-http-502", "Remote instance encountered a HTTP status 502 trying to post the binary resource to its own FHIR server" ), + REMOTE_BINARY_POST_HTTP_503( + "remote-binary-post-http-503", + "Remote instance encountered a HTTP status 503 trying to post the binary resource to its own FHIR server" + ), REMOTE_BINARY_POST_HTTP_504( "remote-binary-post-http-504", "Remote instance encountered a HTTP status 504 trying to post the binary resource to its own FHIR server" @@ -650,6 +674,10 @@ public enum Concept "response-message-timeout-http-502", "Response message timed out. Received HTTP status 502 trying to check request status on the target" ), + RESPONSE_MESSAGE_TIMEOUT_HTTP_503( + "response-message-timeout-http-503", + "Response message timed out. Received HTTP status 503 trying to check request status on the target" + ), RESPONSE_MESSAGE_TIMEOUT_HTTP_504( "response-message-timeout-http-504", "Response message timed out. Received HTTP status 504 trying to check request status on the target" @@ -684,6 +712,10 @@ public enum Concept "local-binary-download-http-502", "Local instance received HTTP status 502 trying to download the binary resource from the target" ), + LOCAL_BINARY_DOWNLOAD_HTTP_503( + "local-binary-download-http-503", + "Local instance received HTTP status 503 trying to download the binary resource from the target" + ), LOCAL_BINARY_DOWNLOAD_HTTP_504( "local-binary-download-http-504", "Local instance received HTTP status 504 trying to download the binary resource from the target" @@ -729,6 +761,10 @@ public enum Concept "remote-binary-download-http-502", "Remote instance received HTTP status 502 trying to download the binary resource from this server" ), + REMOTE_BINARY_DOWNLOAD_HTTP_503( + "remote-binary-download-http-503", + "Remote instance received HTTP status 503 trying to download the binary resource from this server" + ), REMOTE_BINARY_DOWNLOAD_HTTP_504( "remote-binary-download-http-504", "Remote instance received HTTP status 504 trying to download the binary resource from this server" diff --git a/src/main/java/dev/dsf/bpe/service/Cleanup.java b/src/main/java/dev/dsf/bpe/service/Cleanup.java index b9c64990..8fe60092 100644 --- a/src/main/java/dev/dsf/bpe/service/Cleanup.java +++ b/src/main/java/dev/dsf/bpe/service/Cleanup.java @@ -142,6 +142,10 @@ private ProcessError toProcessError(WebApplicationException e, String process) ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP); case 502 -> new ProcessError(process, CodeSystem.DsfPingError.Concept.LOCAL_BINARY_DELETE_HTTP_502, ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP); + case 503 -> new ProcessError(process, CodeSystem.DsfPingError.Concept.LOCAL_BINARY_DELETE_HTTP_503, + ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP); + case 504 -> new ProcessError(process, CodeSystem.DsfPingError.Concept.LOCAL_BINARY_DELETE_HTTP_504, + ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP); default -> new ProcessError(process, CodeSystem.DsfPingError.Concept.LOCAL_BINARY_DELETE_HTTP_UNEXPECTED, null); }; diff --git a/src/main/java/dev/dsf/bpe/service/GenerateAndStoreResource.java b/src/main/java/dev/dsf/bpe/service/GenerateAndStoreResource.java index ebf39e90..c7168a38 100644 --- a/src/main/java/dev/dsf/bpe/service/GenerateAndStoreResource.java +++ b/src/main/java/dev/dsf/bpe/service/GenerateAndStoreResource.java @@ -111,6 +111,12 @@ public void doExecuteWithErrorHandling(DelegateExecution delegateExecution, Vari errorRemote = new ProcessError(process, CodeSystem.DsfPingError.Concept.REMOTE_BINARY_POST_HTTP_502, ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP); break; + case 503: + error = new ProcessError(process, CodeSystem.DsfPingError.Concept.LOCAL_BINARY_POST_HTTP_503, + ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP); + errorRemote = new ProcessError(process, CodeSystem.DsfPingError.Concept.REMOTE_BINARY_POST_HTTP_503, + ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP); + break; case 504: error = new ProcessError(process, CodeSystem.DsfPingError.Concept.LOCAL_BINARY_POST_HTTP_504, ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP); diff --git a/src/main/java/dev/dsf/bpe/service/ping/CheckPingTaskStatus.java b/src/main/java/dev/dsf/bpe/service/ping/CheckPingTaskStatus.java index 6dc55e8f..c4031823 100644 --- a/src/main/java/dev/dsf/bpe/service/ping/CheckPingTaskStatus.java +++ b/src/main/java/dev/dsf/bpe/service/ping/CheckPingTaskStatus.java @@ -97,6 +97,12 @@ private static ProcessError getProcessError(WebApplicationException e) case 502 -> new ProcessError(ConstantsPing.PROCESS_NAME_PING, CodeSystem.DsfPingError.Concept.RESPONSE_MESSAGE_TIMEOUT_HTTP_502, ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP); + case 503 -> new ProcessError(ConstantsPing.PROCESS_NAME_PING, + CodeSystem.DsfPingError.Concept.RESPONSE_MESSAGE_TIMEOUT_HTTP_503, + ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP); + case 504 -> new ProcessError(ConstantsPing.PROCESS_NAME_PING, + CodeSystem.DsfPingError.Concept.RESPONSE_MESSAGE_TIMEOUT_HTTP_504, + ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP); default -> new ProcessError(ConstantsPing.PROCESS_NAME_PING, CodeSystem.DsfPingError.Concept.RESPONSE_MESSAGE_TIMEOUT_HTTP_UNEXPECTED, ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP); diff --git a/src/main/java/dev/dsf/bpe/util/BinaryResourceDownloader.java b/src/main/java/dev/dsf/bpe/util/BinaryResourceDownloader.java index 5777d4ad..c40fd9c6 100644 --- a/src/main/java/dev/dsf/bpe/util/BinaryResourceDownloader.java +++ b/src/main/java/dev/dsf/bpe/util/BinaryResourceDownloader.java @@ -127,6 +127,13 @@ public DownloadResult download(Variables variables, ProcessPluginApi api, Task t CodeSystem.DsfPingError.Concept.REMOTE_BINARY_DOWNLOAD_HTTP_502, ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP); break; + case 503: + error = new ProcessError(process, CodeSystem.DsfPingError.Concept.LOCAL_BINARY_DOWNLOAD_HTTP_503, + ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP); + errorRemote = new ProcessError(process, + CodeSystem.DsfPingError.Concept.REMOTE_BINARY_DOWNLOAD_HTTP_503, + ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP); + break; case 504: error = new ProcessError(process, CodeSystem.DsfPingError.Concept.LOCAL_BINARY_DOWNLOAD_HTTP_504, ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP); diff --git a/src/main/java/dev/dsf/bpe/util/task/SendTaskErrorConverter.java b/src/main/java/dev/dsf/bpe/util/task/SendTaskErrorConverter.java index 0fac4f4d..41b84a99 100644 --- a/src/main/java/dev/dsf/bpe/util/task/SendTaskErrorConverter.java +++ b/src/main/java/dev/dsf/bpe/util/task/SendTaskErrorConverter.java @@ -314,6 +314,11 @@ yield new ProcessErrorWithStatusCode( CodeSystem.DsfPingError.Concept.SEND_MESSAGE_HTTP_502, ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP), CodeSystem.DsfPingStatus.Code.NOT_REACHABLE); + case 503 -> new ProcessErrorWithStatusCode( + new ProcessError(ConstantsPing.PROCESS_NAME_PING, + CodeSystem.DsfPingError.Concept.SEND_MESSAGE_HTTP_503, + ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP), + CodeSystem.DsfPingStatus.Code.NOT_REACHABLE); case 504 -> new ProcessErrorWithStatusCode( new ProcessError(ConstantsPing.PROCESS_NAME_PING, CodeSystem.DsfPingError.Concept.SEND_MESSAGE_HTTP_504, @@ -359,6 +364,11 @@ yield new ProcessErrorWithStatusCode( CodeSystem.DsfPingError.Concept.RECEIVE_MESSAGE_HTTP_502, ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP), CodeSystem.DsfPingStatus.Code.NOT_REACHABLE); + case 503 -> new ProcessErrorWithStatusCode( + new ProcessError(ConstantsPing.PROCESS_NAME_PING, + CodeSystem.DsfPingError.Concept.RECEIVE_MESSAGE_HTTP_503, + ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP), + CodeSystem.DsfPingStatus.Code.NOT_REACHABLE); case 504 -> new ProcessErrorWithStatusCode( new ProcessError(ConstantsPing.PROCESS_NAME_PING, CodeSystem.DsfPingError.Concept.RECEIVE_MESSAGE_HTTP_504, @@ -397,6 +407,11 @@ else if (ConstantsPing.PROCESS_NAME_PONG.equals(process)) CodeSystem.DsfPingError.Concept.SEND_MESSAGE_HTTP_502, ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP), CodeSystem.DsfPingStatus.Code.NOT_REACHABLE); + case 503 -> new ProcessErrorWithStatusCode( + new ProcessError(ConstantsPing.PROCESS_NAME_PONG, + CodeSystem.DsfPingError.Concept.SEND_MESSAGE_HTTP_503, + ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP), + CodeSystem.DsfPingStatus.Code.NOT_REACHABLE); case 504 -> new ProcessErrorWithStatusCode( new ProcessError(ConstantsPing.PROCESS_NAME_PONG, CodeSystem.DsfPingError.Concept.SEND_MESSAGE_HTTP_504, @@ -429,6 +444,11 @@ else if (ConstantsPing.PROCESS_NAME_PONG.equals(process)) CodeSystem.DsfPingError.Concept.RECEIVE_MESSAGE_HTTP_502, ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP), CodeSystem.DsfPingStatus.Code.NOT_REACHABLE); + case 503 -> new ProcessErrorWithStatusCode( + new ProcessError(ConstantsPing.PROCESS_NAME_PONG, + CodeSystem.DsfPingError.Concept.RECEIVE_MESSAGE_HTTP_503, + ConstantsPing.POTENTIAL_FIX_URL_ERROR_HTTP), + CodeSystem.DsfPingStatus.Code.NOT_REACHABLE); case 504 -> new ProcessErrorWithStatusCode( new ProcessError(ConstantsPing.PROCESS_NAME_PONG, CodeSystem.DsfPingError.Concept.RECEIVE_MESSAGE_HTTP_504, diff --git a/src/main/resources/fhir/CodeSystem/dsf-ping-error.xml b/src/main/resources/fhir/CodeSystem/dsf-ping-error.xml index db18184a..93913e74 100644 --- a/src/main/resources/fhir/CodeSystem/dsf-ping-error.xml +++ b/src/main/resources/fhir/CodeSystem/dsf-ping-error.xml @@ -41,6 +41,10 @@ + + + + @@ -87,6 +91,10 @@ + + + + @@ -140,6 +148,10 @@ + + + + @@ -177,6 +189,10 @@ + + + + @@ -206,6 +222,10 @@ + + + + @@ -247,6 +267,10 @@ + + + + @@ -305,6 +329,10 @@ + + + + @@ -339,6 +367,10 @@ + + + + @@ -384,6 +416,10 @@ + + + +