BPM Condition optimization

While re-reading some of the threads on optimizing BPM’s, I got to thinking…

Does the order that the condition statements are in, dictate the order they are processed?

For example, in the pict below, a simple check of the ttShipHead.ShipStatus field is done. The second condition (which is AND’d with the first) is more complex, requiring a query to be executed.

Is the second condition even evaluated if the first is false?

If both are always evaluated, would it be better to put them in two sequential Condition blocks?

1 Like

When using AND it would stop evaluating the first time a condition is false.

1 Like

This is only true if Epicor is short circuiting, my guess is that they aren’t but we csn confirm this by looking at the CS Code generated for a bpm.

#LetsGoToTape

I did trace this out before when doing a performance eval. Based off the trace and the results (duration) it appears to short circuit. For example, when the first condition was false the duration was 3ms and 26ms when the first condition was true and second false - just with a condition only in a BPM. Ran multiple times for verification.

3 Likes

Yup!

Confirmed thanks @danbedwards

3 Likes