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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 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
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
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, время: 11:25.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.