Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Need to use IF ELSE condition to check for Entitlements owner

Kushal_Gowda
New Contributor II
New Contributor II

Hi,

Is it possible to check add an If Else condition where the condition should check for the entitlement owners whether owner is active or not before submitting. I tried to use this condition but its not working - "entitlement.Owner eq 'inactive' ". can any one suggest if this can be achived. if yes can you please suggest the condition to use.

 

 

4 REPLIES 4

naveenss
All-Star
All-Star

Try with the below condition in if/else block. Keep the expression language as "groovy". Let me know if this helps.

(com.saviynt.ecm.identitywarehouse.domain.Entitlement_values.executeQuery("Select u.statuskey as eoStatus from Users u,Entitlement_owners eo,Entitlement_values ev where u.id=eo.userkey.id AND eo.entitlement_valuekey.id=ev.id AND ev.id='${entitlement.id}'").get(0).contains('0'))
Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

indrahema95
Regular Contributor
Regular Contributor

Hi @naveenss This didn't work.

I got this error.

2023-07-16/17:01:55.031 [{}] [https-jsse-nio-443-exec-15] ERROR services.WorkflowService - Error while completing task - 1705864 storing it in JBPM Retry Table
org.jbpm.api.JbpmException: script evaluation error: javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: java.lang.Long.contains() is applicable for argument types: (java.lang.String) values: [0]
Possible solutions: toString(), toString(), toString(), notify(), toString(long)

(com.saviynt.ecm.identitywarehouse.domain.Entitlement_values.executeQuery("Select u.statuskey as eoStatus from Users u,Entitlement_owners eo,Entitlement_values ev where u.id=eo.userkey.id AND eo.entitlement_valuekey.id=ev.id AND ev.id='${entitlement.id}'").get(0).toString().contains('0'))

Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.

@rushikeshvartak @naveenss Thanks. This worked finally.