Member since
08-09-2020
4
Posts
0
Kudos Received
0
Solutions
08-21-2020
01:59 AM
Thanks for your suggestion, Below one is groovy manner... I want to implement in Java Could not find direct way like mentioned below. Please suggest me the Java Code implementation def flowFile = session.get()
if(!flowFile) return
processGroupId = context.procNode?.processGroupIdentifier ?: 'unknown'
flowFile = session.putAttribute(flowFile, 'processGroupId', processGroupId)
session.transfer(flowFile, REL_SUCCESS)
... View more
08-20-2020
10:39 AM
I have created a nifi custom processor, I need get a current process group id, How can I do that? Say for instance I need to update the flowfile attribute with the process group id for some later report generation or something.... Is it possible to get the current process group id? , I have created a custom processor. At runtime I want to get the process group id, How do i do that?. Say for instance I want update the flowfile attribute of every data packet with process group id, so that I can manipulate the provenance data based on the this field.
... View more
Labels:
- Labels:
-
Apache NiFi
08-09-2020
11:03 AM
I have a custom variable in Updatedate processor( state = success), now i want to access those variable in my groovy script which is in invokescriptor processor. def status= flowFile.getAttribute('status') i tried below mentioned both syntax as well Attemp1: if( status.equals("success")){ // } Attemp 2: if(status == "success"){ } the above 2 attempts flowFile.getAttribute('status') returnning null value. Please correct my mistake!
... View more
Labels:
- Labels:
-
Apache NiFi