Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

After that the method will determine if the rule contains region FPM-KPI. This region is intended to store all automatically generated KPI calculations and is regenerated by Splicer. If the region is available in the rule, its parsing parse subtree will be excluded from the parse tree. This will result in in-memory removal of all lines contained within the #Region and #EndRegion tags for FPM-KPI. Then new contents of the region will be generated by calling generate_kpi method of TM1SpliceExecutor, which will return a parse subtree containing all the generated lines with KPI calculations. The subtree is then injected into the parse tree obtained before.

The method then calls TM1Parser.get_rule to splice the rule by calling convert method of each object in the parse tree and get the text representation of the modified parse tree. This string will be used to patch the cube rule in TM1. Before it is attempted, the method will save the string into a proposed file in the proposed rule folder (configured from command line, default location is rule).

...