You need to sign in to do that
Don't have an account?
Marek Cech
Continuation continuationMethod not executed sometimes
Hi,
I've got a problem with Continuation. In one of several hundread executions the method for processing response is not executed. There is logging in the method so I'm pretty sure this happens. Wierd thing is that onComplete Javascript function of ActionFunction is executed.
public Continuation moveToStage5() {
Continuation cont = new Continuation(timeout);
cont.continuationMethod = 'processMoveToStage5Response';
AsyncSapOrderWS.Asyncy_sf_saveorder service = new AsyncSapOrderWS.Asyncy_sf_saveorder();
activationResponse = service.beginYSfSaveorder(cont, acc.SAP_ID__c, latestOrderDto.customerNote, sapUserId,
orderRecord.OrderNumber, SAP_ORDER_TYPE, preferedDeliveryDate, priceDate, latestOrderProducts,
selectedSellingOrganisation, orderSalesType, '');
return cont;
}
public Object processMoveToStage5Response() {
SapOrderWS.YSfSaveorderResponse_element response;
try {
response = activationResponse.getValue();
GlobalUtility.logMessage(GlobalUtility.DEBUG, AddOrderController.class.getName(), 'processMoveToStage5Response', null, null,
response.toString(), null, null, 0, true);
} catch (Exception e) {
response = new SapOrderWS.YSfSaveorderResponse_element();
response.Error = Label.errMsg_ErrorCreatingOrder + ' ' + Label.msg_PleaseContactAdmin + ' (' + e + ')';
GlobalUtility.logMessage(GlobalUtility.ERROR, AddOrderController.class.getName(), 'processMoveToStage5Response', null, null,
Label.errMsg_ErrorCreatingOrder, null, e, 0, false);
orderResponseJson = JSON.serialize(response);
return null;
}
return null;
}
Has anyone experienced such thing?
I've got a problem with Continuation. In one of several hundread executions the method for processing response is not executed. There is logging in the method so I'm pretty sure this happens. Wierd thing is that onComplete Javascript function of ActionFunction is executed.
public Continuation moveToStage5() {
Continuation cont = new Continuation(timeout);
cont.continuationMethod = 'processMoveToStage5Response';
AsyncSapOrderWS.Asyncy_sf_saveorder service = new AsyncSapOrderWS.Asyncy_sf_saveorder();
activationResponse = service.beginYSfSaveorder(cont, acc.SAP_ID__c, latestOrderDto.customerNote, sapUserId,
orderRecord.OrderNumber, SAP_ORDER_TYPE, preferedDeliveryDate, priceDate, latestOrderProducts,
selectedSellingOrganisation, orderSalesType, '');
return cont;
}
public Object processMoveToStage5Response() {
SapOrderWS.YSfSaveorderResponse_element response;
try {
response = activationResponse.getValue();
GlobalUtility.logMessage(GlobalUtility.DEBUG, AddOrderController.class.getName(), 'processMoveToStage5Response', null, null,
response.toString(), null, null, 0, true);
} catch (Exception e) {
response = new SapOrderWS.YSfSaveorderResponse_element();
response.Error = Label.errMsg_ErrorCreatingOrder + ' ' + Label.msg_PleaseContactAdmin + ' (' + e + ')';
GlobalUtility.logMessage(GlobalUtility.ERROR, AddOrderController.class.getName(), 'processMoveToStage5Response', null, null,
Label.errMsg_ErrorCreatingOrder, null, e, 0, false);
orderResponseJson = JSON.serialize(response);
return null;
}
return null;
}
Has anyone experienced such thing?
Marek Cech