Changes associated to the bug #1081937

The refactoring in the risklib requires this companion refactoring in the engine.