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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 20.06.2018, 21:13   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
a33ik: AIF document service jobs/info
Источник: http://daxonline.org/1616-aif-docume...jobs-info.html
==============

Job to execute/process messages
static void AifTestRun(Args _args){ // inbound messages new AIFGatewayReceiveService().run(); new AIFInboundProcessingService().run(); // outbound messages new AIFOutboundProcessingService().run(); new AIFGatewaySendService().run(); info("done");}Example of "read" outbound:static void AifTest(Args _args){ AxdSendContext axdSendContext = AxdSendContext::construct(); AifEntityKey aifEntityKey = AifEntityKey::construct(); Map keyData; AifConstraintList aifConstraintList = new AifConstraintList(); AifConstraint aifConstraint = new AifConstraint(); VendInvoiceInfoTable vendInvoice; XMLDocPurpose _xMLDocPurpose = XMLDocPurpose::Original; AifSendMode _aifSendMode = AifSendMode::Async ; select firstOnly vendInvoice order by RecId desc where vendInvoice.PurchId == 'BHF-000060'; keyData = SysDictTable::getKeyData(vendInvoice); aifEntityKey.parmTableId(vendInvoice.TableId); aifEntityKey.parmRecId(vendInvoice.RecId); aifEntityKey.parmKeyDataMap(keyData); axdSendContext.parmXMLDocPurpose(_xMLDocPurpose); axdSendContext.parmSecurity(false); aifConstraint.parmType(AifConstraintType::NoConstraint) ; aifConstraintList.addConstraint(aifConstraint) ; AifSendService::submitDefault( classnum(VendInvoiceService), aifEntityKey, aifConstraintList, _aifSendMode, axdSendContext.pack()); info("done");}Example of "find" outbound. Export all records by query:static void ABIVend(Args _args){ VendTable vendTable; AxdSendContext axdSendContext = AxdSendContext::construct(); AifEntityKey aifEntityKey = AifEntityKey::construct(); AifConstraintList aifConstraintList = new AifConstraintList(); AifConstraint aifConstraint = new AifConstraint(); AifEndpointList endpointList; AifActionId actionId; Query query; QueryBuildDataSource qbds; query = new Query(queryStr(AxdVendTable)); AxdSend::removeChildDs(query); actionId = AifSendService::getDefaultSendAction(classnum(VendVendTableService), AifSendActionType::SendByQuery); aifConstraint.parmType(AifConstraintType::NoConstraint); aifConstraintList.addConstraint(aifConstraint) ; endpointList = AifSendService::getEligibleEndpoints(actionId, aifConstraintList); AifSendService::SubmitFromQuery(actionId,endpointList,query,AifSendMode::Async);}In case of changes and adding new services:
  • Forward compile of modified AxBC class
  • Incremental CIL
  • Restart AOS
  • AX Client config > tab:Connection >button:Refresh configuration
Also form AifService which is not available from menu. Open click Refresh button.
For error System Administration -> Periodic -> Services and Application Integration Framework -> Exceptions

// Note: For debugging
\Classes\AifInboundProcessingService\runAsUserInPartition

File name generation for a file adapter
\Classes\AifFileSystemSendAdapter\getNewOutFileName


Источник: http://daxonline.org/1616-aif-docume...jobs-info.html
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: Dynamics Document Routing Agent run as a service Blog bot DAX Blogs 0 28.03.2017 18:11
kamalblogs: AIF: Testing Document services surpassing the AIF setup – Dynamics AX 2012 Blog bot DAX Blogs 0 05.11.2013 21:11
atinkerersnotebook: Creating Your Own Document Management System With SharePoint Blog bot DAX Blogs 0 02.10.2013 21:12
ошибка при установке outlook плагин для CRM 2011 webmaster Dynamics CRM: Администрирование 8 09.12.2011 12:41
Dave: AIF Configuration and Additional Findings Blog bot DAX Blogs 1 04.11.2009 17:29
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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