Retry Database Connection
This Workflow Snippet shows how to try connecting to a database multiple times using a try catch block and a loop. The loop stops either:
- when the retry count reaches the maximum defined at the Counting Loop Start node OR
- when a successful DB connection is established
To simulate the behaviour of unsuccessful retries, configure the Counting Loop Start node with number of loops <= 3.
The Fail Workflow Component at the end is important ONLY for execution on a KNIME Server. It detects if a successful connection has been established during the retries and throws an error marking the overall workflow execution unsuccessful.
Workflow
Retry Database Connection
Used extensions & nodes
Created with KNIME Analytics Platform version 4.4.2
Legal
By using or downloading the workflow, you agree to our terms and conditions.