| 294 | } |
| 295 | |
| 296 | std::shared_ptr<minifi::Connection> ExecutionPlan::connectProcessors(std::shared_ptr<core::Processor> src_proc, std::shared_ptr<core::Processor> dst_proc, core::Relationship relationship, |
| 297 | bool set_dst) { |
| 298 | std::stringstream connection_name; |
| 299 | connection_name << src_proc->getUUIDStr() << "-to-" << dst_proc->getUUIDStr(); |
| 300 | std::shared_ptr<minifi::Connection> connection = std::make_shared<minifi::Connection>(flow_repo_, content_repo_, connection_name.str()); |
| 301 | connection->addRelationship(relationship); |
| 302 | |
| 303 | // link the connections so that we can test results at the end for this |
| 304 | connection->setSource(src_proc); |
| 305 | |
| 306 | connection->setSourceUUID(src_proc->getUUID()); |
| 307 | if (set_dst) { |
| 308 | connection->setDestination(dst_proc); |
| 309 | connection->setDestinationUUID(dst_proc->getUUID()); |
| 310 | if (src_proc != dst_proc) { |
| 311 | dst_proc->addConnection(connection); |
| 312 | } |
| 313 | } |
| 314 | src_proc->addConnection(connection); |
| 315 | |
| 316 | return connection; |
| 317 | } |
| 318 | |
| 319 | bool ExecutionPlan::setFailureCallback(std::function<void(flow_file_record*)> onerror_callback) { |
| 320 | if (finalized && !failure_handler_) { |
nothing calls this directly
no test coverage detected