Workflow conditions support regular expressions

While writing a workflow condition we were looking to write more complex string matching conditions - essentially we were looking to disable a specific set of accounts for a user using a loop and condition.

The issue we faced was that the condition operation is very simple, you can only have one string matching condition - and options were “equals” or “contains”, but the logic we needed to implement was more complex than this.

Rather than implementing one condition for each source to map though we looked at the JSON export and noticed that the “contains” operation in the JSON object is shown as “StringMatches”, any developer knows that “matches” generally means it’s doing a regular expression match and sure enough we tested a regular expression and it worked.

Question for the SailPoint folks: Is this a supported configuration that we can rely on that will continue to function in future? Or are there plans for more robust conditions in the workflow?

1 Like

That’s interesting. Can you share an example of a regex you used in the comparison operator?

1 Like

so we loop through all the accounts of the impacted user:


Then the condition we check the source name and confirm it matches one of the sources we are interested in, before taking action (I’ve changed the source names in the screenshot but the structure of the regex is basically as shown):

3 Likes

That’s really neat. I didn’t know it could do that. Maybe you could write up a Show and Tell to show others how you can use regex.

As for your original question, I have asked the workflows team about this functionality and I will see what they have to say. My guess is that this behavior will not change.

1 Like

Happy to do so, as long as it won’t change on us :slight_smile:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.