Support Questions
Find answers, ask questions, and share your expertise

how to replace flowFile content mang times?

New Contributor

I want to replace flowFile content , but it is incorrect .

error: is not known in this session (StandardProcessSession[id=0])

how to do?

FlowFile flowFile = session.create();
int i=0;
String requestPost=requestPost+i;
do{
i=i+1;
flowFile = session.write(flowFile, new StreamCallback() {
    @Overridepublic void process(final InputStream in, final OutputStream out) throws IOException {
        out.write(requestPost.getBytes(Charset.forName("UTF-8")));}
});
}while(i==3);