Question
Eviden
NL
Last activity: 10 Jul 2019 8:14 EDT
Native iOS App Dashboard Issue - Blank Dashboard
Issue:
Upon logging in on the Native iOS app, we are presented with a blank dashboard (see image).
Also:
- Access group - Offline enabled
- Case - Offline enabled
- When "Offline disabled" the Dashboard is visible.
- When logging in via mobile browser (Safari) the Dashboard is visible.
Log file (last lines):
Issue:
Upon logging in on the Native iOS app, we are presented with a blank dashboard (see image).
Also:
- Access group - Offline enabled
- Case - Offline enabled
- When "Offline disabled" the Dashboard is visible.
- When logging in via mobile browser (Safari) the Dashboard is visible.
Log file (last lines):
2019-07-09 20:53:30|INFO|XXX|JS: Pega Server is available
2019-07-09 20:53:30|INFO|XXX|JS: Unknown offline action: @baseclass.pzTransformAndRun
2019-07-09 20:53:30|INFO|XXX|JS: clientstorehelper.getRuleInstances.successCB_callback() result=
2019-07-09 20:53:30|INFO|XXX|JS: Evaluation of the When rule 'Data-Portal!pxIsUserDashboardPersonalizeAllowed' is not supported on the client. Using precalculated server value 'true'. [Error: Failed to get When rule "Data-Portal!pxIsUserDashboardPersonalizeAllowed" from cache.]
2019-07-09 20:53:30|INFO|XXX|JS: Evaluation of the When rule 'Data-Portal!pxIsUserDashboardInPersonalized' is not supported on the client. Using precalculated server value 'false'. [Error: Failed to get When rule "Data-Portal!pxIsUserDashboardInPersonalized" from cache.]
2019-07-09 20:53:30|INFO|XXX|JS: Evaluation of the When rule 'Data-Portal!pyIsMobile' is not supported on the client. Using precalculated server value 'true'. [Error: Failed to get When rule "Data-Portal!pyIsMobile" from cache.]
2019-07-09 20:53:33|INFO|XXX|JS: Pega Server is available
2019-07-09 20:53:33|INFO|XXX|JS: Unknown offline action: @baseclass.pzTransformAndRun
2019-07-09 20:53:33|INFO|XXX|JS: clientstorehelper.getRuleInstances.successCB_callback() result=
2019-07-09 20:53:33|INFO|XXX|JS: Evaluation of the When rule 'Data-Portal!pxIsUserDashboardPersonalizeAllowed' is not supported on the client. Using precalculated server value 'true'. [Error: Failed to get When rule "Data-Portal!pxIsUserDashboardPersonalizeAllowed" from cache.]
2019-07-09 20:53:33|INFO|XXX|JS: Evaluation of the When rule 'Data-Portal!pxIsUserDashboardInPersonalized' is not supported on the client. Using precalculated server value 'false'. [Error: Failed to get When rule "Data-Portal!pxIsUserDashboardInPersonalized" from cache.]
2019-07-09 20:53:33|INFO|XXX|JS: Evaluation of the When rule 'Data-Portal!pyIsMobile' is not supported on the client. Using precalculated server value 'true'. [Error: Failed to get When rule "Data-Portal!pyIsMobile" from cache.]
2019-07-09 20:53:35|INFO|XXX|JS: Fetching template for DATA-PORTAL!PYOVERLAYTEMPLATE from Client Store.
2019-07-09 20:53:35|INFO|XXX|JS: Template fetched successfully.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
PL
There's only an overview of the supported UI features in general - see the "Build the user interface" section in https://community.pega.com/knowledgebase/articles/offline-mobility-guidelines-0
I think I would rebuild the dashboard.
Pegasystems Inc.
US
Based on the log, I am going to assume that you are not on Pega Infinity and are on a 7.x version of the platform.
Given this, the log is telling you the problem. When rules were not offline enabled until 8.1. You need to use boolean expressions in place of the When rules.
If you are on 8.x, then you have a packaging issue and further investigation will be required. I am fairly certain thought that you are trying to execute When rules on a 7.x version and this is not supported.
Hope this helps!
Michael
Eviden
NL
Great response!
Perhaps you have pointed out the issue we are having..
However, I will provide you with the following details:
- Native iOS app -> More -> System info ->
- Pega Mobile Client Proprietary information hidden.3
- Pega Platform 8.1.2
Pegasystems Inc.
US
Based on that information, When rules should be offline enabled.
If the When rules are not referenced DIRECTLY in the UI, then they need to be white listed. This is something else that would explain why the rule is not found in the cache.
The error message is a little strange given that it states the When rule is not supported on the client but then also states that the When rule was not found in the cache, indicating that it was not packaged. Have you interrogated the mobile client cache using Xcode yet? Have you check the client story to see if the When rules are found? These would be my next steps if you find that the When rules are directly called in the UI or are, in fact, being whitelisted.
You might also try whitelisting them even if they are called in the UI. While you should not have to, in previous versions, I recall examples of having to do this because what we assumed was UI was not.
Hope this helps!
Michael
Eviden
NL
Update (1):
Whitelisting results in an UI with random icons. Looks indeed more like a cache issue.
Update (1):
Whitelisting results in an UI with random icons. Looks indeed more like a cache issue.
2019-07-10 02:14:42|INFO|XXX|JS: Pega Server is available
2019-07-10 02:14:42|INFO|XXX|JS: Unknown offline action: @baseclass.pzTransformAndRun
2019-07-10 02:14:42|INFO|XXX|JS: clientstorehelper.getRuleInstances.successCB_callback() result=
2019-07-10 02:14:42|INFO|XXX|JS: Evaluation of the When rule 'Data-Portal!pxIsUserDashboardPersonalizeAllowed' is not supported on the client. Using precalculated server value 'true'. [Error: Failed to get When rule "Data-Portal!pxIsUserDashboardPersonalizeAllowed" from cache.]
2019-07-10 02:14:42|INFO|XXX|JS: Evaluation of the When rule 'Data-Portal!pxIsUserDashboardInPersonalized' is not supported on the client. Using precalculated server value 'false'. [Error: Failed to get When rule "Data-Portal!pxIsUserDashboardInPersonalized" from cache.]
2019-07-10 02:14:42|INFO|XXX|JS: Evaluation of the When rule 'Data-Portal!pyIsMobile' is not supported on the client. Using precalculated server value 'true'. [Error: Failed to get When rule "Data-Portal!pyIsMobile" from cache.]
2019-07-10 02:14:44|INFO|XXX|JS: Pega Server is available
2019-07-10 02:14:44|INFO|XXX|JS: Unknown offline action: @baseclass.pzTransformAndRun
2019-07-10 02:14:44|INFO|XXX|JS: clientstorehelper.getRuleInstances.successCB_callback() result=
2019-07-10 02:14:44|INFO|XXX|JS: Evaluation of the When rule 'Data-Portal!pxIsUserDashboardPersonalizeAllowed' is not supported on the client. Using precalculated server value 'true'. [Error: Failed to get When rule "Data-Portal!pxIsUserDashboardPersonalizeAllowed" from cache.]
2019-07-10 02:14:44|INFO|XXX|JS: Evaluation of the When rule 'Data-Portal!pxIsUserDashboardInPersonalized' is not supported on the client. Using precalculated server value 'false'. [Error: Failed to get When rule "Data-Portal!pxIsUserDashboardInPersonalized" from cache.]
2019-07-10 02:14:44|INFO|XXX|JS: Evaluation of the When rule 'Data-Portal!pyIsMobile' is not supported on the client. Using precalculated server value 'true'. [Error: Failed to get When rule "Data-Portal!pyIsMobile" from cache.]
2019-07-10 02:14:46|INFO|XXX|JS: Fetching template for DATA-PORTAL!PYOVERLAYTEMPLATE from Client Store.
2019-07-10 02:14:46|INFO|XXX|JS: Template fetched successfully.
Update (2):
Adding the when-rules to pyCustomAppCache results in the same issue stated above.
Update (3):
Last update for this comment.
I switched from the manager portal (pyCaseManager7) to the case worker portal (pyCaseWorker) in de access group.
Ofcourse, the dashboard is not available in this portal OOTB.
However, the worklist is available and it works fine, no blank screen.. (why?)
2019-07-10 09:06:46|INFO|XXX|JS: Next Client Store synchronization planned in 0 seconds...
2019-07-10 09:06:46|INFO|XXX|JS: Client Store synchronization requested. Cause code: 0.
2019-07-10 09:06:46|DEBUG||ClientStore sending started event.
2019-07-10 09:06:46|INFO|XXX|JS: Pega Server is available
2019-07-10 09:06:46|INFO|XXX|JS: clientstorehelper: open 'harness' 'Data-Portal!pyCWPortalContent'
2019-07-10 09:06:46|DEBUG||ClientStore sending progress event with phase uploadStarted value 1
2019-07-10 09:06:46|DEBUG||Number of pending uploads 0
2019-07-10 09:06:46|DEBUG|FilesUploadSession|Number of tasks in upload session ObjectIdentifier(0x00000002819128e0):"FilesUpload.Type:cC8rqkjYprtpTY4R276263HgreO80MaR:https://XXX/prweb/PRRestService/offlinehttp/DataSync/pzBinaryUploadService?AccessGroupName=XXX:MANAGERS": 0
2019-07-10 09:06:46|DEBUG||Will schedule synchronization request after 0 seconds.
2019-07-10 09:06:46|DEBUG||Scheduling synchronization request.
2019-07-10 09:06:46|INFO|XXX|JS: Unknown offline action: @baseclass.pzTransformAndRun
2019-07-10 09:06:46|INFO|XXX|JS: Client Store synchronization started...
2019-07-10 09:06:46|DEBUG||Number of pending uploads 0
2019-07-10 09:06:46|DEBUG||ClientStore sending progress event with phase uploadCompleted value 5
2019-07-10 09:06:46|INFO|XXX|JS: HCLoadManager: Sync listener called. Status -
2019-07-10 09:06:46|INFO|XXX|JS: HCLoadManager: Sync Running! Waiting for Sync to complete.
2019-07-10 09:06:46|INFO|XXX|JS: clientstorehelper.getRuleInstances.successCB_callback() result=
2019-07-10 09:06:46|DEBUG||Prepared forwarding request to https://XXX/prweb/PRRestService/offlinehttp/DataSync/pzSynchronizationService?AccessGroupName=XXX:MANAGERS with parameters: installationId = rsZouN4Zx13XQUzceTGKjadVgTRV5U4k, synchronizationId = 9PUOXi0sVM2bwiHO, actionsOnly = NO
2019-07-10 09:06:46|DEBUG||Sending request to data synch service: https://XXX/prweb/PRRestService/offlinehttp/DataSync/pzSynchronizationService?AccessGroupName=XXX:MANAGERS
2019-07-10 09:06:46|DEBUG||ClientStore sending progress event with phase requestSent value 20
2019-07-10 09:06:48|INFO|XXX|Will sync native cookies...
2019-07-10 09:06:48|DEBUG|XXX|WebViewCookieSender: Injecting cookies to JavaScript.
2019-07-10 09:06:48|DEBUG||Chunk http response encoding: utf-8
2019-07-10 09:06:48|INFO|XXX|Will sync native cookies...
2019-07-10 09:06:48|DEBUG||Processing command DeltaSyncCommand
2019-07-10 09:06:48|DEBUG||ClientStore sending progress event with phase responseIncoming value 50
2019-07-10 09:06:48|DEBUG|XXX|WebViewCookieSender: No cookies to inject.
2019-07-10 09:06:48|DEBUG||Finished processing 0 items: expected: 0, current status: 3
2019-07-10 09:06:48|DEBUG||Finished applying soft transactions.
2019-07-10 09:06:48|DEBUG||ClientStore sending progress event with phase responseConsumed value 90
2019-07-10 09:06:48|DEBUG||ClientStore sending progress event with phase noChange value 100
2019-07-10 09:06:48|DEBUG||ClientStore sending succeeded event.
2019-07-10 09:06:48|INFO|XXX|JS: Client Store synchronization completed successfully.
2019-07-10 09:06:48|INFO|XXX|JS: Next Client Store synchronization planned in 300 seconds...
2019-07-10 09:06:48|INFO|XXX|JS: HCLoadManager: Sync listener called. Status -
2019-07-10 09:06:48|INFO|XXX|JS: HCLoadManager: The full load of assets to Client Cache has been previously done. Loading only changed assets!
2019-07-10 09:06:48|INFO|XXX|JS: HCLoadManager: Firing implict registrants for data sync event
2019-07-10 09:06:48|INFO|XXX|JS: Fetching template for DATA-PORTAL!PYOVERLAYTEMPLATE from Client Store.
2019-07-10 09:06:48|INFO|XXX|JS: entered and done
2019-07-10 09:06:48|INFO|XXX|JS: Template fetched successfully.
2019-07-10 09:06:48|INFO|XXX|JS: Invoking processActionModal_Success method.
2019-07-10 09:06:48|INFO|XXX|JS: Invoking displayFlowAction method. flowactionkey - pyCaseWorkerMoreMenu, refObjClass - Data-Portal, callback - object.
2019-07-10 09:06:48|DEBUG||SideBar: Will dismiss menu.
2019-07-10 09:06:48|INFO|XXX|JS: clientstorehelper: batchOpen
2019-07-10 09:06:48|INFO|XXX|JS: clientstorehelper.getRuleInstances.successCB_callback() result=
2019-07-10 09:06:48|INFO|XXX|JS: clientstorehelper.getRuleInstances.successCB_callback() result=
2019-07-10 09:06:48|INFO|XXX|JS: displayFlowAction success callback invoked.
2019-07-10 09:06:48|INFO|XXX|JS: Invoking hideFooter method. meta_data_div_id - #FAMETAData-PortalpyCaseWorkerMoreMenu.
2019-07-10 09:06:48|INFO|XXX|JS: Invoking setHeaderLabel method. meta_data_div_id - #FAMETAData-PortalpyCaseWorkerMoreMenu, modalHeaderTitle - pyCaseWorkerMoreMenu.
2019-07-10 09:06:48|INFO|XXX|JS: Could not apply custom label to button.
2019-07-10 09:06:48|INFO|XXX|JS: Could not apply custom label to button.
2019-07-10 09:06:48|DEBUG|XXX|JS: clientstorehelper: batchOpen succeeded!
2019-07-10 09:06:48|INFO|XXX|JS: clientstorehelper: open 'SYSTEMPAGE' 'Code-Pega-Requestor!pxRequestor'
2019-07-10 09:06:48|DEBUG|XXX|JS: Process Engine: Reconcile offline work items after each client store sync...
2019-07-10 09:06:48|INFO|XXX|JS: clientstorehelper: open 'datapage' 'D_pzOfflineWorkIDs'
2019-07-10 09:06:48|INFO|XXX|JS: SyncAttachmentDP: pyWorkPage or pzInskey of workpage doesn't exist
2019-07-10 09:06:48|DEBUG|XXX|JS: calling evaluateRefreshWhensOSCO after data sync...
2019-07-10 09:06:48|DEBUG|XXX|JS: clientstorehelper: getSystemPage Code-Pega-Requestor!pxRequestor successfully returned result
2019-07-10 09:06:48|DEBUG|XXX|JS: Process Engine: Client Store Sync: pxRequestor page received.
2019-07-10 09:06:48|INFO|XXX|JS: Pega Server is available
2019-07-10 09:06:48|DEBUG|XXX|JS: clientstorehelper: getDataPage D_pzOfflineWorkIDs successfully returned result
2019-07-10 09:06:48|DEBUG|XXX|JS: Process Engine: Reconciliation: list of items to reconcile received.
2019-07-10 09:06:48|DEBUG|XXX|JS: Process Engine: Calling ClientEventAPI evaluateRefreshWhensOSCO
2019-07-10 09:06:48|INFO|XXX|JS: clientstorehelper.getRuleInstances.successCB_callback() result=
2019-07-10 09:06:48|INFO|XXX|JS: clientstorehelper.getRuleInstances.successCB_callback() result=
2019-07-10 09:06:48|INFO|XXX|JS: clientstorehelper.getRuleInstances.successCB_callback() result=
2019-07-10 09:06:48|INFO|XXX|JS: clientstorehelper.getRuleInstances.successCB_callback() result=
2019-07-10 09:06:50|INFO|XXX|JS: Local action cancelled. bIsOverlay - true, closeReason -
2019-07-10 09:06:50|INFO|XXX|JS: No refresh strategy will be invoked.
2019-07-10 09:06:50|INFO|XXX|JS: Closing overlay
2019-07-10 09:06:50|INFO|XXX|JS: Invoking resetSubmitModalDlgParam method.
2019-07-10 09:06:50|INFO|XXX|JS: Pega Server is available
2019-07-10 09:06:50|INFO|XXX|JS: clientstorehelper.getRuleInstances.successCB_callback() result=
2019-07-10 09:06:50|INFO|XXX|JS: Evaluation of the When rule 'Data-Portal!pxRequestor.pyIsMobile' is not supported on the client. Using precalculated server value 'true'. [Error: Failed to get When rule "Data-Portal!pxRequestor.pyIsMobile" from cache.]
Pegasystems Inc.
PL
As stated in https://community.pega.com/sites/default/files/help_v81/procomhelpmain.htm#offline/concepts/off-offline-capability-con.htm it's always best to start your offline-enabled application by reusing Case Worker portal, and then adjusting it to your needs. The Case Manager portal, on the other hand, uses several features that are not yet supported in offline-enabled applications - thus you get the errors.
Eviden
NL
Great answer!
- Do you have an overview which features of the dashboard are supported ATM?
- Would you suggest rebuilding the dashboard or breaking down the OOTB version?
-
Florian Brüssel
Accepted Solution
Pegasystems Inc.
PL
There's only an overview of the supported UI features in general - see the "Build the user interface" section in https://community.pega.com/knowledgebase/articles/offline-mobility-guidelines-0
I think I would rebuild the dashboard.
Pegasystems Inc.
US
I concur with Radek. After I responded last night, I realized you were trying to render a dashboard. Typically, this would not be done with a hybrid app as hybrid apps are created specifically for work that needs to be completed remotely with the possibility of no connectivity. Dashboards are usually designed with reports and reports typically need access to the database. This is not possible when you are offline.
Two things to keep in mind when designing:
1. Does my design require any interaction with the server other than sync? If the answer is yes, you must re-design. All data must be packaged, therefore, report definitions will run at time of packaging and that is all. They cannot run when disconnected because they require the database and this is on server.
2. An offline application must be designed to run offline even if parts of it will run online as well. For example, if your case is offline enabled but can also be run online, you must realize that the code that runs will always include any custom javascript you have written, even if you are running connected at the time.
Always begin with your offline design. Trying to adapt an online design is fraught with danger as there will be parts of the design that do not consider offline and these parts will not always be obvious.
I concur with Radek. After I responded last night, I realized you were trying to render a dashboard. Typically, this would not be done with a hybrid app as hybrid apps are created specifically for work that needs to be completed remotely with the possibility of no connectivity. Dashboards are usually designed with reports and reports typically need access to the database. This is not possible when you are offline.
Two things to keep in mind when designing:
1. Does my design require any interaction with the server other than sync? If the answer is yes, you must re-design. All data must be packaged, therefore, report definitions will run at time of packaging and that is all. They cannot run when disconnected because they require the database and this is on server.
2. An offline application must be designed to run offline even if parts of it will run online as well. For example, if your case is offline enabled but can also be run online, you must realize that the code that runs will always include any custom javascript you have written, even if you are running connected at the time.
Always begin with your offline design. Trying to adapt an online design is fraught with danger as there will be parts of the design that do not consider offline and these parts will not always be obvious.
In addition, after reviewing your previous response, note that when you white listed some when rules, the display changed. This is indicating that there were some white listing issues, but the real issue here is that the design you are using, that of the Case Manager, is not built with offline in mind, so you are better off thinking about what functionality is actually required offline and then determine where that functionality is a challenge because you are not connected.
Hope this helps!