ComposantsComponents › OrchestrationOrchestration
Démarre le post-job : ce qu'il déclenche s'exécute après tous les autres sous-jobs du job, même quand l'un d'eux a échoué. C'est l'endroit du ménage : fermer ce qui a été ouvert, déplacer ou supprimer des fichiers de travail, écrire un message de fin. Starts the postjob: what it triggers runs after all the other subjobs of the job, even when one of them failed. It is the place for cleaning up: close what was opened, move or delete work files, write an end message.
EntréeInput
aucunenone il commence le post-jobit starts the postjob
SortieOutput
aucunenone pas de fluxno flow
Déclencheurs en sortieOutput triggers
On Component Ok un seul liena single link
Le tPostjob ne contient pas de code : il sert de point de départ. Le composant qu'il déclenche commence le post-job ; les sous-jobs qui en découlent (On Subjob Ok, Run if…) en font partie. The tPostjob contains no code: it is a starting point. The component it triggers starts the postjob; the subjobs that follow from it (On Subjob Ok, Run if…) belong to it.
Avec l'exécution multi-thread du job, le post-job attend que tous les sous-jobs parallèles soient finis. With multi-thread execution of the job, the postjob waits for all the parallel subjobs to be finished.
Le tPostjob n'a aucun paramètre : ni paramètre simple, ni paramètre avancé, ni variable globale. Un job n'accepte qu'un seul tPostjob. The tPostjob has no settings: no basic setting, no advanced setting, no global variable. A job accepts only one tPostjob.
Chaque tJava écrit le message indiqué. Sorties copiées depuis une exécution du job ; dans les erreurs, le nom du job est remplacé par MyJob et les traces d'exception sont abrégées.
Each tJava writes the message shown. Outputs copied from a run of the job; in the errors, the job name is replaced with MyJob and the exception traces are shortened.
Prejob: step 1 Prejob: step 2 Main subjob: processing Postjob: closing
Le sous-job principal (tJava_1) lève une exception ; le post-job écrit Postjob: closing.
The main subjob (tJava_1) throws an exception; the postjob writes Postjob: closing.
System.out.println("Main subjob: start");
if (true) {
throw new RuntimeException("Database unavailable");
}
Main subjob: start Exception in component tJava_1 (MyJob) java.lang.RuntimeException: Database unavailable at … Postjob: closing
Le post-job s'exécute malgré l'erreur ; le job se termine avec le code 1. The postjob runs despite the error; the job ends with code 1.
tDie_1 : message "File not found", code d'erreur 4. Avec un post-job :
tDie_1: message "File not found", error code 4. With a postjob:
Main subjob: start File not found Postjob: closing
Le job se termine avec le code 1 ; sans le tPostjob, le même job se termine avec le code 4 du tDie. Chaque sous-job efface le code d'erreur avant de démarrer, le post-job compris : seul reste l'état d'échec, qui donne 1. Un ordonnanceur qui lit le code du tDie ne le voit donc plus. The job ends with code 1; without the tPostjob, the same job ends with the tDie code 4. Each subjob clears the error code before starting, the postjob included: only the failure status remains, which gives 1. A scheduler that reads the tDie code therefore no longer sees it.
Un tDie avec Quitter la JVM immédiatement arrête tout sur-le-champ : le post-job ne s'exécute pas (voir l'exemple du tPrejob). Le post-job ne passe pas non plus quand le job est tué de l'extérieur. A tDie with Exit the JVM immediately stops everything at once: the postjob does not run (see the tPrejob example). The postjob does not run either when the job is killed from outside.
Le post-job peut suivre un sous-job interrompu au milieu : un fichier peut manquer, une connexion ne pas être ouverte. Testez ce qui doit l'être avant d'agir (un Run if, une option du composant pour ne pas échouer sur un fichier absent). The postjob can follow a subjob stopped halfway: a file may be missing, a connection may not be open. Test what needs to be tested before acting (a Run if, a component option not to fail on a missing file).
D'autres composants de la famille Orchestration : Other components of the Orchestration family:
tPrejob · démarre le pré-job, exécuté au débutstarts the prejob, run at the starttRunJob · lance un autre job du projetruns another job of the projecttParallelize · lance des sous-jobs en parallèleruns subjobs in paralleltLoop · crée une boucle pour un lien Iteratecreates a loop for an iterate linktSleep · met le job en pausepauses the job