Planning Analytics

Planning Analytics

Get AI-infused integrated business planning

 View Only

Locking functionality in TM1 V12 (PAE): a practical how-to guide

By Wim Gielis posted Tue October 29, 2024 11:49 AM

  

Hello all,

Last year I added a valued blog post on how to do locking in TM1 (cubes, dimensions, elements). With the adoption of TM1 V12 (Planning Analytics Engine) I thought that an update for V12 would be appropriate. Having spent some time on this in V12, the changes with respect to my V11 overview are, to me:

  • Locking and unlocking is much more streamlined: there is tm1.Lock and tm1.Unlock to each of the endpoints for Cubes, Dimensions, Elements
  • }xxxProperties cubes are out, so we cannot know who is the owner of the lock (I did not look into this in much detail but the TM1 REST API, at first glance, does not show the information. Also no mentioning in the $metadata document for V12). Does anyone know ?
  • because of the same reason, a process that wants to create an overview of all locked elements in the database, will take longer to complete. The reason is that the existence of such cubes in V11 could easily filter out many elements that are not locked. Locked elements in TM1 is typically very little compared to the element count in a TM1 database.
  • the undocumented functions seem to survive the move to V12 but with the direct replacement the ExecuteHttpRequest() function, I would not advise to use it
  • the ExecuteHttpRequest() is the way to go if you need a TI solution
  • We don't need to bother with TM1 Architect/Perspectives obviously so I left it out

Locks will block any user and any TI process.
One way to circumvent it, is the function CubeLockOverride (see: https://cubewise.com/blog/things-might-not-know-tm1-security-part-2)
 
 
NOTE: I cannot locate where to find the owner of any given lock ! V11 Properties cubes where it was stored, are deprecated.
 
 
Locking/unlocking a cube ( this locks/unlocks the entire cube, no data changes are possible )
 
Our options include:
  • in Turbo Integrator:
    • ExecuteHttpRequest() implementation of the TM1 REST API solutions below
    • CubeSetLockStatus( <vCube>, <1=lock|0=unlock> ); (this appears to be an undocumented function, it is not recognized in PAW but the process saves and runs) (Security access checkbox is not needed)
  • manually, in PAW:
    • right-click a cube > Cube operations > Lock cube (if it is currently unlocked) / Unlock cube (if it is currently locked) (a lock icon will appear when locked)
  • in the TM1 REST API:
    • Is it locked/unlocked ?
      • GET /api/v1/Cubes('<vCube>')/Locked (200 OK)
      • GET /api/v1/Cubes('<vCube>')?$select=Locked (200 OK)
    • To lock/unlock ?
      • POST /api/v1/Cubes('<vCube>')/tm1.Lock|tm1.Unlock (204 No Content)
 
Locking/unlocking an element in a hierarchy of a dimension ( this locks/unlocks all cubes that use this dimension, on the specified element )
No data changes are possible on this element
Also, attributes for a locked element cannot be set or changed
 
Our options include:
  • in Turbo Integrator:
    • ExecuteHttpRequest() implementation of the TM1 REST API solutions below
    • DimensionElementSetLockStatus( <vDim>, <vElement>, <1=lock|0=unlock> ); (this appears to be an undocumented function, it is not recognized in PAW but the process saves and runs) (Security access checkbox is not needed)
  • manually, in PAW:
    • right-click an element in the Dimension Editor > Lock (if it is currently unlocked) / Unlock (if it is currently locked) (a lock icon will appear when locked)
  • in the TM1 REST API:
    • Is it locked/unlocked ?
      • GET /api/v1/Dimensions('<vDim>')/Hierarchies('<vHier>')/Elements('<vElement>')/Locked (200 OK)
      • GET /api/v1/Dimensions('<vDim>')/Hierarchies('<vHier>')/Elements('<vElement>')?$select=Locked (200 OK)
    • To lock/unlock ?
      • POST /api/v1/Dimensions('<vDim>')/Hierarchies('<vHier>')/Elements('<vElement>')/tm1.Lock|tm1.Unlock (204 No Content)
 
 
Locking/unlocking a dimension ( this locks/unlocks the entire dimension, no metadata changes are possible )
This does not block data changes in cube cells that reference any of the elements within the dimension, rather, changes to the contents and properties of the dimension
 
Our options include:
  • in Turbo Integrator:
    • ExecuteHttpRequest() implementation of the TM1 REST API solutions below
    • DimensionSetLockStatus( <vDim>, <1=lock|0=unlock> ); (this appears to be an undocumented function, it is not recognized in PAW but the process saves and runs) (Security access checkbox is not needed)
  • manually, in PAW:
    • right-click a dimension > Lock dimension (if it is currently unlocked) / Unlock dimension (if it is currently locked) (a lock icon will appear when locked)
  • in the TM1 REST API:
    • Is it locked/unlocked ?
      • GET /api/v1/Dimensions('<vDim>')/Locked (200 OK)
      • GET /api/v1/Dimensions('<vDim>')?$select=Locked (200 OK)
    • To lock/unlock ?
      • POST /api/v1/Dimensions('<vDim>')/tm1.Lock|tm1.Unlock (204 No Content)

#IBMChampion
0 comments
32 views

Permalink