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

Workflow issue

Aniketk
New Contributor III
New Contributor III

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.

Aniketk_1-1678879031247.png

 

on first try it was working fine , but next day it suddenly stopped working.

Kindly help

 

17 REPLIES 17

nimitdave
Saviynt Employee
Saviynt Employee

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. 

Aniketk
New Contributor III
New Contributor III

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.

Aniketk
New Contributor III
New Contributor III

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.

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

 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

Aniketk
New Contributor III
New Contributor III

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.

Do you have CP1 populated for respective endpoint? Can you share the screenshot?

Also if possible please share the logs when this error appears


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

rushikeshvartak
All-Star
All-Star

(endpoints.endpointname.contains('abc') ) or
endpoints.customproperty1.equalsIgnoreCase('Yes')


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

Aniketk
New Contributor III
New Contributor III

Aniketk_0-1679048516659.png

Still facing issue with 2nd condition

Aniketk
New Contributor III
New Contributor III

No diffrence , when I tried without groovy

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 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

Aniketk
New Contributor III
New Contributor III

Now I have using only single condition which is endpoints.customproperty10.equalsIgnoreCase('Yes').

Still facing same issue.

Please share the new set of logs


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

Aniketk
New Contributor III
New Contributor III

Please find the logs

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

  


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

Aniketk
New Contributor III
New Contributor III

I don`t see Name error now, any suggestion for 2nd error?

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. 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

Aniketk
New Contributor III
New Contributor III

I have change the Number of tries for provisioning from 7 to 10.

Now workflow is working.