AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 24.06.2019, 15:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 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
Старый 26.06.2019, 14:23   #2  
gl00mie is offline
gl00mie
Участник
MCBMSS
Most Valuable Professional
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии AXAWARD 2013
Лучший по профессии 2011
Лучший по профессии 2009
 
3,684 / 5788 (200) ++++++++++
Регистрация: 28.11.2005
Адрес: Москва
Записей в блоге: 3
Хм, затейливо... А чем не подошло отключение галки "Выполнять бизнес-логику в IL" в параметрах текущего пользователя? Или версия AX2012 совсем какая-то древняя?
Старый 29.06.2019, 02:33   #3  
skuull is offline
skuull
Участник
Most Valuable Professional
Лучший по профессии 2014
 
699 / 752 (27) +++++++
Регистрация: 08.03.2013
Адрес: ХЗ
Не знают о галке ?
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
a33ik: HowTo: Avoid simultaneous execution of 2 instances of same workflow for a record Blog bot Dynamics CRM: Blogs 0 23.07.2015 00:12
X++ to CIL Blog bot DAX Blogs 0 01.04.2013 14:11
X++: X++ Arrays Behave Differently in .NET CIL, in Dynamics AX 2012 Blog bot DAX Blogs 0 17.09.2012 23:11
X++: X++ Function num2Str: Difference in .NET CIL Mode Blog bot DAX Blogs 0 09.03.2012 07:45
a33ik: How to call/launch/execute workflow and wait until its execution to make some action with JavaScript in Microsoft Dynamics CRM Blog bot Dynamics CRM: Blogs 1 09.09.2009 17:27
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 13:14.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.