Commit Type

Previous Next

See Also

You can specify the commit behavior of a batch job by setting the Commit Type attribute of a job, the Commit Type attribute of a task within a job, or both.

The commit type of a job can be:

· None:

No commit is issued. Use this if the job is to be incorporated into a larger process, for example another batch job. All tasks of the job automatically get Commit Type: None. This can not be changed.

· Task:

The commit type is to be specified at task level, for each task separately.

· Job:

One commit or rollback is issued at the end of the job. All tasks of the job automatically get Commit Type: None. This can not be changed.

NOTES:

Job Commit Type: None has the same effect as Job Commit Type: Task with commit type: None for each task.

Job Commit Type: Job does NOT have the same effect as Job Commit Type: Task with commit type: Task for the last task, and None for the other tasks.

The difference is in error handling: With Job Commit Type: Job, a rollback is executed if the job aborts halfway, with Job Commit Type: Task, and Commit Type: None for all except the last task, there will be no rollback.

The commit type of a task within a job can be:

· None:

No commit or rollback is issued. Even in the case of an error, there will be no rollback.

When all tasks in a job have commit type: None, then no commit is issued. When this job is called using the Batch Runner, all manipulations are rolled back at the end of the job. When it is called from an application using the ActionStartJob() method or "INVOKE BatchRunner", the transaction stays open. The commit can then be done in the application.

· Record:

Each manipulated record is committed separately. A record-level commit can only be specified for import tasks and SQL tasks.

· Task:

One commit or rollback is issued at the end of the task.

For details about how a task-level commit type and a record-level commit type are handled for import tasks and SQL tasks, refer to: Task-Level Commit vs. Record-Level Commit.

For an overview of all possible combinations of the Abort Mode and Commit Type settings for the different types of tasks, see: "Abort Mode and Commit Type Combinations" Abort Mode and Commit Type Combinations.