Skip to main content

I have a condition on my or gate, when value is not null then …

The condition is not respected, any idea why please?

 

 

 

Thank’s in advance

have also tried the below, but it didn’t worked : 

 

if (execution.getVariable('DiscountAmount') !== null) {
true;
} else {
false;
}

 


I made a simple workflow to test manually and i’m having the same problem

 


@dsj ​@kamnlk ​@Lahirumala de Mel  if you have any ideas i will be greatfull 

 

 

Thank’s in advance 


Hi ​@IFSRUNINNOVAL ,

I quickly tried this scenario, and it seem to work for me

 

 

what it the condition you have for the other branch of that gateway ? if that is also true for this variable value that could cause issues with picking up the correct path to follow 

 

there is another alternative syntax you can use for expressions in these scenario 

${execution.getVariable("demoAmount") != null}

 


@kamnlk and if you try demoAmount with no value will it work also please?

already tried the Execution.getVariable :/ 


Hi ​@IFSRUNINNOVAL ,

Yes it should also work in that scenario as well 

 

scenario1: variable is not declared

 

scenario 2 : variable value is null 

 


thank you ​@kamnlk mabey it’s related to my environment :/


Hi ​@IFSRUNINNOVAL 

I usually do the validations in a script before reaching the gate. it helps to build complex validations and keep the gate conditions clean, and work :D

 

For your scenario, use a script like this

 

In the gate, use the isValid variable as the condition

 

Valid path:

Invalid path

Hope it helps!

Damith


@dsj thank’s.

Good idea! 


Reply