Batch job configuration
-
Batch job configuration
Posted by DSC Communities on February 21, 2020 at 10:30 am-
Nick Mart
MemberFebruary 21, 2020 at 10:30 AM
?We are using AX2012 R3. I am attempting to setup a new batch job. I am good until I add a task. The class I would like to use is not showing up on the drop.We already have some similar batch jobs configured and working. The class defined in the tasks for those jobs are not in the list either.
The people that configured these existing batch jobs are no longer available to use as a resource. Suggestions would be greatly appreciates.
I did attempt to just open the BATCH table from the AOT and add a record. ClassNumber is not an available field.
——————————
Nick Mart
developer
Winnebago Industries
Forest City IA
—————————— -
Mary Myers
MemberFebruary 23, 2020 at 5:10 AM
Hey Nick,
I believe in order for the class to show up here, the CanGoBatchJournal property must be enabled.Āhttps://docs.microsoft.com/en-us/dynamicsax-2012/appuser-itpro/create-a-batch-job
Hope this helps.
——————————
Mary Myers
ABC ACC
——————————
——————————————- -
Soren Normann Rasmussen
MemberFebruary 24, 2020 at 1:03 AM
Hi Nick,
I haven’t tested this but have you tried to just type in the class name, aka not selecting from the dropdown.
Some places in AX you can there is a mismatch between what can be used and what can be selected from the dropdown.
As Mary says below the property is probably not set but this doesn’t mean that it wont work.
As you have experienced with the batch jobs that do work but have same issue.
Hope this helps.
Soren——————————
Soren Normann Rasmussen
SSS Australia
Murarrie
——————————
——————————————- -
Nick Mart
MemberFebruary 24, 2020 at 7:50 AM
?Thank you Mary and Soren,We are aware of the CanGoBatchJournal situation. As stated, we have other batch jobs with tasks that do not have that method. We have tried to key in the class name. That did not work.
Are there any other suggestions?
——————————
Nick Mart
developer
Winnebago Industries
Forest City IA
——————————
——————————————- -
Corey Vantilborg
MemberFebruary 24, 2020 at 8:04 AM
Nick,Ā Ā Ā Ā Is this a custom class?Ā Or a native one?Ā If it is native,Ā what class is it?Ā Ā
Ā Ā Ā Ā Does the class Extend RunBaseBatch?Ā
Regards,
——————————
Corey Vantilborg
ERP Analyst
Tigercat International Inc.
Brantford ON
——————————
——————————————- -
Nick Mart
MemberFebruary 24, 2020 at 8:13 AM
?Corey,It is a custom built class. Like the others that we already use, I do not see where the new one extends RunBaseBatch.
——————————
Nick Mart
developer
Winnebago Industries
Forest City IA
——————————
——————————————- -
Corey Vantilborg
MemberFebruary 24, 2020 at 8:41 AM
Nick,Ā Ā Ā Ā Ā The normal way to create a batch class is to extend RunBaseBatch,Ā it is going to be difficult to replicate the Batch framework functionality without extending RunBaseBatch.Ā The class extension provides most of the hooks that make the batch framework function.Ā
Ā Ā Ā Ā Ā If you have custom classes that run in Batch which do not extend RunBaseBatch I would interested in how that was accomplished, and why.Ā Ā It is not best practice and it seems like it would just be creating extra work because you need to replicate already built functionality.
Ā Ā Ā Ā Ā If you open RunBaseBatch and look at the methods you will find some of underlying pieces needed for the batch framework.Ā Here is what the class declaration of RunBaseBatch says about it:
/// <summary> /// All jobs that must be able to run in a batch must inherit from this class. /// </summary> /// <remarks> /// You will have to consider what <see cref="M:RunBaseBatch.canGoBatch" /> and <see /// cref="M:RunBaseBatch.canGoBatchJournal" /> should return.For examples, see <see cref="T:RunBase" /> /// and <see cref="T:Tutorial_RunbaseBatch" />. /// </remarks> // This is a framework class. Customizing this class may cause problems with future upgrades to the software. /* RunBaseBatch must by inherited by all classes, which should be batchable. */?
——————————
Corey Vantilborg
ERP Analyst
Tigercat International Inc.
Brantford ON
——————————
——————————————- -
Guy Terry
MemberFebruary 24, 2020 at 5:48 PM
Hi Nick,In my experience, if the Class does not appear in the drop-down when you are creating a new Batch task, then you are not going to be able to add it that way, even if you type the Class name in.
Often, the functionality has a dialogue box, with a button that you can use to submit it to Batch. But I guess you are familiar with that from the many standard periodic jobs which do this. Are you sure it’s not possible to add it as a Batch job that way?
I believe it is also possible to create a Batch job and add task(s) to it using a Job (that is, a Job in the AOT). You might need to do this if you want to create several Batch tasks in a single Batch job. Not being a developer, I have no idea how to do this, but developers have written me such Jobs in the past.
——————————
Guy Terry
Application Consultant
Annata
Portsmouth
——————————
——————————————- -
Nick Mart
MemberFebruary 25, 2020 at 9:59 AM
?Guy,Thank you for the idea about Jobs. That appears to be how it was done to create our other batch jobs similar to this one.
——————————
Nick Mart
developer
Winnebago Industries
Forest City IA
——————————
——————————————- -
Soren Normann Rasmussen
MemberFebruary 25, 2020 at 5:03 PM
Hi Nick,
are you able to share the job used.
That might be helpful of others in a similar situation.
And for myself I’m curious about how that looks.
Thank Soren——————————
Soren Normann Rasmussen
SSS Australia
Murarrie
——————————
——————————————- -
Nick Mart
MemberFebruary 26, 2020 at 8:51 AM
Soren,?I am not able to share our version of the coding. However, I did find a very similarĀ example on the web. Here is that link.
https://www.schweda.net/blog_ax.php?bid=654&wdl=en
——————————
Nick Mart
developer
Winnebago Industries
Forest City IA
——————————
——————————————- -
wishnu liu
MemberMarch 3, 2020 at 6:38 PM
We are aware of the CanGoBatchJournal state of affairs. As said, we’ve got different batch jobs with responsibilities that don’t have that technique. We have tried to key inside the elegance website call. That did no longer paintings.——————————
wishnu liu
soul
——————————
——————————————-
DSC Communities replied 5 years, 6 months ago 1 Member · 0 Replies -
-
0 Replies
Sorry, there were no replies found.
The discussion ‘Batch job configuration’ is closed to new replies.