Skip to main content

Posts

Showing posts with the label batch

Batch Task Dependency in Dynamics AX 2009

Scenario : You want to schedule 2-3 tasks, but you would like to define dependency among tasks. Means Task1 should be executed only after completion of Task 3 and Task 2. Advantage : You all might have heard of "Divide and Conquer Rule", So this also implements the same. Generally if you create batch to process 1000 Purchase orders then it might slow down the AOS performance and delay the overall batch performance. But if you create batch and create 10 tasks, each process 100 Purchase orders then will be fast compared to above procedure and will improve overall batch performance. How to : In Dynamics AX 2009, Batch process will make use of below tables BatchJob : Main Job scheduler, consists of task BatchTask : Task in batch which specifies what class to execute in order to achieve certain functionality. BatchConstraint : Used to build dependencies among the tasks. Create a Job, by using below code static void Batch_Creat...

Running batch jobs automatically in Dynamics AX

For learning how to create and launch batch jobs in Dynamics AX, please take a look to all topics in http://msdn.microsoft.com/en-us/library/aa549082(AX.10).aspx. If we want to configure an automatic batch job server, we need to modify the class SysStartupCmdBatchRun, method infoRun, as follows: void infoRun() { batchRun batchRun = new batchRun(); ; batchRun.parmUseForm(true); batchRun.parmGroupId(parm); // added batchRun.run(); } And for a batch group named "myGroup" for example, we can use the Microsoft Dynamics AX Configuration Utility to specify the "Command to run at application startup:" as Batch_myGroup. This enable the AX client to run every batch job in this group. We can also use the command line as {path}\ax32.exe startupcmd=batch_myGroup.