Rule Firing Order

Avatar

Avatar

bigbaldbasso

Avatar

bigbaldbasso

bigbaldbasso

25-04-2019

I am migrating a property from DTM to Launch.  I have a couple of rules that trigger on Library Loaded that I need to fire early, so I set the Order value to 10 and 20.  All the others are the default of 50.

The rule with an order of 10 always fires first, but one with an order of 20 always fires after several of the 50 rules.  This is causing some grief.

Why is the order value not honored after the first one?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

bigbaldbasso

Avatar

bigbaldbasso

bigbaldbasso

29-04-2019

Hi, stephenk67545596

Actually, this rule has custom code in the rule condition and no actual rule body.  That custom code does a getVar on several data elements which, in turn, execute custom code.

I didn't write it in the first place, but I have seen plenty of instances of tricks like this where people have tried to reduce the number of js files that DTM would load.  So it's a weird case.  I have gotten around the problem by moving this code into the rule with an Order value of 10.  Phase II of the migration is to unwind things like this and do stuff in a more Launch-y way.

If you are looking for positives, I now have practical experience to back up my warning to clients that the "creative" implementations they may have done to make DTM more performant can lead to hassles when migrating to Launch.

Answers (1)

Answers (1)

Avatar

Avatar

stephenk6754559

Avatar

stephenk6754559

stephenk6754559

27-04-2019

Does your rule with the order of 20 (which is firing late) have a custom code action? I am seeing that custom code actions appear to execute somewhat asynchronously and cause rules to fire out of order, I'm wondering if you are seeing the same thing.