Microsoft Dynamics AX
Microsoft Dynamics AX is a complete ERP solution for enterprises that provides a purpose-built foundation across five industries, along with comprehensive, core ERP functionality for financial, human resources and operations management. ActiveBatch supports the submission of Microsoft Dynamics AX batch jobs.
ActiveBatch supports Microsoft Dynamics AX 2012. The .Net Business Connector (included as part of the product) must be installed on both the Job Scheduler machine as well as any Execution Agents that are expected to be used to execute the job steps in this chapter. Several job steps require AX32.exe as well as the Management Utilities (AXUTIL.exe) to also be installed.

This job step allows you to call a Static Class method.
Job Step Properties
Class – This property contains the name of the static class.
Method – This property contains the name of the method you want to invoke.
Logon Parameters – This collection of properties is used to create a session and connect to the Microsoft Dynamics AX system. For Best Practices, we suggest you use the “Logon” job step; you can then avoid having to specify any values for this parameter collection at all.
Metadata Service Options – This set of properties set options for the Dynamics AX AIF metadata service. This is principally used by the “dropdown helpers” that can be used by Job Step design time.
-
Metadata Service Endpoint – The endpoint for the metadata service. This is a net.tcp endpoint.
-
User Principal Name – The name of the user, in UPN format (name@domain), to be used when connecting to the service.
Return Step Value
The return value from the method just executed is returned in this property.

This job step cancels an existing batch job.
Job Step Properties
Batch Job – This property represents the batch job of which the latest instance will be set to “canceled”.
Logon Parameters – This collection of properties is used to create a session and connect to the Microsoft Dynamics AX system. For Best Practices, we suggest you use the “Logon” job step; you can then avoid having to specify any values for this parameter collection at all.

This job step allows you to compile.
Job Step Properties
Application Object Server – This property represents the name of the machine that the Microsoft Dynamics AX AOS resides on.
Port – This property represents the port that the AOS listens.
Configuration File – This property represents an exported Axpata configuration file.
Type – This property indicates the type of compilation (XPP or CIL).
Update Cross References – This Boolean property indicates whether to update the cross references.
Wait For Completion – This Boolean property indicates whether to wait for completion of the compilation.
Log File Path – This property indicates the location of the compilation log file. This is especially useful when compiling CIL since the log file is present on the server. In that case, a UNC specification allows a CIL compilation to be executed from a remote machine.
Note: The compilation is performed through the AX32 utility program. This program is interactive in nature and this job will start the utility through the ABATIDH interactive desktop helper. The execution user must have an interactive desktop on the execution machine for this job step to operate properly.

This job step allows you to export model or model store.
Microsoft Dynamics AX: Export Model
Microsoft Dynamics AX: Export Model Store
Job Step Properties
Export Type – This dropdown property indicates the type of export; model or model store.
-
Model Name – Model type: Name of the model to export.
-
File Path – Model/Model Store type: Location to place the exported model file (.axmodel or axmodelstore).
-
SNK File – Model type: (Optional) The name of the “strong-name-key” file to use to sign the file.
Server – Optional: The name of the server that hosts the database. Default is local.
Database – Optional: The name of the database to access.
Overwrite – This optional Boolean property indicates whether to override the export file if present. Default is false.
Note: The Export operation is performed through the AXUTIL utility program.

This job step allows you to iterate and process different companies.
Job Step Properties
Context Name – This property represents an Execution Variable into which the “current” company is stored.
Logon Parameters – This collection of properties is used to create a session and connect to the Microsoft Dynamics AX system. For Best Practices, we suggest you use the “Logon” job step; you can then avoid having to specify any values for this parameter collection at all.

This job step allows you to enumerate any existing Microsoft Dynamics AX Batch jobs.
Job Step Properties
Context Name – This property represents an Execution variable that will be used in the nested job steps to access various properties that are enumerated for each batch job. The returned properties are as follows: CanceledBy, Caption, Company, CreatedBy, CreatedDateTime, EndDateTime, Finishing, LogLevel, OrigStartDateTime, RecId, RecVersion, RuntimeJob, StartDateTime, and Status.
Logon Parameters – This collection of properties is used to create a session and connect to the Microsoft Dynamics AX system. For Best Practices, we suggest you use the “Logon” job step; you can then avoid having to specify any values for this parameter collection at all.
Batch Job – This field takes as input a comma-separated set of record ids in the format that is returned by our drop down helpers for “Batch Jobs” (as in, the drop down for this very field or in the “Run Batch Job” job step). E.g, “12345, 12335, 11234, {{12234}} descriptiontexthere, description {{12334}} texthere”

This job step retrieves a Dynamics AX Batch job log file.
Job Step Properties
Batch Job History ID – This property represents the Batch Job History ID. This ID represents an instance of the Batch job and is provided when the job is run.
Write To Log – This Boolean property indicates whether the contents of the Batch job should be written to the ActiveBatch Job Log file.
Logon Parameters – This collection of properties is used to create a session and connect to the Microsoft Dynamics AX system. For Best Practices, we suggest you use the “Logon” job step; you can then avoid having to specify any values for this parameter collection at all.
Return Step Value
String – The contents of the batch job log file is returned in this property.

This job step allows you to obtain a specific Batch job’s status.
Job Step Properties
Batch Job History ID – This property represents the Batch Job History ID. This ID represents an instance of the Batch job and is provided when the job is run.
Logon Parameters – This collection of properties is used to create a session and connect to the Microsoft Dynamics AX system. For Best Practices, we suggest you use the “Logon” job step; you can then avoid having to specify any values for this parameter collection at all.
Return Step Value
Status – The completion status of this job is returned.

