diff --git a/pom.xml b/pom.xml
index 8fa8b17..180ae42 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
dev.dsf
dsf-process-ping-pong
- 1.0.0.0-SNAPSHOT
+ 1.0.1.0-SNAPSHOT
jar
@@ -13,7 +13,7 @@
17
17
- 1.0.0
+ 1.2.0-RC1
../dsf
diff --git a/src/main/java/dev/dsf/bpe/PingProcessPluginDefinition.java b/src/main/java/dev/dsf/bpe/PingProcessPluginDefinition.java
index 9761df6..1cf39ba 100644
--- a/src/main/java/dev/dsf/bpe/PingProcessPluginDefinition.java
+++ b/src/main/java/dev/dsf/bpe/PingProcessPluginDefinition.java
@@ -10,8 +10,8 @@
public class PingProcessPluginDefinition implements ProcessPluginDefinition
{
- public static final String VERSION = "1.0.0.0";
- public static final LocalDate RELEASE_DATE = LocalDate.of(2023, 5, 20);
+ public static final String VERSION = "1.0.1.0";
+ public static final LocalDate RELEASE_DATE = LocalDate.of(2023, 9, 5);
@Override
public String getName()
diff --git a/src/main/java/dev/dsf/bpe/listener/SetCorrelationKeyListener.java b/src/main/java/dev/dsf/bpe/listener/SetCorrelationKeyListener.java
new file mode 100644
index 0000000..5208928
--- /dev/null
+++ b/src/main/java/dev/dsf/bpe/listener/SetCorrelationKeyListener.java
@@ -0,0 +1,37 @@
+package dev.dsf.bpe.listener;
+
+import java.util.Objects;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.ExecutionListener;
+import org.springframework.beans.factory.InitializingBean;
+
+import dev.dsf.bpe.v1.ProcessPluginApi;
+import dev.dsf.bpe.v1.constants.BpmnExecutionVariables;
+import dev.dsf.bpe.v1.variables.Target;
+import dev.dsf.bpe.v1.variables.Variables;
+
+public class SetCorrelationKeyListener implements ExecutionListener, InitializingBean
+{
+ private final ProcessPluginApi api;
+
+ public SetCorrelationKeyListener(ProcessPluginApi api)
+ {
+ this.api = api;
+ }
+
+ @Override
+ public void afterPropertiesSet() throws Exception
+ {
+ Objects.requireNonNull(api, "api");
+ }
+
+ @Override
+ public void notify(DelegateExecution execution) throws Exception
+ {
+ Variables variables = api.getVariables(execution);
+ Target target = variables.getTarget();
+
+ execution.setVariableLocal(BpmnExecutionVariables.CORRELATION_KEY, target.getCorrelationKey());
+ }
+}
diff --git a/src/main/java/dev/dsf/bpe/message/SendPing.java b/src/main/java/dev/dsf/bpe/message/SendPing.java
index 0e87717..421fc17 100644
--- a/src/main/java/dev/dsf/bpe/message/SendPing.java
+++ b/src/main/java/dev/dsf/bpe/message/SendPing.java
@@ -1,6 +1,5 @@
package dev.dsf.bpe.message;
-import java.util.Objects;
import java.util.stream.Stream;
import org.camunda.bpm.engine.delegate.DelegateExecution;
@@ -11,35 +10,18 @@
import org.hl7.fhir.r4.model.Task.ParameterComponent;
import dev.dsf.bpe.ConstantsPing;
-import dev.dsf.bpe.mail.ErrorMailService;
-import dev.dsf.bpe.util.PingStatusGenerator;
import dev.dsf.bpe.v1.ProcessPluginApi;
import dev.dsf.bpe.v1.activity.AbstractTaskMessageSend;
-import dev.dsf.bpe.v1.variables.Target;
import dev.dsf.bpe.v1.variables.Variables;
import jakarta.ws.rs.WebApplicationException;
import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.Response.StatusType;
public class SendPing extends AbstractTaskMessageSend
{
- private final PingStatusGenerator statusGenerator;
- private final ErrorMailService errorMailService;
-
- public SendPing(ProcessPluginApi api, PingStatusGenerator statusGenerator, ErrorMailService errorMailService)
+ public SendPing(ProcessPluginApi api)
{
super(api);
-
- this.statusGenerator = statusGenerator;
- this.errorMailService = errorMailService;
- }
-
- @Override
- public void afterPropertiesSet() throws Exception
- {
- super.afterPropertiesSet();
-
- Objects.requireNonNull(statusGenerator, "statusGenerator");
- Objects.requireNonNull(errorMailService, "errorMailService");
}
@Override
@@ -51,36 +33,17 @@ protected Stream getAdditionalInputParameters(DelegateExecut
}
@Override
- protected void handleSendTaskError(DelegateExecution execution, Variables variables, Exception exception,
- String errorMessage)
+ protected void handleIntermediateThrowEventError(DelegateExecution execution, Variables variables,
+ Exception exception, String errorMessage)
{
- Target target = variables.getTarget();
- Task mainTask = variables.getStartTask();
-
- if (mainTask != null)
- {
- String statusCode = ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_NOT_REACHABLE;
- if (exception instanceof WebApplicationException webApplicationException)
- {
- if (webApplicationException.getResponse() != null && webApplicationException.getResponse()
- .getStatus() == Response.Status.FORBIDDEN.getStatusCode())
- {
- statusCode = ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_NOT_ALLOWED;
- }
- }
-
- String specialErrorMessage = createErrorMessage(exception);
-
- mainTask.addOutput(statusGenerator.createPingStatusOutput(target, statusCode, specialErrorMessage));
- variables.updateTask(mainTask);
-
- if (ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_NOT_REACHABLE.equals(statusCode))
- errorMailService.endpointNotReachableForPing(mainTask.getIdElement(), target, specialErrorMessage);
- else if (ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_NOT_ALLOWED.equals(statusCode))
- errorMailService.endpointReachablePingForbidden(mainTask.getIdElement(), target, specialErrorMessage);
- }
-
- super.handleSendTaskError(execution, variables, exception, errorMessage);
+ String statusCode = exception instanceof WebApplicationException w && w.getResponse() != null
+ && w.getResponse().getStatus() == Response.Status.FORBIDDEN.getStatusCode()
+ ? ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_NOT_ALLOWED
+ : ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_NOT_REACHABLE;
+ execution.setVariableLocal("statusCode", statusCode);
+
+ String specialErrorMessage = createErrorMessage(exception);
+ execution.setVariableLocal("errorMessage", specialErrorMessage);
}
@Override
@@ -91,10 +54,14 @@ protected void addErrorMessage(Task task, String errorMessage)
private String createErrorMessage(Exception exception)
{
- return exception.getClass().getSimpleName()
- + ((exception.getMessage() != null && !exception.getMessage().isBlank())
- ? (": " + exception.getMessage())
- : "");
+ if (exception instanceof WebApplicationException w
+ && (exception.getMessage() == null || exception.getMessage().isBlank()))
+ {
+ StatusType statusInfo = w.getResponse().getStatusInfo();
+ return statusInfo.getStatusCode() + " " + statusInfo.getReasonPhrase();
+ }
+ else
+ return exception.getMessage();
}
private Identifier getLocalEndpointIdentifier()
diff --git a/src/main/java/dev/dsf/bpe/message/SendPong.java b/src/main/java/dev/dsf/bpe/message/SendPong.java
index f423aa4..123a344 100644
--- a/src/main/java/dev/dsf/bpe/message/SendPong.java
+++ b/src/main/java/dev/dsf/bpe/message/SendPong.java
@@ -14,6 +14,7 @@
import dev.dsf.bpe.v1.variables.Variables;
import jakarta.ws.rs.WebApplicationException;
import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.Response.StatusType;
public class SendPong extends AbstractTaskMessageSend
{
@@ -58,16 +59,10 @@ protected void handleEndEventError(DelegateExecution execution, Variables variab
if (mainTask != null)
{
- String statusCode = ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_NOT_REACHABLE;
- if (exception instanceof WebApplicationException)
- {
- WebApplicationException webApplicationException = (WebApplicationException) exception;
- if (webApplicationException.getResponse() != null && webApplicationException.getResponse()
- .getStatus() == Response.Status.FORBIDDEN.getStatusCode())
- {
- statusCode = ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_NOT_ALLOWED;
- }
- }
+ String statusCode = exception instanceof WebApplicationException w && w.getResponse() != null
+ && w.getResponse().getStatus() == Response.Status.FORBIDDEN.getStatusCode()
+ ? ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_NOT_ALLOWED
+ : ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_NOT_REACHABLE;
String specialErrorMessage = createErrorMessage(exception);
@@ -85,9 +80,13 @@ else if (ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_NOT_ALLOWED.equals(statu
private String createErrorMessage(Exception exception)
{
- return exception.getClass().getSimpleName()
- + ((exception.getMessage() != null && !exception.getMessage().isBlank())
- ? (": " + exception.getMessage())
- : "");
+ if (exception instanceof WebApplicationException w
+ && (exception.getMessage() == null || exception.getMessage().isBlank()))
+ {
+ StatusType statusInfo = w.getResponse().getStatusInfo();
+ return statusInfo.getStatusCode() + " " + statusInfo.getReasonPhrase();
+ }
+ else
+ return exception.getMessage();
}
}
diff --git a/src/main/java/dev/dsf/bpe/service/LogNoResponse.java b/src/main/java/dev/dsf/bpe/service/LogNoResponse.java
index ae07189..b8ec0cc 100644
--- a/src/main/java/dev/dsf/bpe/service/LogNoResponse.java
+++ b/src/main/java/dev/dsf/bpe/service/LogNoResponse.java
@@ -1,65 +1,34 @@
package dev.dsf.bpe.service;
-import java.util.Objects;
-
import org.camunda.bpm.engine.delegate.BpmnError;
import org.camunda.bpm.engine.delegate.DelegateExecution;
-import org.hl7.fhir.r4.model.Task;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import dev.dsf.bpe.ConstantsPing;
-import dev.dsf.bpe.mail.ErrorMailService;
-import dev.dsf.bpe.util.PingStatusGenerator;
import dev.dsf.bpe.v1.ProcessPluginApi;
import dev.dsf.bpe.v1.activity.AbstractServiceDelegate;
import dev.dsf.bpe.v1.variables.Target;
-import dev.dsf.bpe.v1.variables.Targets;
import dev.dsf.bpe.v1.variables.Variables;
public class LogNoResponse extends AbstractServiceDelegate
{
private static final Logger logger = LoggerFactory.getLogger(LogNoResponse.class);
- private final PingStatusGenerator responseGenerator;
- private final ErrorMailService errorMailService;
-
- public LogNoResponse(ProcessPluginApi api, PingStatusGenerator responseGenerator, ErrorMailService errorMailService)
+ public LogNoResponse(ProcessPluginApi api)
{
super(api);
-
- this.responseGenerator = responseGenerator;
- this.errorMailService = errorMailService;
}
- @Override
- public void afterPropertiesSet() throws Exception
- {
- super.afterPropertiesSet();
-
- Objects.requireNonNull(responseGenerator, "responseGenerator");
- Objects.requireNonNull(errorMailService, "errorLogger");
- }
-
-
@Override
protected void doExecute(DelegateExecution execution, Variables variables) throws BpmnError, Exception
{
- Task mainTask = variables.getStartTask();
-
- Targets targets = variables.getTargets();
- targets.getEntries().forEach(t -> logAndAddResponseToTask(mainTask, t));
+ Target target = variables.getTarget();
- variables.updateTask(mainTask);
- }
-
- private void logAndAddResponseToTask(Task task, Target target)
- {
logger.warn("PONG from organization {} (endpoint {}) missing", target.getOrganizationIdentifierValue(),
target.getEndpointIdentifierValue());
- task.addOutput(responseGenerator.createPingStatusOutput(target,
- ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_PONG_MISSING));
- errorMailService.pongMessageNotReceived(task.getIdElement(), target);
+ variables.setString("statusCode_" + target.getCorrelationKey(),
+ ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_PONG_MISSING);
}
}
diff --git a/src/main/java/dev/dsf/bpe/service/LogPong.java b/src/main/java/dev/dsf/bpe/service/LogPong.java
index e5ce0be..72fa616 100644
--- a/src/main/java/dev/dsf/bpe/service/LogPong.java
+++ b/src/main/java/dev/dsf/bpe/service/LogPong.java
@@ -1,43 +1,26 @@
package dev.dsf.bpe.service;
-import java.util.Objects;
-
import org.camunda.bpm.engine.delegate.BpmnError;
import org.camunda.bpm.engine.delegate.DelegateExecution;
-import org.hl7.fhir.r4.model.Task;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import dev.dsf.bpe.ConstantsPing;
-import dev.dsf.bpe.util.PingStatusGenerator;
import dev.dsf.bpe.v1.ProcessPluginApi;
import dev.dsf.bpe.v1.activity.AbstractServiceDelegate;
import dev.dsf.bpe.v1.variables.Target;
-import dev.dsf.bpe.v1.variables.Targets;
import dev.dsf.bpe.v1.variables.Variables;
public class LogPong extends AbstractServiceDelegate
{
private static final Logger logger = LoggerFactory.getLogger(LogPong.class);
- private final PingStatusGenerator responseGenerator;
-
- public LogPong(ProcessPluginApi api, PingStatusGenerator responseGenerator)
+ public LogPong(ProcessPluginApi api)
{
super(api);
- this.responseGenerator = responseGenerator;
}
- @Override
- public void afterPropertiesSet() throws Exception
- {
- super.afterPropertiesSet();
-
- Objects.requireNonNull(responseGenerator, "responseGenerator");
- }
-
-
@Override
protected void doExecute(DelegateExecution execution, Variables variables) throws BpmnError, Exception
{
@@ -46,13 +29,8 @@ protected void doExecute(DelegateExecution execution, Variables variables) throw
logger.info("PONG from {} (endpoint: {})", target.getOrganizationIdentifierValue(),
target.getEndpointIdentifierValue());
- Task mainTask = variables.getStartTask();
- mainTask.addOutput(responseGenerator.createPingStatusOutput(target,
- ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_PONG_RECEIVED));
- variables.updateTask(mainTask);
-
- Targets targets = variables.getTargets();
- targets = targets.removeByEndpointIdentifierValue(target.getEndpointIdentifierValue());
- variables.setTargets(targets);
+ execution.removeVariable("statusCode");
+ variables.setString("statusCode_" + target.getCorrelationKey(),
+ ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_PONG_RECEIVED);
}
}
diff --git a/src/main/java/dev/dsf/bpe/service/LogSendError.java b/src/main/java/dev/dsf/bpe/service/LogSendError.java
new file mode 100644
index 0000000..ed06bfc
--- /dev/null
+++ b/src/main/java/dev/dsf/bpe/service/LogSendError.java
@@ -0,0 +1,35 @@
+package dev.dsf.bpe.service;
+
+import org.camunda.bpm.engine.delegate.BpmnError;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import dev.dsf.bpe.v1.ProcessPluginApi;
+import dev.dsf.bpe.v1.activity.AbstractServiceDelegate;
+import dev.dsf.bpe.v1.variables.Target;
+import dev.dsf.bpe.v1.variables.Variables;
+
+public class LogSendError extends AbstractServiceDelegate
+{
+ private static final Logger logger = LoggerFactory.getLogger(LogSendError.class);
+
+ public LogSendError(ProcessPluginApi api)
+ {
+ super(api);
+ }
+
+ @Override
+ protected void doExecute(DelegateExecution execution, Variables variables) throws BpmnError, Exception
+ {
+ Target target = variables.getTarget();
+ String statusCode = (String) execution.getVariableLocal("statusCode");
+ String errorMessage = (String) execution.getVariableLocal("errorMessage");
+
+ logger.warn("Unable to send PING to {} (endpoint: {}): {}", target.getOrganizationIdentifierValue(),
+ target.getEndpointIdentifierValue(), errorMessage);
+
+ variables.setString("statusCode_" + target.getCorrelationKey(), statusCode);
+ variables.setString("errorMessage_" + target.getCorrelationKey(), errorMessage);
+ }
+}
diff --git a/src/main/java/dev/dsf/bpe/service/SaveResults.java b/src/main/java/dev/dsf/bpe/service/SaveResults.java
new file mode 100644
index 0000000..1edc557
--- /dev/null
+++ b/src/main/java/dev/dsf/bpe/service/SaveResults.java
@@ -0,0 +1,77 @@
+package dev.dsf.bpe.service;
+
+import java.util.Comparator;
+import java.util.Objects;
+
+import org.camunda.bpm.engine.delegate.BpmnError;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.hl7.fhir.r4.model.Task;
+import org.springframework.beans.factory.InitializingBean;
+
+import dev.dsf.bpe.ConstantsPing;
+import dev.dsf.bpe.mail.ErrorMailService;
+import dev.dsf.bpe.util.PingStatusGenerator;
+import dev.dsf.bpe.v1.ProcessPluginApi;
+import dev.dsf.bpe.v1.activity.AbstractServiceDelegate;
+import dev.dsf.bpe.v1.variables.Target;
+import dev.dsf.bpe.v1.variables.Targets;
+import dev.dsf.bpe.v1.variables.Variables;
+
+public class SaveResults extends AbstractServiceDelegate implements InitializingBean
+{
+ private final PingStatusGenerator statusGenerator;
+ private final ErrorMailService errorMailService;
+
+ public SaveResults(ProcessPluginApi api, PingStatusGenerator statusGenerator, ErrorMailService errorMailService)
+ {
+ super(api);
+
+ this.statusGenerator = statusGenerator;
+ this.errorMailService = errorMailService;
+ }
+
+ @Override
+ public void afterPropertiesSet() throws Exception
+ {
+ super.afterPropertiesSet();
+
+ Objects.requireNonNull(statusGenerator, "statusGenerator");
+ Objects.requireNonNull(errorMailService, "errorMailService");
+ }
+
+ @Override
+ protected void doExecute(DelegateExecution execution, Variables variables) throws BpmnError, Exception
+ {
+ Task task = variables.getStartTask();
+ Targets targets = variables.getTargets();
+
+ targets.getEntries().stream().sorted(Comparator.comparing(Target::getEndpointIdentifierValue)).forEach(target ->
+ {
+ String correlationKey = target.getCorrelationKey();
+
+ String statusCode = variables.getString("statusCode_" + correlationKey);
+ if (ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_NOT_REACHABLE.equals(statusCode)
+ || ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_NOT_ALLOWED.equals(statusCode))
+ {
+ String errorMessage = variables.getString("errorMessage_" + correlationKey);
+ task.addOutput(statusGenerator.createPingStatusOutput(target, statusCode, errorMessage));
+
+ if (ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_NOT_REACHABLE.equals(statusCode))
+ errorMailService.endpointNotReachableForPing(task.getIdElement(), target, errorMessage);
+ else if (ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_NOT_ALLOWED.equals(statusCode))
+ errorMailService.endpointReachablePingForbidden(task.getIdElement(), target, errorMessage);
+ }
+ else
+ {
+ task.addOutput(statusGenerator.createPingStatusOutput(target, statusCode));
+
+ if (ConstantsPing.CODESYSTEM_DSF_PING_STATUS_VALUE_PONG_MISSING.equals(statusCode))
+ errorMailService.pongMessageNotReceived(task.getIdElement(), target);
+ }
+ });
+
+ // TODO only send one combined status mail
+
+ variables.updateTask(task);
+ }
+}
diff --git a/src/main/java/dev/dsf/bpe/spring/config/PingConfig.java b/src/main/java/dev/dsf/bpe/spring/config/PingConfig.java
index 5ffd8a4..85c0291 100644
--- a/src/main/java/dev/dsf/bpe/spring/config/PingConfig.java
+++ b/src/main/java/dev/dsf/bpe/spring/config/PingConfig.java
@@ -7,6 +7,7 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
+import dev.dsf.bpe.listener.SetCorrelationKeyListener;
import dev.dsf.bpe.mail.ErrorMailService;
import dev.dsf.bpe.message.SendPing;
import dev.dsf.bpe.message.SendPong;
@@ -14,6 +15,8 @@
import dev.dsf.bpe.service.LogNoResponse;
import dev.dsf.bpe.service.LogPing;
import dev.dsf.bpe.service.LogPong;
+import dev.dsf.bpe.service.LogSendError;
+import dev.dsf.bpe.service.SaveResults;
import dev.dsf.bpe.service.SelectPingTargets;
import dev.dsf.bpe.service.SelectPongTarget;
import dev.dsf.bpe.service.SetTargetAndConfigureTimer;
@@ -61,46 +64,61 @@ public ErrorMailService errorLogger()
return new ErrorMailService(api, sendPingProcessFailedMail, sendPongProcessFailedMail);
}
+
@Bean
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
- public SendPing sendPing()
+ public SelectPingTargets selectPingTargets()
{
- return new SendPing(api, responseGenerator(), errorLogger());
+ return new SelectPingTargets(api);
}
@Bean
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
- public SendPong sendPong()
+ public SendPing sendPing()
{
- return new SendPong(api, responseGenerator(), errorLogger());
+ return new SendPing(api);
}
@Bean
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
- public LogPing logPing()
+ public SetCorrelationKeyListener setCorrelationKeyListener()
{
- return new LogPing(api);
+ return new SetCorrelationKeyListener(api);
}
@Bean
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public LogPong logPong()
{
- return new LogPong(api, responseGenerator());
+ return new LogPong(api);
}
@Bean
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public LogNoResponse logNoResponse()
{
- return new LogNoResponse(api, responseGenerator(), errorLogger());
+ return new LogNoResponse(api);
}
@Bean
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
- public SelectPingTargets selectPingTargets()
+ public LogSendError logSendError()
{
- return new SelectPingTargets(api);
+ return new LogSendError(api);
+ }
+
+ @Bean
+ @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+ public SaveResults savePingResults()
+ {
+ return new SaveResults(api, responseGenerator(), errorLogger());
+ }
+
+ @Bean
+ @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+ public LogPing logPing()
+ {
+ return new LogPing(api);
}
@Bean
@@ -109,4 +127,11 @@ public SelectPongTarget selectPongTarget()
{
return new SelectPongTarget(api);
}
+
+ @Bean
+ @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+ public SendPong sendPong()
+ {
+ return new SendPong(api, responseGenerator(), errorLogger());
+ }
}
diff --git a/src/main/resources/bpe/ping.bpmn b/src/main/resources/bpe/ping.bpmn
index ec72bce..2bef401 100644
--- a/src/main/resources/bpe/ping.bpmn
+++ b/src/main/resources/bpe/ping.bpmn
@@ -1,77 +1,123 @@
-
+
-
+
SequenceFlow_0k1j79c
- SequenceFlow_05ia6lz
+ Flow_0j92st0
-
-
-
- http://dsf.dev/fhir/StructureDefinition/task-ping|#{version}
-
-
- ping
-
-
- http://dsf.dev/bpe/Process/pong|#{version}
-
-
- SequenceFlow_05ia6lz
- SequenceFlow_1vng5zz
-
-
- SequenceFlow_1vng5zz
- SequenceFlow_10d3jfk
-
+
+ Flow_0j92st0
+ Flow_099pk09
+
+
+ R0/PT5M
+
+
- SequenceFlow_1jv4kfm
+ Flow_0v2ascf
-
-
- Flow_0brn8vt
-
-
+
+
+
+
+
+ Flow_0y9usku
+ Flow_1fjeq2h
+
+ PT20S
+
+
+
+
+ Flow_1lghrxh
+ Flow_03hkxbe
+
+
+
-
- ${target.correlationKey}
-
+
- SequenceFlow_1jv4kfm
- SequenceFlow_0r89tc0
-
-
-
+ Flow_1j54c2s
+ Flow_1lghrxh
+ Flow_0y9usku
+
+
+
+ Flow_1fjeq2h
+ Flow_136htek
+
- SequenceFlow_0r89tc0
- Flow_0brn8vt
+
+ Flow_03hkxbe
+ Flow_0wmpprs
+
+
+ Flow_1ipvu5v
+ Flow_1j54c2s
+ Flow_101sqed
+
+
+
+ Flow_101sqed
+ Flow_16ssf4a
+
+ ${execution.hasVariable('statusCode') && (statusCode == 'not-allowed' || statusCode == 'not-reachable')}
+
+
+
+ Flow_0v2ascf
+ Flow_1ipvu5v
+
+
+
+ http://dsf.dev/bpe/Process/pong|#{version}
+
+
+ http://dsf.dev/fhir/StructureDefinition/task-ping|#{version}
+
+
+ ping
+
+
+
+
+
+
+
+
+ Flow_0wmpprs
+ Flow_136htek
+ Flow_16ssf4a
+ Flow_1ho1hys
+
+
+
+
+
+
+ Flow_1ho1hys
+
+
- Flow_0d1hhpd
+ Flow_1du5wys
-
-
SequenceFlow_0k1j79c
-
-
- SequenceFlow_10d3jfk
- Flow_1mpgmm5
- Flow_0d1hhpd
+
+
+
+
+
+ Flow_099pk09
+ Flow_1du5wys
-
- Flow_1mpgmm5
-
- PT5M
-
-
-
@@ -81,79 +127,137 @@
-
-
+
+
+
+
+
-
+
-
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
-
-
-
+
+
+
-
-
-
-
+
+
+