and more in a single search tool across platforms. Read the announcement here. |
03/15/2023 04:18 AM
Hello,
I`m using below condition :
(endpoints.endpointname.contains('abc') eq true) or
endpoints.customproperty1 eq 'Yes'
If endpoint name is abc or endpoint customproperty 1 is yes then it should follow 1 level of approval or else 2 level.
If I use the condition (endpoints.endpointname.contains('abc') eq true), it`s following 1 level approval for endpoint. However when I add second condition it is giving below error.
Kindly help
Solved! Go to Solution.
03/15/2023 07:00 AM
Pls try once like this if it works
((endpoints.endpointname.contains('abc') eq true) or
(endpoints.customproperty1 eq 'Yes'))
if it does not then check if (endpoints.endpointname.contains('abc') eq true) and (endpoints.customproperty1 eq 'Yes') is working individually.
03/15/2023 07:05 AM
I tried these changes before , it`s not working.
And second condition i want to call for different endpoint so, if I use and operator it will not work.
03/15/2023 07:11 AM
I tried with (endpoints.endpointname.contains('abc') eq true) or (endpoints.endpointname.contains('xyz') eq true) to allow both endpoints have one level approval, but still second condition is not working.
03/15/2023 11:05 AM
Use below condition with expression language as groovy
(endpoints.get(request_access.id).endpointname.contains('abc') eq true) or (endpoints.get(request_access.id).customproperty1 == 'Yes'))
If it didn't work try without groovy as well
03/16/2023 02:27 AM
Thanks for response Saathvik,
But the above query is not working. The issue is only when I`m calling second condition.
My Query also worked when I tried first time, however when I tried after 2 days it was giving me error.
So I`m not sure why it worked first the suddenly next week it was giving error.
03/16/2023 05:49 AM
Do you have CP1 populated for respective endpoint? Can you share the screenshot?
Also if possible please share the logs when this error appears
03/16/2023 06:27 AM
(endpoints.endpointname.contains('abc') ) or
endpoints.customproperty1.equalsIgnoreCase('Yes')
03/17/2023 03:22 AM
03/17/2023 03:39 AM
No diffrence , when I tried without groovy
03/17/2023 04:47 AM
As per logs issue is happening with first condition only, Please try below conditions. Also initially you mentioned CP1 to check for YES but in workflow you are checking with CP10 not sure which CP you want to validate so based on that change the CP condition accordingly. For now i gave with CP1
endpoints.get(request_access.id).endpointname.contains('abc') or endpoints.get(request_access.id).customproperty1.equalsIgnoreCase('Yes')
or
endpoints.endpointname.contains('abc') or endpoints.customproperty1.equalsIgnoreCase('Yes')
If it is still an issue please share the new set of logs with new conditions I suggested
03/20/2023 08:06 AM
Now I have using only single condition which is endpoints.customproperty10.equalsIgnoreCase('Yes').
Still facing same issue.
03/21/2023 06:41 AM
Please share the new set of logs
03/21/2023 07:20 AM
03/21/2023 10:08 AM
I see two errors one is below, Name I am seeing the workflow name you are testing?
2023-03-21 14:18:32,142 [https-jsse-nio-443-exec-46] ERROR services.WorkflowService - Exception in workflow service org.jbpm.api.JbpmException: no process definition with key 'AD_ADDAccess_Workflow_test2'
Another error below where somewhere It is trying to doing addition to values where it is getting null for both and try to do null+null Where is this condition coming from?
2023-03-21 14:18:32,455 [https-jsse-nio-443-exec-46] ERROR errors.GrailsExceptionResolver - NullPointerException occurred when processing request: [POST] /ECM/workflowmanagement/createrequestfinalstep Cannot execute null+null. Stacktrace follows: org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Cannot execute null+null
03/23/2023 07:44 AM
03/23/2023 08:46 AM
I still both errors in logs, With auto approval or some basic WF did you see the same error? or it is happening with only for this WF? If the issue with this WF only then share the WF logic.
03/24/2023 09:34 AM
I have change the Number of tries for provisioning from 7 to 10.
Now workflow is working.