SysOperation framework (or Business Operation framework) was introduced in AX 2012 as future replacement of RunBase/RunBaseBatch framework. The RunBaseBatch framework is being deprecated. The new SysOperation framework follows MVC(Model-View-Controller) pattern.

 

Why MVC pattern?

 

MVC pattern isolates Model, View and Controller. This makes the process which is built over SysOperation framework, loosely coupled. The advantage of this being loosely coupled is that it can be easily exposed as an AIF service with almost zero effort. This is a common industry trend that every process is going towards SOA(Service Oriented Architecture). Seems like Microsoft is also taking steps to go towards SOA.

 

Batch framework in AX 2012

 

There was one major amendment in Batch framework in AX 2012 that its code now runs on server and all the server code runs in .NET Common Intermediate Language. As a result, .NET CIL code in Batch framework runs much faster than AX 2009 that ran interpreted X++ code. Performance on .NET CIL can be improved up to 30% which is mainly because of the efficient .NET garbage collection.

 

Service execution modes

 

SysOperation service can run in four modes. Regardless of which mode a service is running in, the code runs on server. This makes minimum number of round trips between server and client.

 

Synchronous

 

When a service is run in synchronous mode, although it runs on server but it freezes AX client. Call is initiated from client and object is marshaled to server to run in CIL.

 

Use

 

Good for smaller processes.

 

Asynchronous

 

In asynchronous call to service, client remains responsive. They only work using WCF asynchronous service call mechanism. This is why it is necessary to have it running as an AIF service. One should drop it to AxClient service group and redeploy the service group.

 

Use

 

Good for lengthy processes where durability is not important.

 

Reliable asynchronous

 

Works like batch service. As soon as a call is initiated to run a service in reliable asynchronous mode, it is scheduled to be run on batch server instantly but removed as soon as it finishes the job. One can see it among other jobs scheduled. Since it runs on batch server, it can exploit the power of parallel processing.

 

Use

 

It is used in scenarios where job needs to be run on server and not to schedule. Room for performance enhancement making use of parallel processing among different AOS.

 

Scheduled batch

 

Job is scheduled to run on a batch server. This is similar to reliable asynchronous, just that it does not delete the job instance after job is finished.

 

Use

 

This is used for jobs that need to be run repeatedly on specified time interval. Room for performance enhancement making use of parallel processing among different AOS.

 

Parallel processing

 

Batch server in AX 2012 allows parallel processing. A job may contain multiple tasks. Each task can run into threads. Further performance can be improved by running tasks on different AOS. Dependencies of tasks on other tasks can be defined. Sequence of tasks can be set. Organizing of tasks in multithreaded, multi-server setup brings in better scalability.