Implementing Enhanced Business Function Logging in TM1

Ideas and tips for enhancing your TM1 application
Post Reply
ardi
Community Contributor
Posts: 148
Joined: Tue Apr 02, 2013 1:41 pm
OLAP Product: tm1, cognos bi
Version: from TM1 9.4 to PA 2.0.9.6
Excel Version: 2010
Location: Toronto, ON

Implementing Enhanced Business Function Logging in TM1

Post by ardi »

Hi,

In this topic, I am going to share with you an approach that I have been using for years in order to implement Enhanced User Action Logging in TM1 Models.

I have a cube called User Action Logging with 3 DImensions: User Action, Line Item and a Measure dim:
User Action Logging All.PNG
User Action Logging All.PNG (79.39 KiB) Viewed 18864 times
Also I create a cube with }Processes as one of my dimensions, another dimension to be used to map the Process Name to a User Friendly User Action Name and also names of all Parameters (up to 30 params) used in the process.
zSYS - ControlProcesses All.PNG
zSYS - ControlProcesses All.PNG (68.15 KiB) Viewed 18864 times
In the cube above (zSYS - ControlProcesses), the first 5 Items are populated manually, and the Parameter Items are loaded with a TI Process, which parses the respective PRO File of the process to identify the Param Names used in the process. The process is parameterized and it should be executed only if the process parameter names have changed. Usually after the Process is deployed.

In all the Processes that get executed by a user or admin, there is a section of Generic Code in Prolog Tab and another generic section in Epilog, which captures the values of each parameter (Thanks to EXPAND Function) and it stores them in the next line item available (Up to 1000 Line Items and once the Last Line Item is filled, it will re-use Item 1 again)

In the User Interfaces (Websheets) I show the Last Execution Time Stamp, and I have established Dill Rules and Drill Processes to show the User the details of each execution:
User Action Logging Data.PNG
User Action Logging Data.PNG (163.15 KiB) Viewed 18864 times
The approach explained here has helped our users (and myself) a lot to troubleshoot production issues and I thought some other people from this forum might find it useful.
Ardian Alikaj
Wim Gielis
MVP
Posts: 3105
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Implementing Enhanced Business Function Logging in TM1

Post by Wim Gielis »

Nice work !

I was interested to know how you deploy this set of tools:
- did you script the creation of the objects (DimensionCreate, CubeCreate, and so on)
- Or do you have an "empty" model with these objects and paste them when you start a new TM1 model ?

In case you haven't used them by now, MDX views are an additional option to filter and sort within the "output".
Typically the output is relational (with measures) and not so much multi-dimensional.
Then MDX views can potentially filter the output on 1 user or 1 day, etc.
For this, TM1 Web and Architect/Perspectives are out of the question though, you will need PAW or PAfE.

Last remark, maybe shifting some of the logic of the Prolog tab and Epilog tab would be an option.
That leaves less code in the "main" process (less clutter) and less maintenance in case something changes at the heart of the tool.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
ardi
Community Contributor
Posts: 148
Joined: Tue Apr 02, 2013 1:41 pm
OLAP Product: tm1, cognos bi
Version: from TM1 9.4 to PA 2.0.9.6
Excel Version: 2010
Location: Toronto, ON

Re: Implementing Enhanced Business Function Logging in TM1

Post by ardi »

Thank you Wim,

I have a small model that includes all the objects. Part of this package is a }CubeDrill_... cube which has one assignment rule to allow user to access the Execution Logging Related to an User Action.

You cannot script the creation of the }CubeDrill cubes so I have created a small package with all the objects required (Few dimensions, cubes, TI Process and Rule)

I love MDX Views and I use them a lot, but this was build before they were available. But in my Drill Process, I sort the entries by showing the latest executions first

I use Drill Processes a lot in general when I want to pass the selected Cell Context to a TI Process.
Ardian Alikaj
Wim Gielis
MVP
Posts: 3105
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Implementing Enhanced Business Function Logging in TM1

Post by Wim Gielis »

ardi wrote: Tue Mar 08, 2022 2:05 pmYou cannot script the creation of the }CubeDrill cubes so I have created a small package with all the objects required (Few dimensions, cubes, TI Process and Rule)
Why not ?

A cube is a cube and a process is a process. Quote of the day :lol:
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
ardi
Community Contributor
Posts: 148
Joined: Tue Apr 02, 2013 1:41 pm
OLAP Product: tm1, cognos bi
Version: from TM1 9.4 to PA 2.0.9.6
Excel Version: 2010
Location: Toronto, ON

Re: Implementing Enhanced Business Function Logging in TM1

Post by ardi »

Wim Gielis wrote: Tue Mar 08, 2022 2:36 pm
ardi wrote: Tue Mar 08, 2022 2:05 pmYou cannot script the creation of the }CubeDrill cubes so I have created a small package with all the objects required (Few dimensions, cubes, TI Process and Rule)
Why not ?

A cube is a cube and a process is a process. Quote of the day :lol:
I have tried to create the }CubeDrill , yes that is a cube and it can be created but for some reason TM1 will not recognize it as a Drill Cube. I have not tried in the recent version but I doubt it.

I have never tried to automate the creation of TI processes, I know TM1Py can help but I dont think its worth :)
Ardian Alikaj
Wim Gielis
MVP
Posts: 3105
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Implementing Enhanced Business Function Logging in TM1

Post by Wim Gielis »

ardi wrote: Tue Mar 08, 2022 2:44 pmI have never tried to automate the creation of TI processes, I know TM1Py can help but I dont think its worth :)
At least, you can use AsciiOutput to dump the "customized" contents of the drill to a text file. Then it's a matter of copy/paste :-)
I do such things, also creating the drill processes, with the REST API (PowerShell I thought, called from TI).
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
lotsaram
MVP
Posts: 3651
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Implementing Enhanced Business Function Logging in TM1

Post by lotsaram »

ardi wrote: Tue Mar 08, 2022 2:44 pm I have tried to create the }CubeDrill , yes that is a cube and it can be created but for some reason TM1 will not recognize it as a Drill Cube. I have not tried in the recent version but I doubt it.I know TM1Py can help but I dont think its worth :)
Yes creating a drill cube via TI creates the object but drill-through won't function until a restart (same with picklist cubes last time I checked).
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Post Reply