The CreatorCon Call for Content is officially open! Get started here.

Flow Designer If condition evaluating as false

Ljone
Giga Contributor

Hi Experts,

I have a basic flow designer that is generating approval and based on response will do something.

My problem is, if Approval State is rejected for the 2nd approval, the flow is not evaluating it as True, I have tried adding timer but is not helping.  I have screenshots below.

Basic Flow 

1. Ask for Approval from Manager

     If rejected: Update ticket to Rejected.     (this is being evaluated correctly)

     if approved:  Ask for Approval from  Infra Manager.

2.  Ask for Approval from Infra Manager.

       If Approved: Update ticket 

       If rejected: Mark ticket as Rejected.     ((this is not being evaluated correctly, returning as False)

Please help me check

 

I have put the condition:

If Approval State = Rejected  AND Approval State is not Cancelled

 

find_real_file.png

     

 

 

 

1 ACCEPTED SOLUTION

ricker
Tera Guru

Ljone,

Sure, I don't think Flow as the ability to ask for the approvals one at a time, here's an example of a group approval and manager approval.  It'll ask for both approvals at the same time.  One approval goes to the group Owners and is set for anyone to approve or reject.  If there are 20 people in the group any one of them can approve.  The other approval uses an AND condition and asks for approval from the Requested for's Manager.  There is also a due date set with auto reject after 5 days.  The order of approval, manager then group or group then manager won't matter but both the person manager and one person from the group will need to approve.  It's been awhile but I'm pretty sure it will reject right away when rejected by either a group member or the manager instead of waiting.

You could also set it to auto approve instead of reject.  Other options for approval criteria are a certain number or percentage of group members approve or reject

find_real_file.png

 

View solution in original post

11 REPLIES 11

Harshad Wagh
Tera Guru

Add wait for condition on second approval task, and then add if else condition depending on the status.

You can check below doc for reference.

https://docs.servicenow.com/en-US/bundle/sandiego-application-development/page/administer/flow-designer/reference/wait-for-condition-flow-designer.html

 

Thanks

Harshad

 

Hi Harshad,

Thank you for your reply. do you know the condition I can put in the Wait for condition to evaluate once the Approval has been set to rejected? below is the flow I have. I have tried adding the number 8. Approval state but it won't let me. The flow is triggered in Request tablefind_real_file.png

you have to add the wait for condition in two places, one after step 4 and one after step8.

I guess while looking at it again, we may not need wait for condition.

Can you try something like this?

find_real_file.png

Hi Harshad,

This is helpful. this works falling on ELSE condition, I have added an ELSE IF to see if it can evaluate the Reject, but it does not evaluate it. Do you know how it can evaluate the reject too? incase I have to add other states?find_real_file.png