I have requirement such that, we need to fetch the current flow file queueId and ProcessGroupId using groovy script. These Id's will used in other system which driven by NIFI Rest api. I have written code for fetching the ProcessGroupId but not able to fetch queueId. So, how to fetch queueId?. Here is the script which i used to fetch ProcessGroupId. Note: As part of these two Id's i am Interested in fetching of source, destination Id's and on which host this flowfile is processing.
def flowFile = session.get()
processGroupId = context.procNode?.processGroupIdentifier ?: 'unknown'
componentId = context.procNode?.serviceProvider ?: 'unknown'
flowFile = session.putAttribute(flowFile, 'processGroupId', processGroupId)
Please assist me on this. Thanks
... View more