user7516956
user7516956

Reputation:

NIFI:Using Attributes inside groovy code

I have flowfile which is named after:'LimitedExceed' and i have updated it inside my updateAttribute code and then i want to use it inside my groovy code ,but this expression below doesn't seem to work what should i change to make it work?:

def filename=flowFile.getAttribute('filename')
String name=filename as String;
f(name.equals('LimitExceded')){

}

Upvotes: 0

Views: 946

Answers (1)

daggett
daggett

Reputation: 28564

def filename = flowFile.getAttribute('filename')
if( filename == 'LimitExceded' ){
   ... 
}

Upvotes: 3

Related Questions