  |
In the Repository: Right-click on Job Designs. In the menu, click Create Job to open the New Job wizard. In the wizard, name the Job: Exercise13_0.
Next
|
  |
Open Exercise1_0 Job and copy the tRowGenerator component. Paste it in the Exercise13_0 Job.
Next
|
  |
In the Palette: Click the File > Output folder. Click the tFileOutputDelimited and drop it on the Job Designer to place it to the right of the tRowGenerator.
Next
|
  |
In the Job Designer: Right-click the tRowGenerator, hold and drag to the tFileOutputDelimited to create the row link.
Next
|
  |
 | Step 1: Include an error in your Job
|
In the Job Designer: Double-click the tFileOutputDelimited component to display its Component view. Click [...] next to the File Name field to specify the path and name of the file your are creating. The path shall not exist.
Next
|
  |
In the Component view: Click the Advanced settings tab. Uncheck the Create directory if not exists box to obtain an error when executing the Job.
Next
|
  |
Press F6 to run the Job and see the errors.
Next
|
  |
In the Palette: Click the Misc folder. Click the tMsgBox component and drop it on the Job Designer below the tFileOutputDelimited.
Next
|
  |
 | Step 2: Use the OnErrorComponent link
|
In the Job Designer: Right-click the tFileOutputDelimited component and select Trigger > On Component Error in the menu, then click the tMsgBox.
Next
|
  |
In the Job Designer: Define the context variable that will be used to display the error message. Click the Context view. Click [+] to add a line in the Variables tab and name this new variable: error_message. Select this new variable and click the Values as table tab. In the Default field, type in "Error of tFileOutputDelimited".
Next
|
  |
In the Job Designer: Double-click the tMsgBox to display the Component view. In the Message field, press Ctrl+Space to display the autocompletion list. In this list, click the new context.error_message variable.
Next
|
  |
Press F6 to run the Job. A message box will appear and display the error message.
Next
|
  |
 | Step 3: Add a tDie component
|
In the Palette: Click the Logs & Errors folder. Click the tDie component and drop it on the Job Designer instead of the tMsgBox. Double-click the tDie to display its Component view. In the Comment field, press Ctrl+Space to display the autocompletion list. In this list, click the context.error_message variable.
Next
|
  |
Select the OnComponentError link at the tMsgBox and move it to the tDie. Then, delete the tMsgBox component.
Next
|
  |
 | Step 4: Add a tWarn component
|
In the Palette: Click the tWarn component and drop it on the Job Designer above the tRowGenerator.
Next
|
  |
In the Job Designer: Double-click the tWarn to display its Component view. In the Warn message field, type in "Job Start". Right-click the tWarn, select Trigger > OnSubjobOk in the menu and then click the tRowGenerator to create a link.
Next
|
  |
 | Step 5: Catch the message with a tLogCatcher
|
In the Palette: Click the tLogCatcher and drop it on the Job Designer to the top right of the Job Designer.
Next
|
  |
In the Palette: Click the tLogRow component and drop it on the Job Designer below the tLogCatcher.
Next
|
  |
In the Job Designer: Right-click the tLogCatcher, hold and drag to the tLogRow to create a row link.
Next
|
  |
Press F6 to run the Job and look at the log messages in the Console, including the one which is linked to the file creation error.
Next
|
  |
In the Palette: Click the Misc folder. Click the tMsgBox component and drop it on the Job Designer below the tRowGenerator.
Next
|
  |
In the Job Designer: Right-click the tRowGenerator component and select Trigger > On SubJob Ok in the menu, then click the tMsgBox. Double-click the tMsgBox to display its Component view. In the Message field, type in the message: "Job is done!".
Next
|
  |
Press F6 to run the job and observe that the tDie component kills the job so that the tMsgBox is not executed.
Next
|
  |
 | Step 6: Correct the error and run the Job
|
Double-click the tFileOutputDelimited component to display the Component view. Click the Advanced settings tab. Check the Create directory if not exists box.
Next
|
  |
Press F6 to run the Job again, analyze the Log messages in the Console and observe the execution of the tMsgbox.
|