Doing some investigations regarding posting of sales orders (Picking lists, packing slips and invoices), I’ve noticed that in AX2012 there have been added the following parameters on Sales and Purchase to set the number of orders that needs to be passed per batch created during execution of posting the documents in batch having late selection set.
Number of documents in batch task
Suppose you have 31 Sales orders to post, AX will create 7 batch tasks, each containing 5 sales orders and the last one containing a single order. In case 0 or a lower number is specified 5 will be set automatically by the system.
All these batch tasks will be executed in parallel. Depending on the setting in the batch server configuration n batch tasks can be executed in parallel by the batch server.
Server configuration – Maximum batch thread
In this case only 8 thread will process the single batch tasks created (8 is the default).
Consider that these setting of the batch threads is not only used for sales/purchase order posting but for all batch tasks executed on the give AOS batch server in the time frame indicated.
See also the following link for additional documentation:
Additional Information for AX2012 Form Letter Framework
Here some important classes that are used to post documents
The main entry point is the class FormLetterService with its post….() methods. You can see that on the different menu items (here an example of Picking list posting)
In addition for batch processing see the subclasses of class FormLetterBatchTask. Theses classes are used during batch processing to fork different batch tasks that will perform the multithreading operations.
Here a short description of these classes for references.
- FormLetterParmDataCreateDataBatchTask: Creates the parm table entries in late selection. There will be n batch tasks depending on the number of orders to post and on the setting of the “Number of documents in batch” explained before.
- FormLetterParmDataRearrangeBatchTask: performs the rearrange of the parm tables in late selection. This batch task is executed single threaded on completion (Finish or Error) of the FormLetterParmDataCreateDataBatchTask tasks.
- FormLetterServiceBatchTask: Performs the posting routines in batch execution. The execution is multithreaded. There will be n batch tasks created of these type depending on the parm tables to be posted and the parameter “Number of documents in batch”. The creation of these tasks will be done on termination of FormLetterParmDataRearrangeBatchTask
- FormLetterServiceEndBatchTask: Performs final operation of posting. In this step depending on the settings of the print options the printing of the journals created is performed (This is a new feature of AX2012. I will cover it in a separate Blog Post). The execution of the task is single threaded.
You can use different AOS and tweak these parameters in order to improve performance during batch execution.