Refreshing issues of KPI and HtmlAdvanced portlets in Portal 2


Another mystery… I have two KPI’s and one HtmlAdvanced portlet whose data sources are workflows that call a rest API to retrieve data. I would swear that until 2 or 3 days ago they were working fine, but maybe I hadn’t noticed the behavior they are having now. I never had any error running the current version of the workflows used by the KPI’s and the HtmlAdvanced portlet in Flow Studio and the execution is practically instantaneous.

Both KPI’s show a number or a question mark (?). The latter should only show up if there was an error on executing the API or an error was returned. Typically, when the question mark is shown it is not due exactly to an error, but because the name of the user logged in the portal doesn’t match an user that exists in the other application whose API is called.

The value is the KPI’s should be same as the one that appears in red and in parentheses in the line of the HtmlAdvanced “WORKFLOWS” portlet with the same name (either “as minhas tarefas” or “caixa de entrada”).

The KPI’s have “Initialize load” enabled, and according to the help website, that means that they should be refreshed every time the page is loaded, which is what happens with other portlets in the page. I have also tried various refresh intervals or just disable the autorefresh.

Most of the times everything works fine and the misbehaviors seem to occur much more when one does logout and login again with another user, specially if one of the users exists in the other application (of the API) and the other doesn’t.

The Html portlet seems to behave well most of the times, ie, it shows the correct values, but on a few occasions it simply shows up blank after the page was loaded.

However, most of the times the KPI’s show a wrong value until a refresh is forced. When autorefresh is enabled, most of the times no refresh is done and in a few occasions, the “wait” circle that appears during the refresh never stops.

Any hints on what may be happening or on how to solve this situation?

Thank you.

Example of the situation after logging with a user that exists in the application of the API, just after having being logged in with a user that exist. Note that in the lower portlet are shown question marks, which is correct, but in the KPI’s are shown 0, which is wrong.


Example of the situation after logging with a user that doesn’t exists in the application of the API, just after having being logged in with a user that don’t exist. In this case,both KPI’s should show 0.


I am not able to reproduce other behaviors now (as I wrote above, the errors don’t occur every time).

Are the users logging on with “Flow users” or OpenID?


(that is a mystery…a weird one…just the kind we like :slight_smile: )

Do all of the 3 portlets share a datasource workflow?
(I am wondering if the problem might be related to the API you are calling, if they share a datasource flow, upon refresh it is executed 3 times and then the API gets 3 calls simultaneously and doesn’t process them)

What happens if you make just one KPI refresh upon reload?
(maybe, for debuging, include sysdate/now() as Unit of KPI in the datasource just to see refresh time)

Also maybe try to put “chain listeners” (so maybe the KPI 1 that just shows “WORKFLOW” text refreshes upon reload, then put a listener on KPI 2 “AS MINHAS TAREFAS” to refresh on refresh of KPI 1, then put a listener on KPI 3 for KPI 2 and lastly a listener on Html for KPI 3)

Hope this helps!


Like Flow users that are synchronized with AD.

I will check that as soon as I finish what I am doing right now. Thank’s.

Hm, but du you have OpenID turned on or do they authenticate using Ldap? There is an openId-tab in the studio, is OpenId enabled and set up there?

OpenID is disabled. Anyway, what could be the relation between that and the refresh issue?

Ok. No I have just seen a bunch of OpenId-related issues with refreshes (but refreshing of the token, not the portlet) so I was just thinking we should rule that out.

Let’s see what the results of Ivan’s suggestions ends up like.