| 317 | } |
| 318 | |
| 319 | bool ExecutionPlan::setFailureCallback(std::function<void(flow_file_record*)> onerror_callback) { |
| 320 | if (finalized && !failure_handler_) { |
| 321 | return false; // Already finalized the flow without failure handler processor |
| 322 | } |
| 323 | if (!failure_handler_) { |
| 324 | failure_handler_ = std::make_shared<FailureHandler>(getContentRepo()); |
| 325 | } |
| 326 | failure_handler_->setCallback(onerror_callback); |
| 327 | return true; |
| 328 | } |
| 329 | |
| 330 | bool ExecutionPlan::setFailureStrategy(FailureStrategy start) { |
| 331 | if (!failure_handler_) { |
no test coverage detected