Skip to content

Commit 00122f6

Browse files
fixed defect on return of fairness attributes to nifi flowfile (Trusted-AI#147)
* Add files via upload * Add files via upload
1 parent a30a09e commit 00122f6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

mlops/nifi/generic-processor/nifi-aif360-processors/src/main/java/com/ibm/aif360/processors/generic/MyProcessor.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,10 @@ public void process(InputStream in) throws IOException {
171171
System.out.println("Here is the standard output of the command:\n");
172172
while ((s = stdInput.readLine()) != null) {
173173
System.out.println(s);
174+
returnValue[0] = s;
174175
}
175176

176-
returnValue[0] = s;
177+
177178

178179
// read any errors from the attempted command
179180
System.out.println("Here is the standard error of the command (if any):\n");
@@ -189,6 +190,8 @@ public void process(InputStream in) throws IOException {
189190
}
190191
});
191192

193+
System.out.println("result");
194+
System.out.println(returnValue[0]);
192195
flowFile = session.putAttribute(flowFile, "aif360.result", returnValue[0]);
193196
session.transfer(flowFile, SUCCESS_RELATIONSHIP);
194197
} catch (ProcessException e) {

0 commit comments

Comments
 (0)