Data Infrastructure Management Software Discussions

WFA - Conditional Approval Point syntax string contains

I've been unable to find an answer to this question.


What syntax should I use for the execution condition?  I'd appreciate any links to resources which might have more details on the types of comparison operators that are supported in this field.


My objective is to pause any requests which contain words that we flag as "not what we intend this service for".




WFA 4.1 RC


Re: WFA - Conditional Approval Point syntax string contains



  Execution condition is a Mvel expression enabled field. You can follow Mvel Expression syntax while providing the value to this field.  Help link is provided in the Approval Point dialog to learn more about Mvel expression and its Syntax.  I have attached a screenshot for the same. 





Thanks and Regards




Re: WFA - Conditional Approval Point syntax string contains



You need to do the following..


Go to Designer ->Functions and Create a new function with the below code.


function endsWithbackup(word)
import java.util.regex.*;  

return Pattern.matches(".*backup",  word);  


Save it.



now in your workflow provide the condition for approval point like below. MVEL Auto-complete will list this function now.



Approval Point.png




If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

Re: WFA - Conditional Approval Point syntax string contains

Thanks for the response!  I took your sample code and ran with it.  Here is what I'm using.


function VolNameBlackList(word)
// Returns TRUE if string contains any of the following keywords. Case Insensitive (?i)

import java.util.regex.*;
return Pattern.matches("(?i).*(backup|bkup|archive|mp3|personal).*", word);

Can easily come back and add an additional keywords to flag for approval point / discussion.

Review Banner
All Community Forums