Показать сообщение отдельно
Старый 24.06.2019, 15:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
a33ik: Skip CIL execution
Источник: http://daxonline.org/1650-skip-cil-execution.html
==============

To skip CIL execution for processes, which use SysOperation framework (SysOperationServiceController)
- set break point to \Classes\SysOperationServiceController\runOperation and track how many parameters do you have to identify which serviceClass.callObject to modify
- identify the type of proxy variable
In my case proxy is of type FormletterService and I have only one parameter, method returns value
- notice value of methodName variable to identify which method to call on the object, in my case it is postSalesOrderPackingSlip

- declare new variable of real proxy type, in my case it is FormletterService

FormletterService formletterService;- afteryour serviceClass.callObject write additional code like this one (depending onparameters count, return value and method to call)


if (false) { formletterService = proxy; operationReturnValue = formletterService.postSalesOrderPackingSlip(o1); }
- set break point to serviceClass.callObject

- in debugger move execution cursor inside your if statement



If execution of process if marshaled under specific user usingSysOperationRPCFrameworkService::runServiceOperation

Two solutions for that

1. Set break poin to \Classes\SysOperationServiceController\run

In debugger move execution cursor to one of the this.runOperation(false/*sync*/);




2. Modify \Classes\SysOperationRPCFrameworkService\runServiceOperation tothe following look:



public static container runServiceOperation(ClassId controllerClassId, container packedController){ // Use the runas API to transition to a CLR session new XppILExecutePermission().assert(); /* TODO: temp solution to debug issue return SysDictClass::invokeStaticMethodIL(classStr(SysOperationServiceController), staticMethodStr(SysOperationServiceController, runServiceOperation), [controllerClassId, packedController]); */ return SysOperationServiceController::runServiceOperation([controllerClassId, packedController]);}


Источник: http://daxonline.org/1650-skip-cil-execution.html