我在Microsoft Dynamics AX 2012中使用数据导入导出框架,以便将自定义数据(TestTable)从ax导出到文件。我成功地做到了。
现在,我想手动创建批处理作业,然后为分段作业和导出作业分配批处理作业任务,以便在后台执行此导出。我不知道如何实现它,现在我试图通过复制Tutorial_RunbaseForm
类来创建我自己的批处理。
要了解如何在AX中设置执行作业作为批处理作业我已经开始使用暂存作业:
Processing group > Get staging data > Create new job id > Select batch processing check box
并得到以下信息:
暂存:将ExportAXType-3作业添加到批处理队列。
在Processing group > Execution history
我的作业有waiting
状态,当我点击view staging data
暂存数据时,此时没有显示任何内容。
在System administration > Inquiries > Batch job
我选择我的工作并点击View task
按钮,然后点击Parameters
按钮,系统会显示错误:
无法更改未处于“保留”状态的批处理作业
更新:
通过批量导出工作,我发现了这个错误:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeNewObjIntPtr(String typeName, IntPtr intPtr)
at Microsoft.Dynamics.Ax.Xpp.XppObjectBase.callReturn(KernelCallReturnVal returnVal)
at Microsoft.Dynamics.Ax.Xpp.DictTable.Makerecord()
at Dynamics.Ax.Application.DMFEntityWriter.writeToStaging(String _definitionGroup, String _executionId, DMFEntity entity) in DMFEntityWriter.writeToStaging.xpp:line 46
at Dynamics.Ax.Application.DMFStagingWriter.execute(String _executionId, Int64 _batchId, Boolean _runOnService, Boolean _calledFrom, Boolean , Boolean ) in DMFStagingWriter.execute.xpp:line 255
at Dynamics.Ax.Application.DMFStagingWriter.@execute(String _executionId, Int64 _batchId, Boolean _runOnService, Boolean )
at Dynamics.Ax.Application.DMFStagingWriter.execute(String _executionId, Int64 _batchId, Boolean _runOnService)
at Dynamics.Ax.Application.DMFStagingWriter.runOnServer(String _executionId, Int64 _batchId, Boolean runOn) in DMFStagingWriter.runOnServer.xpp:line 3
at Dynamics.Ax.Application.DMFStagingWriter.Run() in DMFStagingWriter.run.xpp:line 22
at Dynamics.Ax.Application.BatchRun.runJobStaticCode(Int64 batchId) in BatchRun.runJobStaticCode.xpp:line 54
at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) in BatchRun.runJobStatic.xpp:line 13
at BatchRun::runJobStatic(Object[] )
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
at BatchIL.taskThreadEntry(Object threadArg)