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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 13.02.2014, 19:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,626 / 848 (80) +++++++
Регистрация: 28.10.2006
axStart: AX 3.0 and 4.0 Batching
Источник: http://www.axstart.com/ax-3-0-and-4-...d-4-0-batching
==============

It is quite easy to create batch clients in Microsoft Dynamics AX old. It is getting harder when you want to check it easily if all batches are still running.

There are some additional Microsoft programs and functionalities in Microsoft Dynamics AX that can help you out:
  • Start every batch client like a real server.
  • Logon with a different user for every batch service.
  • Place a dedicate AOS server on the batch server.
Missing code in Microsoft Dynamics AX

In the class SysStartupCmdBatchRun, method inforun is one line of code missing. Add this line so the batch service will use the correct batch group.

void infoRun()
{
BatchRun   batchRun = new BatchRun();
;
batchRun.parmUseForm(true);
batchRun.parmGroupId(parm); //TODO Missing line
batchRun.run();
}Monitoring the Batch
  • Logon with a different user for any batch client, so you can see with the task manager of Windows:
  • Memory consumption
  • If batch client is still running (the batch service is running in services but the batch client is gone
  • With the online users form in Microsoft Dynamics AX, you can monitor if the batches are online.
How to run a single batch process that processes jobs for multiple companies

In Microsoft Dynamics AX 4.0, a batch process or a batch server can process jobs for only one company. However, a virtual company can access the batch table collection for other companies. When you add jobs to a batch group, Microsoft Dynamics AX 4.0 inserts the virtual company identifier in the DataAreID field. When you run the batch process, the batch process treats all the records in the batch process as records from one company. Additionally, the batch process works as a central batch server.

When companies belong to a virtual company, you can create a batch group for a company that belongs to the virtual company. This batch group is then used by the other companies. This feature lets you run one batch process that processes jobs for multiple companies. To do this, follow these steps:
  1. In the Main menu dialog box, point to Administration,  expand Setup, and then click Virtual company accounts.
  2. In the Virtual company   accounts dialog box, press CTRL+N, and then type a company account   name in the Company accounts  field.
  3. Click the Company accounts tab. In the Remaining company account list, select companies for which you want to run the batch process, and then click the left-arrow button.
How to run a single batch process that processes jobs for multiple companies

In Microsoft Dynamics AX 4.0, a batch process or a batch server can process jobs for only one company. However, a virtual company can access the batch table collection for other companies. When you add jobs to a batch group, Microsoft Dynamics AX 4.0 inserts the virtual company identifier in the DataAreID field. When you run the batch process, the batch process treats all the records in the batch process as records from one company. Additionally, the batch process works as a central batch server.

When companies belong to a virtual company, you can create a batch group for a company that belongs to the virtual company. This batch group is then used by the other companies. This feature lets you run one batch process that processes jobs for multiple companies. To do this, follow these steps:
  1. In the Main menu dialog box, point to Administration,  expand Setup, and then click Virtual company accounts.
  2. In the Virtual company accounts dialog box, press CTRL+N, and then type a company account  name in the Company accounts field.
  3. Click the Company accounts tab. In the Remaining company account list, select companies for which you want to run the batch  process, and then click the left-arrow button.
  4. Click the Table collections   tab. In the Remaining table collections list, select Batch,  and then click the left-arrow button.
  5. Click Save, and then  close the Virtual company accounts  dialog box.
  6. Create a batch group.
  7. Restart Microsoft Dynamics AX 4.0.
  8. Run the batch process by using a company that belongs to the virtual  company.
Create a real batch client service

Have a look at the Windows Server 2003 Resource Kit Tools http://www.microsoft.com/en-us/downl....aspx?id=17657

This toolkit has the utility SRVANY.EXE; this tool can start any application in server mode. To create the service we use the program INSTSRV.EXE.

Example create service:

INSTSRV DynamicsBatch “C:\Program Files\Windows Resource Kits\Tools\srvany.exe” -a DOMAIN\batchuser1 -p Pa$$w0rd

Example remove service:

INSTSRV DynamicsBatch1 REMOVE

Next we have to add the Microsoft Dynamics AX batch client to the svrany service

Start Registry Editor.
  1. Select the following registry key :  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DynamicsBatch
  2. With the above key selected, choose Add Key from the Edit menu.
  3. Enter “Parameters” (without the quotes) for the key name.
  4. Click the OK button to create this key.
  5. Select the Parameters key.
  6. Choose Add string Value from the Edit menu.
  7. Enter “Application” (without the quotes) for the value name and leave the data type at the default, REG_SZ.
  8. Click the OK button to create this value.
  9. In the String Editor window, enter the string value of “C:\Program Files\Microsoft Dynamics AX\40\Client\Bin\ax32.exe” (without the quotes),
  10. Click the OK button to add this string to the Application value.
  11.  Select the Parameters key.
  12. Choose Add string Value from the Edit menu.
  13. Enter “AppParameters” (without the quotes) for the value name and leave the data type at the default, REG_SZ.
  14. Click the OK button to create this value.
  15. In the String Editor window, enter the string value of “-startupcmd=Batch_test” (without the quotes).
  16. Click the OK button to add this string to the AppParameters value.

Источник: http://www.axstart.com/ax-3-0-and-4-...d-4-0-batching
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 


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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 04:13.