Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on
06-22-2016
03:05 PM
- last edited on
04-21-2026
05:30 AM
by
GrazittiAPI
Created 06-22-2016 04:12 PM
Are you declaring any relationships? Don't forget to add it to the list of supported ones returned from one of the callbacks. If you can post a link or share the code somewhere, that would be very helpful.
Created 06-22-2016 03:06 PM
Hi, is it a custom processor or one of the standard ones?
Created 06-22-2016 03:42 PM
Its a custom processor.
Created 06-22-2016 04:12 PM
Are you declaring any relationships? Don't forget to add it to the list of supported ones returned from one of the callbacks. If you can post a link or share the code somewhere, that would be very helpful.
Created 06-22-2016 04:45 PM
Just added relevant lines here.
public static final Relationship SUCCESS = new Relationship.Builder().name("SUCCESS")
.description("Success relationship").build();
if (msgText != null) {
FlowFile flowFile = session.create();
flowFile = session.write(flowFile, new OutputStreamCallback() {
public void process(final OutputStream out) throws IOException {
try {
out.write(msgText.getText().getBytes());
} catch (Exception e) {
e.printStackTrace();
}
}
});
session.getProvenanceReporter().receive(flowFile, context.getProperty("MyProp").getValue());
session.transfer(flowFile, REL_SUCCESS);
}
queueConn.close();
session.commit();
Created 06-22-2016 05:08 PM
Can you check you properly publish this relationship, too? E.g. see how I am doing it here (and the getRelationships() method that follows) https://github.com/aperepel/nifi-csv-bundle/blob/master/nifi-csv-processors/src/main/java/org/apache...
Created 06-22-2016 05:44 PM
Thank you Andrew, it helped me resolving my issue.