7.0 Jobs DTD

The Identity Manager Job Scheduler lets you create and schedule jobs that you want to perform on Identity Manager servers. This section introduces the XML structure of the job objects used by the Job Scheduler, and includes the following topics:

7.1 Jobs XML

The XML that defines a job consists of two main parts: a <job-definition> section and zero or more <xliff> sections that provide localized strings for the <job-definition>. The two parts are aggregated in order to ease storage on the job definition object. The Jobs DTD is as follows:

<!ENTITY % Job-Type "java | script">
<!ENTITY % Result-Type "intermediate | final">
<!ENTITY % Result-Level "success | warning | error | aborted">
<!ENTITY % Boolean "true | false">
<!ELEMENT job-aggregation (job-definition, xliff*)>
<!ELEMENT job-definition (description, containment*, java-class, configuration-values?, result-processing*>
<!ATTLIST job-definition
  display-name CDATA #REQUIRED
  type (%Job-Type) #REQUIRED
  schedule CDATA #IMPLIED
  scope-required (%Boolean) "false"
  disabled (%Boolean) "false"
  auto-delete (%Boolean) "false" 
>
<!ELEMENT description (#PCDATA) >
<!ELEMENT containment (#PCDATA) >
<!ELEMENT java-class (#PCDATA)>
<!ELEMENT result-processing (audit | email)+ >
<!ATTLIST result-processing
  type (%Result-Type) "final"
>
<!ELEMENT audit NONE>
<!ATTLIST audit
  on-level (%Result-Level) #REQUIRED
>
<!ELEMENT email (to+, cc*, bcc*, reply-to+)>
<!ATTLIST email
  on-level (%Result-Level) #REQUIRED
  encoding CDATA #IMPLIED
>
<!ELEMENT to (#PCDATA) >
<!ELEMENT cc (#PCDATA) >
<!ELEMENT bcc (#PCDATA) >
<!ELEMENT reply-to (#PCDATA) >

The Jobs XML makes use of the following elements:

audit

Indicates that job result notification will be issued through the Novell Audit system.

Attributes

Attribute

Possible Values

Default Value

on-level

success | warning | error | aborted

Specifies the result level for which this audit notification applies. You can include an audit elements for each result level that you want to generate a notification.

#REQUIRED

Parent Elements

result-processing

bcc

Specifies a list of email addresses to place in the blind copy (BCC) field when sending a results notification email.

Attributes

None

Parent Elements

email

cc

Specifies a list of email addresses to place in the carbon copy (CC)) field when sending a results notification email.

Attributes

None

Parent Elements

email

containment

Zero or more containment elements describe any restrictions to the eDirectory objects that can contain the DirXML-Job object representing the job. If no containment element appears then the DirXML-Job object may be contained by either a DirXML-DriverSet or DirXML-Driver object.

Attributes

None

Parent Elements

job-definition

description

The description element contains a human-readable description of the job.

Attributes

None

Parent Elements

job-definition

email

Indicates that job result notifications are issued via an email message. The email message is constructed from an email template specified by the DirXML-EmailTemplates attribute on the DirXML-Job object. The email recipients are specified in the email element's child elements: to, cc, and bcc. The email’s reply-to address is specified by the email element's child reply-to element.

Attributes

Attribute

Possible Values

Default Value

on-level

success | warning | error | aborted

Specifies the result level for which this email notification applies. You can include an audit elements for each result level that you want to generate a notification.

#REQUIRED

encoding

CDATA

Specifies the encoding method to use with the email message.

#IMPLIED

Parent Elements

result-processing

java-class

Contains the fully-qualified name of the java class that implements the job. There must be exactly one java-class element per job.

Attributes

None

Parent Elements

job-definition

job-aggregation

Functions as the container object for a job and aggregates the job-definition information and any xliff data used for language translation.

Attributes

None

Parent Elements

None

job-definition

Contains XML attributes and elements which define much of the job.

Attributes

Attribute

Possible Values

Default Value

display-name

CDATA

Specifies the job name displayed in the Job Scheduler UI.

#REQUIRED

type

java

Specifies the language used to write the job. The only supported option is java.

#REQUIRED

schedule

CDATA

Specifies the schedule used to run the job. This is configured in the Job Scheduler UI.

#IMPLIED

scope-required

true | false

Specifies if a job scope is necessary. The job scope defines the Identity Vault objects that the job works with, and is determined by the job developer.

False

disabled

true | false

Specifies, when true, that the job is not available to run.

False

auto-delete

true | false

Indicates, when true, that the job is a one-time job that should be deleted after it runs.

False

Parent Elements

job-aggregation

reply-to

Specifies a Reply To email address to place in the From field when sending a results notification email.

Attributes

None

Parent Elements

email

result-processing

Describes how the job results (both intermediate and final) are reported. There can be zero or more result-processing elements. A result-processing element describes how notification of job results is made; and contains one or more audit or email elements. Each result-processing element applies to either "final" or "intermediate" results, based on the value of the element's type attribute.

Attributes

Attribute

Possible Values

Default Value

type

intermediate | final

Specifies whether the results-processing element applies to intermediate results that occur during job processing, or the final results when the job completes.

final

Parent Elements

job-definition

to

Specifies a list of email addresses to place in the To field when sending a results notification email.

Attributes

None

Parent Elements

email

xliff

Provides localized strings for use by the job-definition object. The xliff format is an open standard. For more information about xliff, see the XLIFF Web site.

Parent Elements

job-aggregation

7.2 Example Job XML

Example 1

<job-aggregation>
<job-definition
  type="java"
  schedule="0 2 * * 1-5"
>
  <containment>DirXML-Driver</containment>
  <java-class>com.novell.nds.dirxml.jobs.builtin.PasswordGeneration</java-class>
  <configuration-values>
    <definitions>
      <definition
        type="dn-ref"
        name="password-policy"
        display-name="Password policy object"
        attr-name="DirXML-PasswordPolicyRef"
        aux-class-name="DirXML-PasswordGenAttrs"
      >
        <value/>
      </definition>
    </definitions>
  </configuration-values>
</job-definition>
</job-aggregation>

Example 2

<job-aggregation>
<job-definition
  type="java"
  schedule="0 2 * * 1-5"
>
  <containment>DirXML-Driver</containment>
  <java-class>com.novell.nds.dirxml.jobs.builtin.SubSubmitter</java-class>
  <configuration-values>
    <definitions>
      <definition
        type="string"
        name="doc"
        display-name="Document to submit"
        multiline="true"
      >
        <value>
          <nds>
            <input>
              <query scope="subtree">
                <association>{123456}</association>
                <search-class class-name="User"/>
                <read-attr/>
              </query>
            </input>
          </nds>
        </value>
      </definition>
    </definitions>
  </configuration-values>
</job-definition>
</job-aggregation>