Skip to content
Merged
Show file tree
Hide file tree
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
36 changes: 36 additions & 0 deletions src/main/java/dev/dsf/bpe/CodeSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/dev/dsf/bpe/service/Cleanup.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/dev/dsf/bpe/util/BinaryResourceDownloader.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/dev/dsf/bpe/util/task/SendTaskErrorConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
36 changes: 36 additions & 0 deletions src/main/resources/fhir/CodeSystem/dsf-ping-error.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
<code value="send-message-http-502"/>
<display value="Sending a message to the remote instance resulted in HTTP status 502"/>
</concept>
<concept>
<code value="send-message-http-503"/>
<display value="Sending a message to the remote instance resulted in HTTP status 503"/>
</concept>
<concept>
<code value="send-message-http-504"/>
<display value="Sending a message to the remote instance resulted in HTTP status 504"/>
Expand Down Expand Up @@ -87,6 +91,10 @@
<code value="receive-message-http-502"/>
<display value="Received a message and responded with HTTP status 502"/>
</concept>
<concept>
<code value="receive-message-http-503"/>
<display value="Received a message and responded with HTTP status 503"/>
</concept>
<concept>
<code value="receive-message-http-504"/>
<display value="Received a message and responded with HTTP status 504"/>
Expand Down Expand Up @@ -140,6 +148,10 @@
<code value="local-binary-delete-http-502"/>
<display value="Local instance encountered a HTTP status 502 trying to clean up the binary resource"/>
</concept>
<concept>
<code value="local-binary-delete-http-503"/>
<display value="Local instance encountered a HTTP status 503 trying to clean up the binary resource"/>
</concept>
<concept>
<code value="local-binary-delete-http-504"/>
<display value="Local instance encountered a HTTP status 504 trying to clean up the binary resource"/>
Expand Down Expand Up @@ -177,6 +189,10 @@
<code value="remote-binary-delete-http-502"/>
<display value="Remote instance encountered a HTTP status 502 trying to clean up the binary resource"/>
</concept>
<concept>
<code value="remote-binary-delete-http-503"/>
<display value="Remote instance encountered a HTTP status 503 trying to clean up the binary resource"/>
</concept>
<concept>
<code value="remote-binary-delete-http-504"/>
<display value="Remote instance encountered a HTTP status 504 trying to clean up the binary resource"/>
Expand Down Expand Up @@ -206,6 +222,10 @@
<code value="local-binary-post-http-502"/>
<display value="Local instance encountered a HTTP status 502 trying to post the binary resource to its own FHIR server"/>
</concept>
<concept>
<code value="local-binary-post-http-503"/>
<display value="Local instance encountered a HTTP status 503 trying to post the binary resource to its own FHIR server"/>
</concept>
<concept>
<code value="local-binary-post-http-504"/>
<display value="Local instance encountered a HTTP status 504 trying to post the binary resource to its own FHIR server"/>
Expand Down Expand Up @@ -247,6 +267,10 @@
<code value="remote-binary-post-http-502"/>
<display value="Remote instance encountered a HTTP status 502 trying to post the binary resource to its own FHIR server"/>
</concept>
<concept>
<code value="remote-binary-post-http-503"/>
<display value="Remote instance encountered a HTTP status 503 trying to post the binary resource to its own FHIR server"/>
</concept>
<concept>
<code value="remote-binary-post-http-504"/>
<display value="Remote instance encountered a HTTP status 504 trying to post the binary resource to its own FHIR server"/>
Expand Down Expand Up @@ -305,6 +329,10 @@
<code value="response-message-timeout-http-502"/>
<display value="Response message timed out. Received HTTP status 502 trying to check request status on the target"/>
</concept>
<concept>
<code value="response-message-timeout-http-503"/>
<display value="Response message timed out. Received HTTP status 503 trying to check request status on the target"/>
</concept>
<concept>
<code value="response-message-timeout-http-504"/>
<display value="Response message timed out. Received HTTP status 504 trying to check request status on the target"/>
Expand Down Expand Up @@ -339,6 +367,10 @@
<code value="local-binary-download-http-502"/>
<display value="Local instance received HTTP status 502 trying to download the binary resource from the target"/>
</concept>
<concept>
<code value="local-binary-download-http-503"/>
<display value="Local instance received HTTP status 503 trying to download the binary resource from the target"/>
</concept>
<concept>
<code value="local-binary-download-http-504"/>
<display value="Local instance received HTTP status 504 trying to download the binary resource from the target"/>
Expand Down Expand Up @@ -384,6 +416,10 @@
<code value="remote-binary-download-http-502"/>
<display value="Remote instance received HTTP status 502 trying to download the binary resource from this server"/>
</concept>
<concept>
<code value="remote-binary-download-http-503"/>
<display value="Remote instance received HTTP status 503 trying to download the binary resource from this server"/>
</concept>
<concept>
<code value="remote-binary-download-http-504"/>
<display value="Remote instance received HTTP status 504 trying to download the binary resource from this server"/>
Expand Down
Loading