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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 27.06.2018, 13:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
ievgensaxblog: MSDyn365FO. How to playback a task recording from X++.
Источник: https://ievgensaxblog.wordpress.com/...ording-from-x/
==============



Warmup of a VM is an old issue and everyone tries to find a workaround. It is critical for demo VMs that are turned off most of the time and you don’t want to demo a product that is slow as hell.

Well-known workaround is to manually open all the forms you are going to use but it’s boring and time-consuming task. One of the yammer users came up with an idea to use task recording and here is an implementation in its dirtiest way (calling private methods on object without any validation) that is good enough for demo anyway, so feel free to improve this code:

class WarmUpRunnableClass { public static void main(Args _args) { var currentRecording = SysBPMHelper::LoadLocalizedRecordingFromLCS(80244103); //BpmLineId here. Args args = new Args(); args.name(formstr(SysTaskRecorderPane)); FormRun formRun = ClassFactory.formRunClass(args); formRun.init(); formRun.run(); formRun.loadRecording(currentRecording); formRun.maintainExistingRecording(); formRun.playToStep(100000); formRun.wait(); } } This runnable class could be executed from URL, so you can add it to Windows Task Scheduler and execute it on the VM start automatically.

80244103 is a task recording id that is hardcoded here for simplicity. Previously I recorded it and saved to BMP. You can improve this code and add some smarties to grab it from BMP using search by keyword or any other logic you like.

For those who think that hardcode is good enough to get this number you need to go to LCS, open BMP and find task recording you want to run. PLID value from URL is a number you need:





Источник: https://ievgensaxblog.wordpress.com/...ording-from-x/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Теги
bpm, d365o

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
cleverax: How to build a PowerApp that generates product labels. Part 2: Use Microsoft Flow to get data from MSDyn365FO Blog bot DAX Blogs 0 19.06.2018 11:11
ievgensaxblog: MSDyn365FO. How to switch from IIS Express to IIS on development VM. Blog bot DAX Blogs 0 02.04.2018 17:11
Microsoft Dynamics CRM Team Blog: Creating and customizing task flows Blog bot Dynamics CRM: Blogs 0 11.12.2015 04:14
atinkerersnotebook: Walkthrough & Tutorial Summary Blog bot DAX Blogs 1 09.09.2013 09:11
wiki.dynamicsbook: Changes Made in Navision Attain 3.60 Blog bot Dynamics CRM: Blogs 0 02.09.2008 13:23

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

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

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