Alan Whitehouse's Ramblings

Continuing to work until my heavy investment in lottery tickets finally pays off….

  • Categories

  • Archives

  • Deep Thought

    Historically speaking, all true change in the world has come thanks to leaders emerging, them taking charge and giving the masses someone to rally around. Can an intentionally "leaderless" movement survive or will it just slowly fade away?

  • Subscribe

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 19 other followers

  • Me!

  • Disclaimer

    The views expressed in this blog, while intelligent and always right, are strictly my own, and do not necessarily reflect the views of anyone else with which I am in any way affiliated. And don't forget, I own the rights to all information on this blog (except for the stuff I stole from other people).
  • Current Rant

    *START OF RANT*

    You want change, then get involved. Vote, run for office, go to shareholder meetings and contact advertisers or investors. Sitting around banging drums, singing kumbaya, smoking weed and having a camp out under the stars is not going to get you the change you want.

    *END OF RANT*
  • Admin Stuff

Beware of Rules with Circular References

Posted by Alan on August 15, 2008

So we found out something fun the other day.    We had a model that was up and running.   Everything was working fine, we were creating input sheets and submitting data.  Life was good.   Then stuff stopped working.    We created a new input form and tried to save it and got errors.   We tried to browse the cube in SQL Management Studio and it froze everything.  We tried to browse the data in the cube with Excel and it hung Excel.  We got error messages in Event Viewer.  We opened the model in the Planning Business Modeler (which we still could) and checked it out and it all looked fine so we deleted the cubes and redeployed and then found that this process just would not finish. 

So we did the logical thing and started to freak out.  In the back of our minds was the total number of late nights and weekends it would take to get us back to where we were if we had to do a complete rebuild from scratch.   Lesser men would have cried.

Then we calmed down and started to backtrack and look at what changes were made between when things last worked and when they stopped working.   It turns out that three new rules had been created and deployed and then things stopped working.   So we opened up PBM, deleted the rules, went into Analysis Services and deleted the cube and then redeployed — it all worked again!  

So what had happened?  Well one of the business rules that was written referenced itself.  In simplest terms, we had a formula like “A = A + B”.  So every time “A” changed, then it would take that value and add “B” to it which would mean that the system saw that “A” had changed so it had to add “B” again.  This would go on forever and ever.   The funny thing is that we did validate the rules using that function in the PBM and later found out that the validation routine only checks if your syntax is correct, not it your formula makes sense or not.    I am guessing that my cube was actually processing just fine, but it was literally going to take forever to finish.

I hope that the PPS development team will add the ability to check for circular references when rules validate in v2 of PPS.  Until then — watch yourselves.

Advertisements

One Response to “Beware of Rules with Circular References”

  1. Hi Alan, really interesting post! I confess that sometimes things stop working as expected. Sometimes just the (maybe) simplest changes breaks all the previous work and I tend to do also the most “logical thing” 🙂
    Guess you message is very important, not to freak out and before considering restart work from scratch try to calm down and stop to think what we changed before stops working. That’s important and eventually will pay off as we’ll understand better the gusts of PPS-P.
    Nevertheless I’m also inverting on Lottery as well 🙂
    All the best,
    Bruno

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: