Forcing a status with an abort Job or success entry

Each Job itself ends with a status: success or failure. This status depends on the status of the last executed entry. However, you can force the final status of a Job to a fixed value.
To show this as a practical example, let's go back to the Job that created the folder; the one you created in the section Getting Familiar with the Job Design Process. In this Job, if the folder was not created, you wrote a message to the log. As the last entry was Write To Log, and PDI could successfully write to the log, the final status of the Job was a success. It makes sense, however, that the Job fails. So this is how you revert the status:

  1. Open the Job.
  2. Add an Abort job entry after Write To Log. You will find this entry under the Utility category of entries. By adding this entry, you force the Job to abort after executing Write To Log.
  3. Save and run the Job. You will see that now the Job aborts after writing the custom message to the log.

In general, you can append an Abort job entry to any entry, forcing the Job to fail.

The counterpart to the Abort job entry is the Success entry, which you can find under the General category. If you append a Success entry after any entry, you are forcing a successful result, ignoring the error in case that entry fails.