Business Rule Performance Difference between Condition Field or IF Condition in Script

Meloper
Kilo Sage

Hi,

Of course, if the condition is only executed in the script, then the first line of code containing the IF condition will be always executed each time, but is that really a performance penalty for the business registry?.
-----
Lets say i use the Condition Field with following query: current.active != true

 

OR

 

Condition FIeld is empty and in the First line of code there ist if( current.active != true){

----

Is there a Performance Difference in that case?

1 ACCEPTED SOLUTION

Rene El Hamzh
Kilo Sage

Hi @Meloper,

 

it's considered best practice to use the condition rather than checking the same in the code. There won't be a significant performance difference but like you already pointed out, leaving the condition blank means the BR will always execute and might load unnecessary script logic. 

 

See: Business Rules Technical Best Practices

 

Best regards,

Rene

 

Please mark as correct/helpful if my answer helped you!

View solution in original post

1 REPLY 1

Rene El Hamzh
Kilo Sage

Hi @Meloper,

 

it's considered best practice to use the condition rather than checking the same in the code. There won't be a significant performance difference but like you already pointed out, leaving the condition blank means the BR will always execute and might load unnecessary script logic. 

 

See: Business Rules Technical Best Practices

 

Best regards,

Rene

 

Please mark as correct/helpful if my answer helped you!