MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / onTrigger

Method onTrigger

libminifi/src/core/Processor.cpp:242–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240}
241
242void Processor::onTrigger(ProcessContext *context, ProcessSessionFactory *sessionFactory) {
243 auto session = sessionFactory->createSession();
244
245 try {
246 // Call the virtual trigger function
247 onTrigger(context, session.get());
248 session->commit();
249 } catch (std::exception &exception) {
250 logger_->log_warn("Caught \"%s\" (%s) during Processor::onTrigger of processor: %s (%s)",
251 exception.what(), typeid(exception).name(), getUUIDStr(), getName());
252 session->rollback();
253 throw;
254 } catch (...) {
255 logger_->log_warn("Caught unknown exception during Processor::onTrigger of processor: %s (%s)", getUUIDStr(), getName());
256 session->rollback();
257 throw;
258 }
259}
260
261void Processor::onTrigger(const std::shared_ptr<ProcessContext> &context, const std::shared_ptr<ProcessSessionFactory> &sessionFactory) {
262 auto session = sessionFactory->createSession();

Callers 3

runMethod · 0.45
runMethod · 0.45
runMethod · 0.45

Calls 9

getUUIDStrFunction · 0.85
log_warnMethod · 0.80
nameMethod · 0.80
onTriggerFunction · 0.50
createSessionMethod · 0.45
getMethod · 0.45
commitMethod · 0.45
whatMethod · 0.45
rollbackMethod · 0.45

Tested by

no test coverage detected