IF we want to do debugging in AIF then follow the following steps.This is for Inbound processing
1.Go to AOT->Classes->AIFInBoundProcessingService
2.Go to method runAsWrapper
3.Comment the following lines in method
// BP deviation documented
// runas(axaptaUserId,
// classnum(AifInboundProcessingService),
// staticmethodstr(AifInboundProcessingService, processAsUser),
// messageIdContainer);
and replace this with the following line
AifInboundProcessingService::processAsUser(messageIdContainer);
4. Make the processAsUser method public from private
public static void runAsWrapper(AifWindowsUser runAsUserId, container messageIdContainer)
{
AifGatewayQueue gatewayQueue;
userId axaptaUserId;
AifMessageId messageId;
int messageIdContainerIdx = 1;
AifMessage errorMessage;
AifInfoLog aifInfoLog;
SysExceptionLog exceptionLog;
;
aifInfoLog = new AifInfoLog();
try
{
// Convert to Axapta UserId
axaptaUserId = AifEndpointUser::getAxaptaUser(runAsUserId).Id;
new RunAsPermission(axaptaUserId).assert();
// BP deviation documented
// runas(axaptaUserId,
// classnum(AifInboundProcessingService),
// staticmethodstr(AifInboundProcessingService, processAsUser),
// messageIdContainer);
AifInboundProcessingService::processAsUser(messageIdContainer);
CodeAccessPermission::revertAssert();
Saved my life! Greetings from México.
ReplyDelete