Wednesday, 20 April 2016

Multi threading–Adding run time tasks

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 


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.


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.



Aman Nain said...

Hi Munib, good post.

Your link to xpo does not work. Can you provide a working link?

For some more reading on multi-threading and adding dependency, read my post

Aman Nain said...

My take on a multi-threaded batch job template