Hi,
I'm trying to run a Batch job with many tasks, but my AX client crashes when I run the job to schedule the batch job and it's tasks.
I checked, AOS is set as batch server, so no issues with that.
Batch class:
class ParallelBatchTest extends RunBaseBatch { #define.CurrentVersion(1) int batchNo; } public void new() { super(); } public container pack() { return conNull(); } private void parmBatchNo(int _batchNo) { BatchNo = _batchNo; } void run() { batchtest batchtest; batchtest.BatchNo=BatchNo; batchtest.insert(); } public boolean unpack(container packedClass) { return true; } public static ParallelBatchTest construct(int _batchNo) { ParallelBatchTest c; c = new ParallelBatchTest(); c.parmBatchNo(_batchNo); return c; }
Job to schedule batch and it's tasks:
static void batchTest(Args _args) { BatchHeader batchHeader; ParallelBatchTest parallelBatchTest; BatchInfo batchInfo; int i,taskCount=5; batchHeader = BatchHeader::construct(); batchHeader.parmCaption(strFmt('Batch JOB 1')); for (i=1; i <= taskCount; i++) { parallelBatchTest = ParallelBatchTest::construct(i); batchInfo = parallelBatchTest.batchInfo(); BatchInfo.parmCaption('BatchTest'+int2str(i)); batchHeader.addTask(parallelBatchTest); } batchHeader.save(); ttsCommit; info('Done'); }
Table:
AX CLIENT CRASH:
Will appreciate any tips to resolve the issue.
*This post is locked for comments