Steve Shebuski, VP of Digital Strategy
Guiding businesses through their digital transformation journey
When running your business with Microsoft Dynamics AX, it requires the use of many batch jobs completing tasks in the background in order to minimize the need for manual intervention in the system. When these batches are setup as individual jobs, businesses run into issues from system blocking of tables to inefficient system management because of the timing of execution of jobs.
Batch Tasks with Conditions
As an example, let’s say you would like to run the inventory status change batch job to block inventory that isn't available. When this job finishes, it is the best time to execute the release of sales or transfer orders. As opposed to setting up both batch jobs independently and hoping the timing works out, these are setup as batch tasks with conditions ensuring that one job ends before another starts.
In a similar scenario, if your business uses a cleanup job for cases when a job ends in error, this tool is used to only trigger the cleanup job when the initial job ends in error.
System Administration>Inquiries>Batch jobs
On this page, click File>New or CTRL+N to create new.
Give the Batch job a description, then click CTRL+S to save the record and activate the ability to View Tasks:
In the Batch tasks screen click File>New or CTRL+N to create new.
Give the first batch job in the sequence a description, choose the Company accounts for which it will run, and choose the Class name of the batch.
Then click File>New or CTRL+N again to add the next batch in sequence.
[Once you’ve added the next task(s) click F5 to refresh the screen and display the tasks in sequence as they were created, and to how they will execute.]
Now to create conditions within the job (in this example we are going to say we don’t want the Auto Release of Sales Orders to occur if the Inventory Status Change job ends in error), click the job for which you’d like to create a condition and click inside the Has conditions grid in the bottom of the screen and press CTRL+N for a new condition.
The tasks that you choose from, from the above defined list of batch tasks, is in the drop down for the Task ID.
Once the Task ID is chosen, choose the Expected Status that the following batch task is dependent on. In this example, we are choosing “Ended” to say that the Inventory Status Change job must be ended in order for the Release job to begin. The other choices are “Error,” like our example of a cleanup job that only runs when a batch ends in an error, or “Ended or Error” if you’d like the following job to start whether it ends or errors.
In addition, you state in the Condition type if you have multiple conditions whether it hit Any of the conditions or must hit All of the conditions.
- Batch jobs are setup as batch tasks in a sequence with conditions for the execution of the following job(s)
- Creating batch job tasks in a sequence as opposed to as individual jobs help the system run more efficiently and prevent table blocking
If you have questions about Microsoft Dynamics AX batch job dependencies, contact us.