This job step logs off the already connected Microsoft Dynamics AX system.

This job step performs an Import Model, Model Store, Schema or XPO file operation.
Job Step Properties
Import Type – This dropdown property indicates the type of import: Model, ModelStore, Schema or XPOfile.
-
File Path – Model/ModelStore/XPOfile: The location of the file to be used for the import operation.
-
Conflict Resolution – Model: This property indicates what is to happen if an import conflict occurs. Overwrite indicates that the conflict is to be overwritten; Push indicates that a push to an appropriate update layer is to occur; Reject stops the import when a conflict is detected.
-
Schema Name – Model Store/Schema: The name of the schema to apply to the default schema.
Server – Optional: The name of the server that hosts the database. Default is local.
Database – Optional: The name of the database to access.
Note: The Import XPOfile is performed through the AX32 utility program; the others are performed through the AXUTIL.exe. This program is interactive in nature and this job will start the utility through the ABATIDH interactive desktop helper. The execution user must have an interactive desktop on the execution machine for this job step to operate properly.

This job step performs a logon operation to the specified Microsoft Dynamics AX system.
Job Step Properties
User Account – This property is a User Account object that contains security credentials for accessing the specified Microsoft Dynamics AX host.
Company – This property represents the company you want to select for this session. This property overrides the equivalent parameter value specified in the Configuration file.
Language – This property represents the language to use for Microsoft Dynamics AX labels.
Object Server – This property represents the Microsoft Dynamics AX Object Server (AOS) to connect to. This property overrides the equivalent parameter value specified in the Configuration file.
Configuration File – This property is the Configuration File (.axc) that is used to configuring the session.

This job step runs a specified Microsoft Dynamics Batch job.
Job Step Properties
Batch Job – This property represents the ID and Batch Job name that you want to run. A dropdown helper, assuming you’ve entered the correct Logon Parameters or Logon step, will help you enumerate and then fill in the requirements of this property.
Wait For Completion – This Boolean property indicates whether the job step is to wait for the Microsoft Dynamics AX job to complete. The default is True.
Logon Parameters – This collection of properties is used to create a session and connect to the Microsoft Dynamics AX system. For Best Practices, we suggest you use the “Logon” job step; you can then avoid having to specify any values for this parameter collection at all.
Return Step Value
BatchJobHistoryID – The Batch Job History ID of the submitted batch job is returned in this property.
Status – The status of the batch job, assuming you waited for completion, is returned in this property.
Log – The contents of the batch job is returned in this property.

This job step runs a specified Microsoft Dynamics Batch job.
Job Step Properties
Batch Job Caption – This property represents the Batch Job name that you want to run. A dropdown helper, assuming you’ve entered the correct Logon Parameters or Logon step, will help you enumerate and then fill in the requirements of this property.
Wait For Completion – This Boolean property indicates whether the job step is to wait for the Microsoft Dynamics AX job to complete. The default is True.
Logon Parameters – This collection of properties is used to create a session and connect to the Microsoft Dynamics AX system. For Best Practices, we suggest you use the “Logon” job step; you can then avoid having to specify any values for this parameter collection at all.
Return Step Value
BatchJobHistoryID – The Batch Job History ID of the submitted batch job is returned in this property.
Status – The status of the batch job, assuming you waited for completion, is returned in this property.
Log – The contents of the batch job is returned in this property.

This job step runs a Dynamics AX Task.
Job Step Properties
Task Class – This dropdown property contains the class name of the task. If you’ve specified either Logon Parameters or the Logon step you can enumerate through all the Task Classes found on the specified Object Server.
Parameters – This collection of parameters can be specified depending on what parameters are required for the Task Class you want to run.
Logon Parameters – This collection of properties is used to create a session and connect to the Microsoft Dynamics AX system. For Best Practices, we suggest you use the “Logon” job step; you can then avoid having to specify any values for this parameter collection at all.

This job step allows you to synchronize a batch job that you started but elected not to wait for its completion.
Job Step Properties
Batch Job History ID – This property represents the Batch Job History ID. This ID represents an instance of the Batch job and is provided when the job is run.
Logon Parameters – This collection of properties is used to create a session and connect to the Microsoft Dynamics AX system. For Best Practices, we suggest you use the “Logon” job step; you can then avoid having to specify any values for this parameter collection at all.
Return Step Value
BatchJobHistoryID – The Batch Job History ID of the submitted batch job is returned in this property.
Status – The status of the batch job, assuming you waited for completion, is returned in this property.
Log – The contents of the batch job is returned in this property.

This job step performs a database synchronization.
Job Step Properties
Application Object Server – This property represents the name of the machine that the Microsoft Dynamics AX AOS resides on.
Port – This property represents the port that the AOS listens.
Configuration File – This property represents an exported Axpata configuration file.
Success Rule – This set of properties indicates the criteria for determining whether the job step is successful or fails. By default, ActiveBatch will only fail this job step if the SysAutoRun.execSynchronize function returns false. Optionally you can indicate that if warnings or errors are present in the log file that should determine whether the job step is successful or not (and the return value from the above function call is ignored).
Note: The Synchronize Database is performed through the AX32 utility program. This program is interactive in nature and this job will start the utility through the ABATIDH interactive desktop helper. The execution user must have an interactive desktop on the execution machine for this job step to operate properly.