Icon

JKISeason2-17-tark

JKISeason2-17

JKISeason2-17
https://www.knime.com/just-knime-it

Challenge 17: Better Workflows with Error Handling and Logging
Level: Hard

Description: The goal of this challenge is to remind you of the importance of building robust solutions with error handling and logging. These are best practices in workflow development that are often forgotten, but make a big difference in the end -- especially if the application is critical or if you are working with a team. Concretely, you will pick any workflow of your choice and add the following elements to it:

Error handling: Use the Try & Catch construction;
Logging - Extract the workflow name, username, start and end of the execution. Next, create a table containing these metadata as well as the name of a failing node (if any) and its message in one row, and write this table to a CSV file. Make sure that once the workflow is executed again, a new row is appended to the log table in the CSV file. Optionally, you can add more columns to your log file, e.g., the column with a custom message depending on the execution status - success or failure. You can also create a logging component that takes workflow name, username, start and end of the execution as input, allows configuring the custom message, and updates the log file.
Author: Lada Rudnitckaia

Data(stored in the currentworkflow data area) Output and log(stored in the currentworkflow data area) sum (working hours)mean (working hours)min (Date)max (Date) An error occurswith the third file.A list ofthe three filesNode 10Node 11Node 12Node 17Node 18Staus= failureStatus= successerror logworking hours_week1working hours_week2working hours_week3(A file with aninappropriate date value)Start dateAppend user logRead user logDelete user logNode 62Node 63user logNode 65add file nameExtract file namesfrom pathsGroupBy String to Date&Time List Files/Folders Table Row ToVariable Loop Start CSV Reader Loop End Try (VariablePorts) Catch Errors(Data Ports) Table Creator ConstantValue Column Metanode CSV Reader CSV Reader CSV Reader Metanode CSV Writer CSV Reader DeleteFiles/Folders Column Rename Column Appender Metanode Missing Value ConstantValue Column Metanode Data(stored in the currentworkflow data area) Output and log(stored in the currentworkflow data area) sum (working hours)mean (working hours)min (Date)max (Date) An error occurswith the third file.A list ofthe three filesNode 10Node 11Node 12Node 17Node 18Staus= failureStatus= successerror logworking hours_week1working hours_week2working hours_week3(A file with aninappropriate date value)Start dateAppend user logRead user logDelete user logNode 62Node 63user logNode 65add file nameExtract file namesfrom pathsGroupBy String to Date&Time List Files/Folders Table Row ToVariable Loop Start CSV Reader Loop End Try (VariablePorts) Catch Errors(Data Ports) Table Creator ConstantValue Column Metanode CSV Reader CSV Reader CSV Reader Metanode CSV Writer CSV Reader DeleteFiles/Folders Column Rename Column Appender Metanode Missing Value ConstantValue Column Metanode

Nodes

Extensions

Links