Planning Analytics

 View Only
Expand all | Collapse all

ItemReject not returning message in PAW for non Admin users

  • 1.  ItemReject not returning message in PAW for non Admin users

    Posted Thu June 10, 2021 12:16 PM
    Hi,

    In PAW version 63 the following was apparently resolved:

    APAR 152034: PH33777 PAW NEW EXPERIENCE:USING AN ACTION BUTTON TO RUN A TI PROCESS THAT FAILS DOES NOT DISPLAY PROCEDURE LINE IN POP-UP ERROR BOX

    However, I am seeing issues in PAW version 63 where, for a Process Button which includes ItemReject on the Epilog of the TI, the message is not being displayed for non admin users. It simply says the process errored but does not show the ItemReject message.

    For Admin users the message can be seen as expected. When I say Admin its an Admin user in TM1.

    Is this a known bug? If not I will raise with IBM support.

    regards,

    Mark




    ------------------------------
    Mark Wragg
    ------------------------------

    #PlanningAnalyticswithWatson


  • 2.  RE: ItemReject not returning message in PAW for non Admin users

    Posted Thu June 24, 2021 04:37 AM
    @Mark Wragg we have the same issue with a custom web application using the Rest API. I therefore don't believe it is PAW related but rather a restriction or bug in the TM1 Rest API itself. If you raised a PMR can you please reply the ID here so we can cross reference with our ticket?​

    ------------------------------
    Scott Wiltshire
    ------------------------------



  • 3.  RE: ItemReject not returning message in PAW for non Admin users

    Posted Thu June 24, 2021 04:48 AM
    Hi Scott,

    thanks for the feedback.

    not sure what you mean by ID but the ticket number for the case I raised with IBM is TS005875461.

    regards,

    Mark


    ------------------------------
    Mark Wragg
    ------------------------------



  • 4.  RE: ItemReject not returning message in PAW for non Admin users

    Posted Thu June 24, 2021 12:57 PM
    Hello Mark,

    We do use itemreject messages with PAW on cloud and no problem for normal user to get messages.
    It is maybe related to your browser or something else but not a bug I know.

    Regards

    ------------------------------
    Joseph GRANDCHAMP
    ------------------------------



  • 5.  RE: ItemReject not returning message in PAW for non Admin users

    Posted Fri June 25, 2021 03:16 AM
    Hi Joseph,

    It isn't just me experiencing this issue.

    A number of people, both inside and outside my organisation are having the issue too.

    Moreover, when I raised this with IBM support they responded as follows:

    "The issue has been reproduced in PAW 63 and I will log a defect investigation for it"

    Be interested to see how IBM have responded to Scott's PMR too

    regards,

    Mark

    ------------------------------
    Mark Wragg
    ------------------------------



  • 6.  RE: ItemReject not returning message in PAW for non Admin users

    Posted Mon June 28, 2021 11:57 AM
    Edited by System Fri January 20, 2023 04:48 PM
    I took a quick look at the ODATA API tracing while running a TI process, with the ItemReject function, from an action button as a non-admin in the TM1 model.

    4000 [] DEBUG 2021-06-28 07:30:18.844 TM1.HttpRequest GET /api/v1/TailMessageLog%28%29
    4000 [1] DEBUG 2021-06-28 07:30:19.027 TM1.HttpResponse 200 OK
    4000 [1] DEBUG 2021-06-28 07:30:19.027 TM1.HttpResponseBody {"@odata.context":"$metadata#","value":"MessageLogEntries/!delta('0[4096]445379691@65228!194259247')"}
    4000 [1] DEBUG 2021-06-28 07:30:19.035 TM1.HttpRequest POST /api/v1/Processes('ItemReject')/tm1.ExecuteWithReturn?$expand=ErrorLogFile
    4000 [1] DEBUG 2021-06-28 07:30:19.065 TM1.HttpRequestBody {"Parameters":[]}
    4000 [1] DEBUG 2021-06-28 07:30:19.065 TM1.HttpResponse 202 Accepted
    4004 [1] DEBUG 2021-06-28 07:30:19.366 TM1.HttpResponse 201 Created
    4004 [1] DEBUG 2021-06-28 07:30:19.366 TM1.HttpResponseBody {"@odata.context":"../$metadata#ibm.tm1.api.v1.ProcessExecuteResult","ProcessExecuteStatusCode":"CompletedWithMessages","ErrorLogFile":{"Filename":"TM1ProcessError_20210628143019_11004004_ItemReject.log"}}
    4000 [1] DEBUG 2021-06-28 07:30:20.205 TM1.HttpRequest GET /api/v1/_async('QI01MTUA5JYUM8y-woAjCCkjgcabX')
    4000 [1] DEBUG 2021-06-28 07:30:20.207 TM1.HttpResponse 200 OK
    4000 [1] DEBUG 2021-06-28 07:30:20.207 TM1.HttpResponseBody HTTP/1.1 201 Created
    4000 [1] DEBUG 2021-06-28 07:30:20.347 TM1.HttpRequest GET /api/v1/MessageLogEntries%2F%21delta%28%270%5B4096%5D445379691%4065228%21194259247%27%29?$filter=tolower(replace(Logger,'%20',''))%20eq%20'tm1.process'%20and%20contains(Message,'TM1ProcessError_20210628143019_11004004_ItemReject.log')&$top=1
    4000 [1] DEBUG 2021-06-28 07:30:20.348 TM1.HttpResponse 400 Bad Request
    4000 [1] DEBUG 2021-06-28 07:30:20.348 TM1.HttpResponseBody {"error":{"code":"63","message":"ObjectSecurityNoAdminRights"}}

    Looks like PAW is actually requesting content from the tm1server.log file (not the TM1ProcessError_20210628143019_11004004_ItemReject.log file) and TM1 is telling PAW that the non-admin user doesn't have permission.  This makes sense, the user doesn't have permission since they are not admin.



    Compare the above to clicking the PAW action button as an Admin in TM1:

    536 [] DEBUG 2021-06-28 08:50:36.292 TM1.HttpRequest GET /api/v1/Configuration
    536 [2] DEBUG 2021-06-28 08:50:36.453 TM1.HttpResponse 200 OK
    536 [2] DEBUG 2021-06-28 08:50:36.453 TM1.HttpResponseBody {"@odata.context":"$metadata#Configuration","ServerName":"Planning Sample","AdminHost":"","ProductVersion":"11.8.00600.6","PortNumber":12345,"ClientMessagePortNumber":60526,"HTTPPortNumber":12354,"IntegratedSecurityMode":false,"SecurityMode":"CAM","PrincipalName":"","SecurityPackageName":"","ClientCAMURIs":[],"WebCAMURI":"http://rescind1.fyre.ibm.com:9300/bi/v1/disp?b_action=xts.run&m=portal/bridge.xts&c_env=portal/variables_TM1.xml&c_mode=mixed&c_cmd=","ClientPingCAMPassport":900,"ServerCAMURI":"","AllowSeparateNandCRules":false,"DistributedOutputDir":"","DisableSandboxing":false,"JobQueuing":false,"ForceReevaluationOfFeedersForFedCellsOnDataChange":false,"DataBaseDirectory":"c:\\ibm\\models\\plansamp\\data","UnicodeUpperLowerCase":true}
    536 [2] DEBUG 2021-06-28 08:50:36.462 TM1.HttpRequest GET /api/v1/TailMessageLog%28%29
    536 [2] DEBUG 2021-06-28 08:50:36.464 TM1.HttpResponse 200 OK
    536 [2] DEBUG 2021-06-28 08:50:36.464 TM1.HttpResponseBody {"@odata.context":"$metadata#","value":"MessageLogEntries/!delta('0[4096]445379691@65545!3335516765')"}
    536 [2] DEBUG 2021-06-28 08:50:36.471 TM1.HttpRequest POST /api/v1/Processes('ItemReject')/tm1.ExecuteWithReturn?$expand=ErrorLogFile
    536 [2] DEBUG 2021-06-28 08:50:36.474 TM1.HttpRequestBody {"Parameters":[]}
    536 [2] DEBUG 2021-06-28 08:50:36.474 TM1.HttpResponse 202 Accepted
    1928 [2] DEBUG 2021-06-28 08:50:36.736 TM1.HttpResponse 201 Created
    1928 [2] DEBUG 2021-06-28 08:50:36.736 TM1.HttpResponseBody {"@odata.context":"../$metadata#ibm.tm1.api.v1.ProcessExecuteResult","ProcessExecuteStatusCode":"CompletedWithMessages","ErrorLogFile":{"Filename":"TM1ProcessError_20210628155036_48501928_ItemReject.log"}}
    536 [2] DEBUG 2021-06-28 08:50:37.625 TM1.HttpRequest GET /api/v1/_async('RI01MTUA5JYUMJQg2tb8leIFcCwM9')
    536 [2] DEBUG 2021-06-28 08:50:37.626 TM1.HttpResponse 200 OK
    536 [2] DEBUG 2021-06-28 08:50:37.626 TM1.HttpResponseBody HTTP/1.1 201 Created
    536 [2] DEBUG 2021-06-28 08:50:37.832 TM1.HttpRequest GET /api/v1/MessageLogEntries%2F%21delta%28%270%5B4096%5D445379691%4065545%213335516765%27%29?$filter=tolower(replace(Logger,'%20',''))%20eq%20'tm1.process'%20and%20contains(Message,'TM1ProcessError_20210628155036_48501928_ItemReject.log')&$top=1
    536 [2] DEBUG 2021-06-28 08:50:37.833 TM1.HttpResponse 200 OK
    536 [2] DEBUG 2021-06-28 08:50:37.833 TM1.HttpResponseBody {"@odata.context":"../$metadata#MessageLogEntries/$delta","value":[{"ID":2,"ThreadID":1928,"SessionID":2,"Level":"Info","TimeStamp":"2021-06-28T08:50:36.733Z","Logger":"TM1.Process","Message":"Process \"ItemReject\": finished executing normally. Check new message in the file: <TM1ProcessError_20210628155036_48501928_ItemReject.log>"}]}
    536 [2] DEBUG 2021-06-28 08:50:37.843 TM1.HttpRequest GET /api/v1/MessageLogEntries%2F%21delta%28%270%5B4096%5D445379691%4065545%213335516765%27%29?$filter=ThreadID%20eq%201928.0%20and%20SessionID%20eq%202.0&$top=200
    536 [2] DEBUG 2021-06-28 08:50:37.844 TM1.HttpResponse 200 OK
    536 [2] DEBUG 2021-06-28 08:50:37.844 TM1.HttpResponseBody {"@odata.context":"../$metadata#MessageLogEntries/$delta","value":[{"ID":3,"ThreadID":1928,"SessionID":2,"Level":"Info","TimeStamp":"2021-06-28T08:50:36.475Z","Logger":"TM1.Process","Message":"Process \"ItemReject\" executed by user \"cjp/stuart\""},{"ID":4,"ThreadID":1928,"SessionID":2,"Level":"Info","TimeStamp":"2021-06-28T08:50:36.733Z","Logger":"TM1.Process","Message":"Process \"ItemReject\": finished executing normally. Check new message in the file: <TM1ProcessError_20210628155036_48501928_ItemReject.log>"}]}
    536 [2] DEBUG 2021-06-28 08:50:37.996 TM1.HttpRequest GET /api/v1/ErrorLogFiles('TM1ProcessError_20210628155036_48501928_ItemReject.log')/Content
    536 [2] DEBUG 2021-06-28 08:50:38.003 TM1.HttpResponse 200 OK
    536 [2] DEBUG 2021-06-28 08:50:38.003 TM1.HttpResponseBody "FY 2004 Budget","UK","Direct","Sales","local","input","Jan-2004","315512.69",Data Source line (1) Error: Data procedure line (8): Stuarts error

    Not sure why PAW is doing all the stuff in red in this situation.  Given the initial response when clicking the action button I believe that we skip trying to read the tm1server.log and go straight to reading the TI process log (which I believe should work as a non-admin).

    In summary, I think there is a defect here, or we are just not being clever about how we use the ODATA API.  I share my findings with development and support.


    *** Edit - I've confirmed the ErrorLogFiles API endpoint is expected to return an empty response to non-admins.  So, I'm not sure this issue is really a defect.  However, there is some room for improvement.  We will look into custom return messages for TI process success and failure.  As an enhancement, I would like to be able to configure custom response messages in both Planning Analytics Workspace (the action button config UI) and in the TI process as string variables.  

      


    ------------------------------
    Stuart King
    IBM Planning Analytics Offering Manager
    ------------------------------



  • 7.  RE: ItemReject not returning message in PAW for non Admin users

    Posted Mon July 26, 2021 03:55 AM
    Hi Stuart,

    I have had a response from IBM support and this and they say:

    "Please note that Development has reviewed the issue and confirmed that non-admin users are not expected to view the complete error message due to a limitation on the TM1 Server side.
    Unfortunately the behavior cannot be altered due to system design limitations."

    This is disappointing, what is the point of messages only being visible to Admin users, the last people who really need to see these custom messages! The functionality to have custom messages show in PAW cannot come soon enough in my opinion. We have lots of error handling in our user processes and expect to be able to show to the user exactly why the process failed. Of course there are workarounds but this basic functionality should be available out of the box. It needs to be prioritised in my view.

    And when I say custom messages, I mean just that, a process may fail for a number of reasons, we send the reason to a cube and then read that cube value to show as a message on screen. In other words the custom error messages should be able to look at a cube value or in a similar vein to itemreject, it should be able to read the specific error message coded into the TI process.

    Of course in websheets you can already do this via action buttons, and put a dbrw in the Success or Failure messages. This is the functionality that needs adding to PAW.

    Mark

    ------------------------------
    Mark Wragg
    ------------------------------



  • 8.  RE: ItemReject not returning message in PAW for non Admin users

    Posted Mon July 26, 2021 04:31 AM
    I also agree this is completely "sub-optimal". If writing a custom message with ItemReject then this needs to be able to be exposed to the user running the TI process. Currently in our applications as a workaround to this issue we are writing to custom logging cubes. HOWEVER, this requires all potential errors to be handled so that the process, from a technical point of view, always completes with ProcessExitNormal status. This is not really what you want at al from a DevOps perspective as if there is a genuine error then the execution chain should be broken with error status. Currently it is not only substantial extra work to inform the user of the issue via custom logging cubes but an additional substantial addional work to create semaphore flags so that watcher processes can break the execution chain and raise a proper error status.

    It is essential that this is fixed, and it can't be soon enough.

    ------------------------------
    Scott Wiltshire
    ------------------------------



  • 9.  RE: ItemReject not returning message in PAW for non Admin users

    Posted Mon July 26, 2021 08:03 AM
    We have a short term plan to enhance the functionality in Workspace to allow the book author to display custom messages when the TI process, run from an action button, succeeds or fails.   This functionality should show up some time this year.   I'm pushing for Q3 as we are already committed to redesigning the action button configuration user interface.   The issue with this approach is that Workspace won't know why the TI process failed.   I should point out that setting values in cubes when a TI process actually fails (ProcessError) doesn't work since all changes to cube data is rolled back on failure.   

    The longer term plan is custom success and failure messages set using variables, or some other equivalent functionality, in the TI process.  The custom message set in the TI process would be returned as part of the ODATA response.  This would allow TI authors to set meaningful messages before calling the ProcessError TI function.

    ------------------------------
    Stuart King
    IBM Planning Analytics Offering Manager
    ------------------------------



  • 10.  RE: ItemReject not returning message in PAW for non Admin users

    Posted Mon July 26, 2021 09:35 AM
    Edited by System Fri January 20, 2023 04:14 PM
    Hi Stuart,

    If the short term enhancement doesn't tell you why the TI process failed then this isn't really an enhancement at all, because you already get an error message which doesn't tell the user why it failed! 

    I mean what would the custom success message say other than process ran successfully or Process failed? Maybe it could say: Process Failed, please now navigate to the failure cube which shows why the process actually failed, please note you may have to expand the column width or hover over the message to see the full error, and given there is no refresh after navigation option in workspace you may need to refresh the page when you navigate to the failure cube.

    I do hope the longer term plan arrives asap

    This issue did remind me of  a couple of other nice enhancements I would like to see in PAW, refresh after navigation and ability to completely switch off messages when running a process in PAW. Whenever you run a process in PAW it shows the green message if successful or the Red message if not, be nice to have the option not to show those.

    regards,

    Mark

    ------------------------------
    Mark Wragg
    ------------------------------



  • 11.  RE: ItemReject not returning message in PAW for non Admin users

    Posted Mon July 26, 2021 11:18 AM
    Mark - Agreed on all points.  Yes, the idea behind the short term solution is the book author proving some direction to the button clicker, or even just a message that has more meaning based on the context of the application (e.g "Sales data has successfully been updated"). 

    I hadn't thought about disabling the current toast messages when TI processes are run from a Workspace action button.  I'll bring that one up with our design team for the new design :)  Good feedback!


    ------------------------------
    Stuart King
    IBM Planning Analytics Offering Manager
    ------------------------------



  • 12.  RE: ItemReject not returning message in PAW for non Admin users

    Posted Thu May 19, 2022 06:17 AM
    Hi Mark,

    ... had the same problems and found this thread via google.

    Found following article (https://community.ibm.com/community/user/businessanalytics/blogs/george-tonkin/2021/11/20/access-those-tm1-process-error-and-other-files-in?CommunityKey=8fde0600-e22b-4178-acf5-bf4eda43146b) which describes a nice way to make logs accessible to users.

    Maybe this approach helps others as well.

    Regards, Frederik

    ------------------------------
    Frederik Spang
    ------------------------------



  • 13.  RE: ItemReject not returning message in PAW for non Admin users

    Posted Thu May 19, 2022 06:39 AM
    Hi Frederik,

    We have come up with with similar workarounds, but this really should not be needed, and when a specific error occurs, why it errored should be seen immediately on the screen by the user that ran the process.

    I hope IBM are in the process of resolving this issue, so the user experience is better, and that we can stop relying on convoluted workarounds!

    regards,

    Mark

    ------------------------------
    Mark Wragg
    ------------------------------