Welcome to VitriaCloud. Please Register or Login.   

 

Vitria forums are an excellent way for Vitria partners and customers to ask questions and get help. Chose the forums to participate in from a list of diverse topics. Your questions will be answered in a timely manner. You must be a registered VitriaCloud member to post to the forums.

 

You must be logged in to post
Search 
Search Forums:


 




Event Policy = matches

UserPost

9:23 pm
November 15, 2009


bhussain

Member

posts 32

1

Hi All,

In the Event Policy rule, what does expression “matches” mean for variable string?

I want to create a rule where if the field value (which is string datatype) contains/matches “SPNB”, then trigger the event policy.

Read the documentation, it supposed to have “contains” expression, but I don't see it in the expression list.

How do we use the expression “matches” in the above condition above?


Thanks.

10:46 pm
November 15, 2009


Shigang Liu

Member

posts 54

2

Hi bhussain,


“Match” means regular expression. Below is the definition:


Matches Operator

Matches a field against any valid Java Regular Expression. Typically that regexp is a String, but variables that resolve to a valid regexp are also allowed. It is important to note that different from java, if you write a String regexp directly on the source file, you don't need to escape '\'. Example:

Example 6.12. Regular Expression Constraint

Cheese( type matches “(Buffalo)?\S*Mozerella” )

 

Not Matches Operator

Any valid Java Regular Expression can be used to match String fields. Returns true when the match is false. Typically that regexp is a String, but variables that resolve to a valid regexp are also allowed.It is important to note that different from java, if you write a String regexp directly on the source file, you don't need to escape '\'. Example:

Example 6.13. Regular Expression Constraint

Cheese( type not matches “(Buffulo)?\S*Mozerella” )

 

 

Regards,

Shigang Liu

11:10 pm
November 16, 2009


bhussain

Member

posts 32

3

Shigang,

Now I know..it was quite a trick to be able to use Regular Expression in here…finally I got it after sometimes browsing the Net for answers and clues…

“fieldvariable matches .*SPNB.*”


I hope Vitria can update the documentation and give some examples on common expressions used like wildcard, character searching, etc. Would be a great help for Vitrians.


Thanks Shigang

3:11 am
November 17, 2009


Shigang Liu

Member

posts 54

4

bhussain,


Ok. Yes regular expression need lots of trick. But most cases “.” and “*” are enough like a sql where clause.

Regards,

Liu Shigang

Search