ProcessRollback

Post Reply
Wim Gielis
MVP
Posts: 3233
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

ProcessRollback

Post by Wim Gielis »

Hi all,

EDIT: it's a non-issue, rookie mistake :-)


Best wishes for 2022 !

I have a simple TI process to load data. So the Prolog tab does a zero out in a reporting cube, grabs data from an input cube.
Then the Data tab will CellIncrementN the values. All pretty straightforward.

However, when errors are encountered (and I know which errors to flag) I would like to do a rollback of the process.
Meaning that nothing has changed and the "target slice" of data is not zero if the slice was not 0 before the load started.

I have a variable "nErrors" that is set to 1 when an error is encountered in the Data tab. The line is skipped.

In the Epilog, I check for errors:

Code: Select all

If( nErrors = 1 );
ProcessRollback;
EndIf;
This does not work. The zero out is done, and data points without an error are still visible in the target cube.
I tried ProcessError as well (in the Epilog tab).

Does anyone know how this should be done ? I don't want to abuse the Metadata tab or use a different TI process to achieve the same result.

Interestingly, a simple CellPutN in the PROLOG tab and a ProcessRollback; in the Epilog, and no other code, does work and the value is not visible in the cube !

https://www.ibm.com/docs/en/planning-an ... ssrollback

Best regards,

Wim
Last edited by Wim Gielis on Mon Jan 10, 2022 3:40 pm, edited 1 time in total.
Best regards,

Wim Gielis

IBM Champion 2024-2025
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
User avatar
Steve Rowe
Site Admin
Posts: 2456
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: ProcessRollback

Post by Steve Rowe »

Never used the function so can't offer any direct advice but....(and I'm embaressed to suggest this)

Just in case you still have a New Years hangover are you counting the number of errors instead of just setting a flag value? This might explain why the rollback isn't getting executed?

Perhaps a rollback at the end of the data tab when the first error is encountered would work better?
Technical Director
www.infocat.co.uk
Wim Gielis
MVP
Posts: 3233
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: ProcessRollback

Post by Wim Gielis »

Thanks Steve.

It must have been the New Years hangover...

I had the ItemReject in the Data tab before the nErrors incrementing !

Code: Select all

   ItemReject( '...' );
   nErrors = nErrors + 1;
Case closed. Thanks for an extra pair of eyes.
Best regards,

Wim Gielis

IBM Champion 2024-2025
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
Post Reply