Does the order in which directives are arranged affect the order of execution?

Silly question maybe? But does the order field on a directive affect order of execution?

For example, I have two directives.

Directive A whose order value is set to 170.

Directive B whose order value is set to 180.

Both are method directives and belong to the same business object. Both are also pre-processing directives.

Will Directive A always fire before directive B?

I am referring to the field highlighted in red, shown below.

Any insight is deeply appreciated. Thank you!

1 Like

Yes, that’s exactly what that field is for. You can edit the values if you want Directive B to run before A.

They’re automatically created in sequences of 10, 20, 30, etc. So, you could always change 30 to 19 and have that directive fire first.

4 Likes

Lovely,

Thanks much. I figured it was the case, but for some reason my silly brain was hung up on the thought that it may just serve to neatly organize your directives. :laughing:

3 Likes

I really don’t know how the decision tree goes if you have two the same number. I’m assuming it just looks at the bpdirective table and if there are two with the same number it executes the one that was added first then the next one.

Will it allow (2) to have the same number? Guess I never tried to adjust them.

1 Like

Yep try importing the same BPM twice

3 Likes