This process would be a common process for your users. This allows users to submit long-running tasks to the server, allowing them to continue using AX while the server processes the task. This is often underused, leaving users to watch an unresponsive screen while they wait for complex routines to finish (for example, a set of delivery notes to be printed).
Most users will be able to submit jobs as batch tasks. This example submits a Master plan schedule to be run as a batch task, so we will require appropriate privileges. The process is similar for most tasks that utilize the batch framework.
We proceed as follows:
Master plan for procured items
.Many of the tasks you can perform interactively have a Batch tab that allows you to submit the task as a batch job. When the task is submitted, it is written to the batch queue with the following information:
The batch server(s) will select the jobs to process based on the following:
The batch server will rehydrate (unpacked from the batch job record's packed data container) the task and execute it under the security context of the user who submitted it, with the options the user specified.
Should the task succeed, the status will be updated to Ended and an alert will be sent to the user (if this was configured). If the job failed, the status will be changed to Error and an alert will be sent to the user (again, only if configured). In both the cases, the infolog (message) that was created by the task will be stored against the task, allowing the user or administrator to investigate any errors.
You can go to an item in the batch queue anytime before it starts executing to view and change the information on the initial dialog, alert request, or the recurrence information. You should first change the status to Waiting, as you will not be able to save the changes if the job starts in the mean time.
You can also create batch jobs directly in the queue. For instance, the AIF-processing jobs are configured in this way.
The following example is to add the AIF tasks to a batch job:
AIF Receive
.AifGatewayReceiveService
for the class name.AifInboundProcessingService
AifOutboundProcessingService
AifGatewaySendService
You can also use functions to generate relative dates; these are not documented formally, but the code is well-documented and easily read by a developer.
A developer can even extend them to provide more functions to the user.
These are the static
methods on the class SysQueryRangeUtil
.
The common methods are:
Function |
Example usage in a query range criteria |
---|---|
|
( |
|
( |
|
( |
|
( |
|
( |
|
( |
|
( |
|
( |
|
( |
|
( |
|
( |
|
( |
|
( |
3.147.79.84