I’m sure people who love HBR are not going to like Calculation Manager a lot (but you don’t have a choice, do you?
).
I was not a big fan of it, however when I started using it I fell in love with it. I admit that there are some issues.

I was not a big fan of it, however when I started using it I fell in love with it. I admit that there are some issues.
I wrote couple of posts (limitations) about Calc Manager, and the latest release solves one issue which I faced. There are some nice features in the latest release, launching MaxL scripts from a Calc Manger rule – to name one. I did promise that I’ll write about the new features, which will come soon (or later
)

This post is about (as the title suggests) a surprise in Calc Manager.
I’m sure by this time you are familiar with the Calc Manager terminology like “Deploy” and “Validate and Deploy”. If you are not have a look at Deploying Business Rules and Business Rulesets from the Deployment View.
When you deploy a Calc Manager Planning rule, it copies the rule from a table in Calc Manager’s repository called CALCMGRRULES to a table in Planning repository called HSP_CALC_MGR_RULES. (Well let’s say on a higher level this is what it does
).

Let’s imagine that you are getting a call from a user saying that he is seeing wrong values. You started looking at it and found that the numbers that appear there are derived using an old logic. (Which you are sure that you deleted them a long time ago).
You go back to Planning and what you see there surprises you.
All the old rules that you deleted are still there!!!!
Let’s prove it that you are not insane and you did delete them

Proof
Below sheet is my input sheet and you can see that AggAll calculated the price for me as Revenue/Units.
Below sheet is my input sheet and you can see that AggAll calculated the price for me as Revenue/Units.
I took a copy of AggAll rule and named it as “CAggAll” and made a slight change. (That was a mistake on purpose)
Deployed the rule, so far so good
Entry from HSP_CALC_MGR_RULES
After some testing I realized that I made a mistake and deleted the wrong rule. The surprise starts from here. Now what happens when you delete a Planning rule in Calc Manager. Are you going to answer that it’ll delete the rule from Planning too? “Wrong answer”. You don’t believe me huh
Let’s make a copy of a Calc Manager rule and delete the original one. (Note: If you are planning to perform this, peform this only in a DEV environment and make a note of the access)
The rule will still appear in Planning(still there in HSP_CALC_MGR_RULES), what happens if the user who has access to it runs it?
I was expecting that it’ll throw some error. (John Goodwin was suggesting that it’ll run even when Calc Manager is down)
It will execute the old rule (which was deleted) and will populate the wrong/old logic.
Surprise, surprise….wouldn’t it be nice if it was automatically deleted?
How you can solve it?
Well unfortunately there is no easier way.
Don’t create new rules for new logic, just update the older ones.(I know you don’t do it just like the way I did/explained)
If you are ever deleting a rule from Calc Manager, make sure that you deploy all the rules in the application and it’ll ensure that the deleted rule is removed from Planning.
Let’s hope that this will get fixed in a later release.
Celvin,
Have you had a read of this blog post?
http://hyperionnz.blogspot.com/#!/2012/05/cleaning-up-after-calculation-manager.html
Regards,
Cameron Lackpour
Cameron I didn't. It's good that in the latest version you don't need to go the SQL route
It might be a silly doubt but if I deploy the rule in calcmanager and I deleted it from calc mgr now I want to see teh code in that rule how can i See that 🙁
That will be there in Planning if you are on-premises version and you didn’t opt to delete it from Planning too. Take an LCM from Planning for rules, and that should give you the contents.