Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/04/2024 10:58 PM
HI Team,
I have requirement to compare the entitlement value to be compared with dynamic attributes in condition if else block in workFlow.
I tried below queries but it was not working.
1. ev.entitlement_value like CONCAT( 'Seeburger ',CONCAT( (dynamicAttributes.get('BusinessUnit')),CONCAT( '%', (dynamicAttributes.get('UserRole' )))))
2. entitlement.entitlement_value.contains(CONCAT( 'Seeburger ',CONCAT((dynamicAttributes.get('BusinessUnit')),CONCAT( '%', (dynamicAttributes.get('UserRole'))))))
Can some help me to how to make this work in condition if else in Workflow.
Thanks
Abdul Sukoor
Solved! Go to Solution.
09/04/2024 11:02 PM
entitlement.entitlement_value.contains('Seeburger ' + dynamicAttributes.get('BusinessUnit') + '%' + dynamicAttributes.get('UserRole'))
09/04/2024 11:10 PM
HI Rushi,
Thank you for your quick reply.
But still i am getting error
Error msg :
stdout F de.odysseus.el.tree.TreeBuilderException: Error parsing '#{(entitlementslist.get(requestaccesskey).entitlement_value.contains('Seeburger ' dynamicAttributes.get('BusinessUnit') '%' dynamicAttributes.get('UserRole'))) eq true }': syntax error at position 84, encountered 'dynamicAttributes', expected ')'
09/04/2024 11:15 PM
entitlement.entitlement_value.contains(concat('Seeburger ', dynamicAttributes.get('BusinessUnit'), '%', dynamicAttributes.get('UserRole'))) eq true
09/04/2024 11:40 PM
Not working the above Query as well
Error:
stdout F 2024-09-05 06:34:45.950 ERROR [traceId=a2a688be63b86b5f, spanId=a2a688be63b86b5f, spanExportable=true, X-Span-Export=true, X-B3-SpanId=a2a688be63b86b5f, TENANT_ID=DEFAULT, X-B3-TraceId=a2a688be63b86b5f] 7 --- [http-nio-8787-exec-36] c.s.s.a.s.impl.RequestAccessServiceImpl : Error in thread interruption|java.util.concurrent.ExecutionException: com.saviynt.ssm.arsms.exception.BadRequestException: ERROR.IN.WORKFLOW| at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:na]| at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[na:na]| at com.saviynt.ssm.arsms.service.impl.RequestAccessServiceImpl.createRequestAsync(RequestAccessServiceImpl.java:705) ~[classes!/:2021.1.0.0-SNAPSHOT]| at com.saviynt.ssm.arsms.service.impl.RequestAccessServiceImpl.processRequest(RequestAccessServiceImpl.java:9650) ~[classes!/:2021.1.0.0-SNAPSHOT]| at com.saviynt.ssm.arsms.controller.v2.RequestAcessControllerV2.createRequest(RequestAcessControllerV2.java:59) ~[classes!/:2021.1.0.0-SNAPSHOT]| at com.saviynt.ssm.arsms.controller.v2.RequestAcessControllerV2$$FastClassBySpringCGLIB$$23525e70.invoke(<generated>) ~[classes!/:2021.1.0.0-SNAPSHOT]|Caused by: com.saviynt.ssm.arsms.exception.BadRequestException: ERROR.IN.WORKFLOW| at com.saviynt.ssm.arsms.service.impl.ProcessInstanceIdHandler.generateJbpmProcessInstanceId(ProcessInstanceIdHandler.java:49) ~[classes!/:2021.1.0.0-SNAPSHOT]| at com.saviynt.ssm.arsms.service.impl.RequestAccessServiceImpl.startRequestProcessing(RequestAccessServiceImpl.java:1026) ~[classes!/:2021.1.0.0-SNAPSHOT]| at com.saviynt.ssm.arsms.service.impl.RequestAccessServiceImpl.lambda$createRequestAsync$0(RequestAccessServiceImpl.java:686) ~[classes!/:2021.1.0.0-SNAPSHOT]| at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]| at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]| at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]|
09/04/2024 11:42 PM
There extra single quote in end
09/05/2024 12:41 AM
With or Without single quotes same error
Regards
Abdul Sukoor
09/05/2024 04:15 AM
Any suggestions..
09/05/2024 08:12 AM
Prepare concate on request form with one more dynamic attribute and use in wf
09/05/2024 09:18 PM
Hi Rishi,
I tried preparing the one more dynamic attribute , but here question is how will we get the entitlement value in dynamic attribute without submitting the form.
Below is the dynamic attribute query.
Select
ev.entitlement_value as ID
from
entitlement_values ev
where
case when ev.entitlement_value like CONCAT(
'Seeburger ',
'${BusinessUnit}',
'%',
'${UserRole}'
) then ev.entitlement_value in ('Yes') Else ev.entitlement_value in ('No') End
Regards
Abdul Sukoor
09/05/2024 08:22 AM
@sukoor
Can try this.
(entitlement.entitlement_value.contains(concat('Seeburger ', dynamicAttributes.get('BusinessUnit'), '%', dynamicAttributes.get('UserRole'))) == true)
09/05/2024 09:13 PM
HI Sam,
After inserting above query , i am getting below error.
I think Concate is not working with dynamic attributes.I sthere any other way we can try?
09/05/2024 09:38 PM
@sukoor
Can you try one of these
(entitlement.entitlement_value.contains('Seeburger ' + dynamicAttributes.get('BusinessUnit') + '%' + dynamicAttributes.get('UserRole')) == true)
or
(entitlement.entitlement_value.contains("Seeburger ${dynamicAttributes.get('BusinessUnit')}%${dynamicAttributes.get('UserRole')}") == true)
09/06/2024 12:18 AM
Hi Sam,
The above queries are not working, please error below
09/06/2024 06:13 AM
Did you tried with one value instead of multiple concats
09/06/2024 07:02 AM
HI Rushi,
I tried with below single queries as well , it is failing.
entitlement.entitlement_value.contains(dynamicAttributes.get('BusinessUnit')) eq true
Thanks
Abdul Sukoor
09/06/2024 07:03 AM
I think contains and dynamic attributes cant be used same query.
09/06/2024 07:03 AM
Error ?
09/06/2024 07:06 AM
Error:
09/06/2024 07:09 AM
Share full workflow wiring [Make image large to get it visible]
09/06/2024 07:14 AM
Please find the Workflow below
09/06/2024 07:16 AM
share dyn attribute names
09/06/2024 07:18 AM
If not clear, please find the first part of workflow
09/06/2024 07:19 AM
Validate entitlement !=null
09/08/2024 10:23 PM
Yes we are able to validate 'entitlement !=null', we are getting the entitlement value in workflow and able to raise the request.
I think Dynamic attirbutes cant be combined with any type of functions like Contain, Concat etc
Below is the entitlement check inserted in workflow.
Regards
Abdul Sukoor
09/08/2024 10:27 PM
dynamic attribute details
09/08/2024 10:58 PM
No It didnt resolve my problem.
09/09/2024 09:30 PM
My Problem is how to compare the Entitlement and Dynamic attributes which is coming from Form in Workflow
09/09/2024 10:33 PM
Use below Logic i have validated
entitlement.entitlement_value.contains(dynamicAttributes.get('BusinessUnit').concat(' ').concat(dynamicAttributes.get('UserRole')))
Validation :
09/09/2024 11:51 PM
HI Rishi,
Thanks for your support.
Still it was failing for me. Is there any specific settings in Dynamic attributes creation that we need to take care.Let me know if u need any meeting , I can setup meeting in teams,So that you can check directly.
Please find the WorkFlow details and Error
Workflow:
Error :
09/10/2024 02:05 AM
Our version is 24.2.
What is your version that the use case is successful?
09/10/2024 04:27 AM
Hi Rishi,
The workflow is working now.We need to add an extra condition 'entitlement !=null' then only it is working, other wise it is not working
Working Work Flow:
Thank you for your support and response.
09/10/2024 06:39 AM
I have already mentioned entitlement != null in thread also in workflow
Its mandatory because account is not entitlement object hence its required