Rule Firing Order | Community
Skip to main content
bigbaldbasso
April 25, 2019
Solved

Rule Firing Order

  • April 25, 2019
  • 3 replies
  • 4722 views

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!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by bigbaldbasso

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.

3 replies

April 28, 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.

bigbaldbasso
bigbaldbassoAuthorAccepted solution
April 29, 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.

jantzen_b
Adobe Employee
Adobe Employee
April 3, 2020
Do any of the answers below answer your initial question? If so, can you select one of them as the correct answer? If none of the answers already provided answer your question, can you provide additional information to better help the community solve your question?