Can we add multiple conditions in workflow trigger to restrict it to trigger only for specific condition

Hi,

We have a requirement where we would like to use trigger on change in one of the identity attribute also only incase of active lifecyclestate. Is there a way to add the cloudLifecycleState condition with the attribute changing in trigger.

Hi @BhawnaAgrawal,
Please try to use the below filter it may be applicable for you.

$.changes[?(@.attribute == 'AttributeName' && @.newValue != @.oldValue && $.cloudLifecycleState == 'active')]

Thank You!

Thanks Abhishek, but above filter is not working

Hi @BhawnaAgrawal,

Can you try this below filter

$.changes[?(@.attribute == “AttributeName” && $.cloudLifecycleState == “active”)]

-Vasanth

If you are using identity attributes changed trigger, input json will contain details of only changed attributes, which means you cannot use any other attributes in the filter. Only way I can think of is to add a get identity action and a second filter to check the specific attributes in addition to changed attributes

5 Likes

Yes I agree with @iamnithesh a trigger for your changing attribute followed by a compare to select active lifecycle state.

Hi @BhawnaAgrawal ,
Good Day!
Please check on the below link it may be helpful for you!

Identity Attribute Changed Trigger JSONpath to check if multiple attributes have changed - Identity Security Cloud (ISC) / ISC Discussion and Questions - SailPoint Developer Community

Thank you!

Actually requirement is to trigger the workflow on change in one of the identity attribute and also when LCS is active. Therefore we want to validate both condition. But seems it’s not possible.

Are you looking for

identity attribute change and lifecycle state change together

Or

Identity attribute change only if lifecycle state is active

Both Identity Attribute changed and lifeCycleState is active (but there won’t be any change in lifeCycleState, just validating)

This that case my original thought will work - quite a common use case

Using this approach the trigger will start the workflow in every instance of a change to the monitored attribute,

You make the next step a get identity and then compare on lifecycle state, true will allow you to progress with what you want to do and false can be a success end.

At the trigger level, you can add conditions based on changes to different attributes. However, the changes array variable contains only the attributes that have changed. If cloudLifeCycleState does not change, it will not be present in the changes array.

Therefore, if your requirement is to perform an action when cloudLifeCycleState is Active, you must follow the suggestion provided by @iamnithesh. Use et get identity and compare whether cloudLifeCycleState is Active.

2 Likes

Hi @BhawnaAgrawal

You could create an identity attribute if possible which will have the certain value only when the cloudLifecycle state is active. Then you can setup the workflow trigger on this attribute and it also ensures that user is active one, so it should be able to serve your purpose.

The only thing is having identity attribute for such requirement may not be the best practice unless the attribute will be used for other purposes as well.

If identity attribute is not an option, then you can use two workflows one on the identity attribute trigger on LCS change and other one on the attribute update change, then you can have a get identity action to check the other attribute’s value to call the subsequent workflow.

I hope this helps.

Regards
Vikas.

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