Re: Detect whether a flowfile has a particular attribute

2017-06-08 Thread Juan Sequeiros
Jim, This might be related and coincidentally today we were talking with a coworker about the "advanced" button of UpdateAttribute and its ability to set attributes based on conditions. It's pretty powerful. [1] It might come in useful for your efforts. [1]

Re: Detect whether a flowfile has a particular attribute

2017-06-08 Thread James McMahon
I do understand now. Thank you very much Mark. -Jim On Thu, Jun 8, 2017 at 9:34 AM, Mark Payne wrote: > Jim, > > The first expression will return false. None of the expressions below will > ever throw an Exception. > > You could even chain them together like >

Re: Detect whether a flowfile has a particular attribute

2017-06-08 Thread Mark Payne
Jim, The first expression will return false. None of the expressions below will ever throw an Exception. You could even chain them together like ${myAttribute:toLower():length():gt(4)} and if myAttribute does not exist, it will return false, rather than throwing an Exception. Thanks -Mark

Re: Detect whether a flowfile has a particular attribute

2017-06-08 Thread Mark Payne
Jim, You can use the expression: ${myAttribute:isNull()} Or, alternatively, depending on how you want to setup the route: ${myAttribute:notNull()} If you want to check if the attribute contains 'True' somewhere within its value, then you can use: ${myAttribute:contains('True')} Thanks

Detect whether a flowfile has a particular attribute

2017-06-08 Thread James McMahon
Good morning. I receive HTTP POSTs of various types of files. Some have a particular attribute myAttribute, some do not. I want to route the flowfiles to different workflow paths depending on the presence of this attribute. Can I use RouteAttribute and the expression language to do that, something