Last year I posted about multi threaded operation using BOF Also uploaded a sample project you could use to test it out or use as a template.
Multithreading with Business Operation Framework [AX 2012]
One thing I picked up after testing it in a large scale project which required scheduling it on a non default (blank) batch group. This had a few issues:
Originally I was using the
batchHeader.addTask(this.newTaskController(recIdSet));
Below are the two issues of using this method like this.
1. There is a known issue to set the controller execution mode to be Synchronous.
Whitepaper: https://www.microsoft.com/en-us/download/details.aspx?id=29215
Screenshot of the known issue.
This separates it as its own batch job which disappears after it is finished. This is not the desired result when we are adding tasks at runtime. We want to keep them as tasks under the main batch.
2. Another issue is it will set the batch group as the default batch (blank). In my case the blank batch group was not my ideal batch server.
I rewrote that section as per below.