After triggering the batch job, go to System Administration > Inquiries > Batch jobs and open Batch jobs form. Here you can see your batch job queued for execution. If you want to expedite running your batch job, you can change the status to Withhold of jobs queued to run before your job.
To change the status of any job go to Functions > Change Status. You can also see the log entries against any job by selecting the job and then clicking the Log button.
To configure an AOS instance as a batch server go to System Administration > Setup > System and open Server Configuration form. Select the AOS instance to configure from the grid on the left. Check Is batch server to specify this instance as a batch server. Expand the fast tab Batch Server Schedule. Mention the Maximum batch threads along with start and end times.
Please note that maximum batch threads only controls how many concurrent threads will be running on this instance. You can create as many threads as you like in x++. For example, maximum batch threads is set to 20 and your x++ code is creating 30 threads to perform a job. In this case, first 20 out of 30 threads will be running concurrently while the remaining 10 threads will be in the waiting state till the first 20 threads finish their job.
You can specify multiple maximum batch threads and bind them to specific time slots using Start time and End time. In this way we can configure the same AOS instance to allow different maximum batch threads in different time slots. For example, in rush hours we can specify more concurrent threads as compared to idle hours!
Feel free to comment in case of any questions!
All the batch jobs and service operations now run in the managed code (IL) and therefore breakpoints set in x++ do not get hit as expected! Instead you should be setting breakpoints in the IL code in Visual Studio. Here are the steps you would be following to do so:
1. Open Visual Studio as an Administrator and go to Tools > Options > Debugging > General. Make sure “Enable Just My Code (Managed Only)” is unchecked.
2. Go to Debug > Attach to Process. Click “Select…” and check the appropriate version of the managed code in your case.
3. Check both options at the bottom of “Attach to Process” form. Select Ax32Serv.exe from the list of processes.
4. Load the XppIL source file in Visual Studio now. Make sure you have enabled breakpoints to debug x++ code in the AX Server Configuration Utility. You can find these files under a location similar to the following:
C:\Program Files\Microsoft Dynamics AX\6.3\Server\AxaptaDev\bin\XppIL\source
5. Now set the breakpoint at any of the desired statement.
6. Finally, trigger the batch job or service operation to debug in the AX Client. The breakpoint set in Visual Studio should be hitting now! Make sure to generate IL to reflect the changes in the XppIL source files after updating the x++ code.