Retry Database Connection
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.
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.