A.4 Built-in JDL Functions and Variables

The information in this section defines the built-in ZENworks Orchestrator JDL functions and variables.

A.4.1 getMatrix()

This function returns the matrix grid object. For more information, see MatrixInfo.

Purpose: The matrix object is used to retrieve other grid objects in the system.

A.4.2 system(cmd)

This executes a system command in a shell on the resource. The command is passed to the operating system’s default command interpreter. On Microsoft Windows systems this is cmd.exe, while on POSIX systems, this is /bin/sh. Stdout and stderr are directed to the job log. No access to stdin is provided.

Returns: Returns an exit code result of the command execution.

A.4.3 Grid Object TYPE_* Variables

The list of variables are constants for grid object type. For more information, see MatrixInfo.

Variable Names:

TYPE_USER
TYPE_JOB
TYPE_RESOURCE
TYPE_VMHOST
TYPE_REPOSITORY
TYPE_USERGROUP
TYPE_JOBGROUP
TYPE_RESOURCEGROUP
TYPE_REPOSITORYGROUP

Type: String.

Purpose: Use these in JDL functions for retrieving and creating grid objects.

A.4.4 The __agent__ Variable

Variable Name: __agent__

Type: Boolean.

Purpose: Defines whether the JDL is executing on the agent.

A.4.5 The __jobname__ Variable

Variable Name: __jobname__

Type: String.

Purpose: Defines the name of the deployed job.

A.4.6 The __mode__ Variable

Variable Name: __mode__

Type: String.

Purpose: Defines the execution mode.

Values:

parse - JDL is being parsed.

deploy - JDL is being deployed.

undeploy - JDL is being undeployed.

runtime - JDL is being executed.