...
Launch SubProcess "Wait for asynchronous message" and wait SDNC callBack.
In this workflow it's waiting for a message "sdncAdapterCallbackRequest"
5- Timeout
If SubProcess "Wait for asynchronous message" still running after 5 minutes (timeout set step 4)
...
Only debug and tace log, why no warning or error log ?
Callback Webservice
WS implementation is into org.onap.so.bpmn.common.workflow.service.SDNCAdapterCallbackServiceImpl
Code Block | ||
---|---|---|
| ||
@WebMethod(operationName = "SDNCAdapterCallback")
@WebResult(name = "SDNCAdapterResponse", targetNamespace = "http://org.onap/workflow/sdnc/adapter/schema/v1",
partName = "SDNCAdapterCallbackResponse")
public SDNCAdapterResponse sdncAdapterCallback(@WebParam(name = "SDNCAdapterCallbackRequest",
targetNamespace = "http://org.onap/workflow/sdnc/adapter/schema/v1",
partName = "SDNCAdapterCallbackRequest") SDNCAdapterCallbackRequest sdncAdapterCallbackRequest) {
String method = "sdncAdapterCallback";
Object message = sdncAdapterCallbackRequest;
String messageEventName = "sdncAdapterCallbackRequest";
String messageVariable = "sdncAdapterCallbackRequest";
String correlationVariable = "SDNCA_requestId";
String correlationValue = sdncAdapterCallbackRequest.getCallbackHeader().getRequestId();
CallbackResult result = callback.handleCallback(method, message, messageEventName, messageVariable,
correlationVariable, correlationValue, logMarker);
if (result instanceof CallbackError) {
return new SDNCAdapterErrorResponse(((CallbackError) result).getErrorMessage());
} else {
return new SDNCAdapterResponse();
}
} |
All code to link the Http to process are into CallbackHandlerService.correlate() method
In this code we create a query to Camunda runtime to find process waiting for message "sdncAdapterCallbackRequest" with variable "SDNCA_requestId" set to value of requestID
If we don't find any process the code wait 1 minute to find a process (with sleep code..)
The problem
If the time between the call back and the "catch event" step is more than one minute we fail... and we need to wait the timeout (5 minutes) to exit the "Wait for asynchronous message" step.
The callBack request is synchronous, so in case of 1 minute timeout, the client are wating a long time... it's not a good point (imagine we have a proxy between SDNC and SO with a 30s timeout...)
One solution
Start listening for event earlier. I will also check error management on SDNC