Lehel44 commented on code in PR #8160: URL: https://github.com/apache/nifi/pull/8160#discussion_r1465352063
########## nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/src/main/java/org/apache/nifi/snmp/processors/SendTrapSNMP.java: ########## @@ -147,17 +158,18 @@ public void onTrigger(final ProcessContext context, final ProcessSession process attributes.put("enterpriseOid", enterpriseOid); attributes.put("genericTrapType", genericTrapType); attributes.put("specificTrapType", specificTrapType); - snmpHandler.sendTrap(attributes, v1TrapConfiguration); + snmpHandler.sendTrap(attributes, v1TrapConfiguration, target); } else { final String trapOidValue = context.getProperty(V2TrapProperties.TRAP_OID_VALUE).evaluateAttributeExpressions(flowFile).getValue(); V2TrapConfiguration v2TrapConfiguration = new V2TrapConfiguration(trapOidValue); attributes.put("trapOidValue", trapOidValue); - snmpHandler.sendTrap(attributes, v2TrapConfiguration); + snmpHandler.sendTrap(attributes, v2TrapConfiguration, target); } - - processSession.putAllAttributes(flowFile, attributes); + flowFile = processSession.putAllAttributes(flowFile, attributes); processSession.transfer(flowFile, REL_SUCCESS); - + if (isFlowFileReceived) { + processSession.getProvenanceReporter().receive(flowFile, "/sendTrap"); + } Review Comment: The data is not from an external system, I agree, removing. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org