Dynamics AX
  RSS Feed  LinkedIn  Twitter
Want to turn you're data into a true asset? Ready to break free from the report factory?
Ready to gain true insights that are action focused for truly data informed decisions?
Want to do all of this across mutliple companies, instances of Dynamics and your other investments?
Hillstar Business Intelligence is the answer then! (www.HillstarBI.com)

Hillstar Business Intelligence for Microsoft Dynamics AX and NAV on Mobile, Desktop, Tablet


Let us prove to you how we can take the complexity out of the schema and truly enable users to answer the needed questions to run your business! Visit Hillstar Business Solutions at: www.HillstarBI.com

Wednesday, May 12, 2010

Dynamics AX - Thread Development vs. Batch runtime task

Recently, in the past months, I talked about in a few post using Threads in your X++ code, to help with adding parrellel processing to long running processes.

Dynamics AX 2009 - X++ Thread Development
Dynamics AX Threads - More details

There is for sure, a specific time and place to use Threads, however what about in Batch? What if I want to take the work I am doing with threads, and actually run that now in a batch processing mode?

Bottom line.: It will not work!

Threads, currently, can't be spawned from within a batch executing task. The design behind batch framework is geared around taking and using the BatchHeader class, and the runtime task framework, to create batch task.

If you do this, you will see these task execute under the same context as threads, being that of a "worker" user type.

So as I said, Thread development has it's time and place, and that does not include Batch related execution. Threads are best for user processes, where the process always involves a user kicking off that said process. If batch based execution is needed, then taking the example of found in the Journal Batch Processing whitepaper, you can take and allow for parrellel execution of code, with batch task being created, vs. threads being spawned.

There are other good examples of this actually, including the Inside Dynamics AX 2009 book, which covers this topic as well.

So with this, we have two ways to achieve parrellel processing, and depending on the desired nature of the process, will drive you to which method. To batch, or not to batch? For this, that is the driving question!

That's all for now, but check back soon, as more to come!

"Visit the Dynamics AX Community Page today!"

Labels: , , , , , , , ,

0 Comments:

Post a Comment

<< Home


Copyright 2005-2011, J. Brandon George - All rights Reserved