Active IQ Unified Manager Discussions

WFA - Conditional Approval Point syntax string contains

ChadPruden

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".

 

approval-point.png

 

WFA 4.1 RC

1 ACCEPTED SOLUTION

sinhaa

@ChadPruden

 

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

 

 

sinhaa

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

View solution in original post

3 REPLIES 3

sinhaa

@ChadPruden

 

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

 

 

sinhaa

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

View solution in original post

ChadPruden

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.

anuk

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. 

 

 

ConditionalExpression.png

 

Thanks and Regards

Anu

 

 

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public