02/03/2023 02:00 AM
Hi Team,
We have a below use case and need assistance with Workflow condition.
1. We have an endpoint named = Acme
2. Entitlement Type for this Endpoint is groups. It has 5 entitlements.
For Each entitlement we are using CP5 and CP6 to contain business unit and function respectively.
Assistance Required :
1. When an end user is raising a request for this endpoint.
We need assistance in evaluating if-else condition that, the requestee business unit (stored in user cp20) and requestee function (stored in user cp21) is equal to requested entitlement CP5 and CP6.
If yes then the request should get auto approved else must route to user group approval.
Please assist.
Solved! Go to Solution.
02/03/2023 06:35 AM
You can try something like this
RequestedFor.customproperty20==entitlement.customproperty5 and RequestedFor.customproperty21==entitlement.customproperty6
Also to check if requestor is end user or not by using below condition
requestedby.authorities.collect { it.authority }.contains("<end user sav role name>")
it this is true then go for another if else block with first condition
02/03/2023 06:46 AM
@Manu269 -To include entitlement object in your workflow, you need to make your workflow type as parallel. If else condition can be similar to the one @sk suggested. I'm not sure if RequestedFor is an exposed user object though. @sk - Do you know if it's an exposed user object? Couldn't find it in the documentation though - https://docs.saviyntcloud.com/bundle/SSM-Admin-v55x/page/Content/Chapter11-Workflows/Workflow-Compon...
If RequestedFor is not exposed, you can try something like below.
user.customproperty20==entitlement.customproperty5 and user.customproperty21==entitlement.customproperty6
-Siva
02/03/2023 06:51 AM
Yes both requesteby and requestedfor should be working at least I have personally use requestedby. Incase it is not working then yes you can use user object
02/03/2023 06:55 AM
Hello Folks,
Many thanks for the input.
In V2021, I got the error when using the RequestedFor .
Anyhow this has helped :
user.customproperty20==entitlement.customproperty5 and user.customproperty21==entitlement.customproperty6
Many thanks.