Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! See The Solution
1 ACCEPTED SOLUTION
ekashpureff has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
sinhaa
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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
Anu
ekashpureff has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
sinhaa
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
