Child pages
  • Job Execution

This is the documentation of the release 2.2 of automaIT. The documentation of the latest stable release can be found at AUTOMAIT.

Skip to end of metadata
Go to start of metadata

In many cases when the user interacts with automaIT jobs are put in a queue (FIFO). The internal job engine takes care that these are executed in order of the execution request. The job engine optimizes overall performance by executing jobs concurrently as much as possible and at the same time isolates jobs if it is required for consistency. During its life cycle, a job passes through a sequence of states.

Job Status

Jobs are generally queued. If the queue is empty the job is started immediately. Possible end states are COMPLETED, FAILED, ABORTED or CANCELLED.

The following table lists possible job statuses.

StatusDescription
QUEUEDThe job is queued for execution and will be started as soon as possible.
STARTEDThe job is being executed.
COMPLETEDThe job terminated without any errors during execution.
FAILEDThe job terminated with an execution error like an error during the native execution (execNative). See Classification of Errors.
ABORTEDThe job terminated with an unexpected error like a communication error or an exception that is not catchable. See Classification of Errors.
CANCELLEDThe job was terminated by the user (interactive cancellation or user-defined timeout).

The following picture shows the state transitions.

jobStatusTransitions

Job Status Aggregation

Jobs that are executions of a plan or a control method determine the job status by aggregating the job status of their tasks. Each task contains host or instance specific executions and returns a status. These host or instance specific executions are executed in parallel. As soon as all tasks have reached an end state the overall job state is calculated.

StatusDescription
QUEUEDThe job is queued for execution and will be started as soon as possible.
STARTEDThe host or instance specific tasks are being executed.
COMPLETEDThe job terminated and all of its tasks have the status COMPLETED.
FAILEDThe job terminated and none of the tasks have the status COMPLETED or ABORTED. At least one task is failed.
ABORTEDThe job terminated and at least one task has the status ABORTED.
CANCELLEDThe job terminated and at least one task was cancelled by the user. ABORTED or FAILED must not occur.

The following picture shows all possibilities for the state aggregation and the resulting status of the aggregating job.

JobInstanceStatus

 

Job Isolation

Following isolation levels are available:

Isolation levelDescription
(green star) Concurrent

Jobs marked as "concurrent" will be executed in parallel. The given jobs will be immediately started unless there is an already waiting "serialized" or "partially concurrent" job, in this case the jobs will wait in the queue (FIFO) until the previous jobs are finished. Subsequently, the given concurrent jobs will be started in parallel.

(star) Partially concurrent

Jobs marked as "partially concurrent" will be executed in parallel if other "concurrent" jobs are currently active, but sequentially with other "serialized" or "partially concurrent" jobs. Jobs that are submitted after this one will wait until this job is finished.

(red star) SerializedJobs marked as "serialized" will be executed sequentially. The given job will wait until the current active jobs are finished and then it will start. During the execution of the given job, no other job will be active. Jobs that are submitted after this serialized job will wait until this job is finished.

The job type defines which isolation level is required:

DomainJob typeIsolation level
HostCreate host type(star) Partially concurrent
 Create host(star) Partially concurrent
 Update host(star) Partially concurrent
 Update and initialize host(red star) Serialized
 Create and initialize host(red star) Serialized
 Delete host(red star) Serialized
PlanUpdate plan(star) Partially concurrent
 Delete plan(red star) Serialized
 Execute plan(green star) Concurrent
ComponentUpdate component or abstract system service(star) Partially concurrent
 Update concrete system service(red star) Serialized
 Delete component(red star) Serialized
 Install component, execute component method, uninstall component instance(green star) Concurrent
Plug-inImport plug-in (with non-abstract component or system service or host search or host set or host type)(red star) Serialized
 Import plug-in (else...)(star) Partially concurrent
 Delete plug-in(red star) Serialized

The user cannot influence the isolation level of a given job. The job engine of automaIT takes care that a maximum of concurrency is achieved.

In practice, plan and component method executions are most common and consume the most time. Therefore the overall gain is higher than expected when just seeing the listing above.

If concurrent jobs access the same host then host locking assures that the access is synchronized.

  

  • No labels