I’m trying to make it possible that an external parameter provider can hold the 
mime-types so it’s easy to update the list of mime-types without changing the 
flow file itself.

Randall Wood

Please note: my work hours may not match your work hours. Please do not feel 
obligated to respond outside of your work hours.


From: Jens M. Kofoed <[email protected]>
Date: Thursday, August 21, 2025 at 15:57
To: [email protected] <[email protected]>
Subject: [EXTERNAL] Re: Use parameters in list to match "in" expression
What about using a simple key value lookup service. Where the mime type is the 
key, and the value could just be true or something.
If there is a match route it, if unmatched terminate.

Kind regards
Jens M. Kofoed



Den 21. aug. 2025 kl. 08.03 skrev [email protected]:
Hello,
Im using for example this:

1)
Parrametr "list" with volues on new lines:
Hello
YES
test
srv1

2)
Update Attribute procesor:
"list" = ${#{fillter}:replace('\n','|'):toLower()}

3)
Route on Attibute:
"in_list" = ${body:toLower():matches('.*(${list}).*')}

Marek

---------- Původní e-mail ----------
Od: Wood, Randall (US) <[email protected]>
Komu: [email protected] <[email protected]>
Datum: 21. 8. 2025 1:39:02
Předmět: Use parameters in list to match "in" expression


I am using the `RouteOnAttribute` processor to route files based on mime type 
in a flow that I intend to be reusable but would like to either use a single 
parameter with the list of mime types or multiple parameters, one for each mime 
type (ideally without knowing the number of parameters ahead of time).



I am using the expression

${mime.type:in("application/pdf","application/msword")}

without issue, but can't get any of

            ${mime.type:in(“#{document-mime-type1}”)}

            ${mime.type:in(#{document-mime-type1})}

${mime.type:in("#{document-mime-type1}","#{document-mime-type2}")}

${mime.type:in(#{document-mime-type1},#{document-mime-type2})}

Or

${mime.type:in({document-mime-types})}

to work but can’t seem to find any documentation suggesting I should (or should 
not) expect parameters to work in this scenario.



The parameters are defined as:

document-mime-type1 = “application/pdf”

document-mime-type2 = “application/msword”

document-mime-types = “application/pdf,application/msword”



Any help would be appreciated,

Randall Wood (he, him, his)
Solutions Architect – Customer Engineering Solutions

Everfox



+1.703.840.2056

[email protected]<mailto:[email protected]>

www.everfox.com<http://www.everfox.com>


Reply via email to