Sunday, March 14, 2021

Kibana Visualizations: Working with Region Maps

By now, we all must have seen the demonstrations of Kibana Data Visualizer that was made available in PeopleTools 8.58. If not, it is very easy to spin up a PUM image (HCM or FSCM) and get a hands-on experience with this functionality.

While evaluating the delivered Kibana Visualizations, I noticed a few map visualizations.

For example, HCM > Workforce Administrator (Homepage) > Workforce Insight (Dashboard) > Workforce Equity (Tile) > Employee Distribution by Country (Visualization)

How does this work?

As we can see in the footer, the map is rendered to us using the Elastic Maps Service (EMS) which in turn produces basemap tiles leveraging OpenStreetMap data.

We can find more information here:
https://www.elastic.co/elastic-maps-service
https://maps.elastic.co

Further, the out-of-box Kibana functionality would directly request the maps from the browser. The EMS requests are made to the following domains:

  • tiles.maps.elastic.co
  • vectors.maps.elastic.co

If we run into firewall restrictions and unable to allow access to *.maps.elastic.co, we have the option of hosting the EMS locally.

We can find more information here:
https://www.elastic.co/guide/en/kibana/current/maps-connect-to-ems.html

Gotcha

When I dug in a little further to review how the application data (PS Query/Connected Query > Elasticsearch Index > Kibana Index Pattern) is hooked (or joined) to the EMS, I found a strange Kibana bug (?).

Here is the 'Data' tab of the Visualization configuration in Kibana. We can see that the COUNTRY field in PeopleSoft is being used as the aggregation field.

Now, if we go to the 'Options' tab, we will see that the Join Field for the EMS Vector map (World Countries) is set to 'ISO 3166-1 alpha-2 code'.



Wait a minute. The COUNTRY field in PeopleSoft is the 3 character ISO code but somehow it is joined with the 2 character ISO code. How is this possible? Am I right?

We can even preview on EMS to see the codes. If you don't believe me.


After scratching my head for a long time, I found that this is a bug with respect to the display of the Join Field in the Kibana configuration. It possibly may be defaulting to the first value that is in the drop-down. However, once I reviewed the actual JSON configuration (Saved Object) of the visualization, I found that it is in fact using the 'ISO 3166-1 alpha-3 code'. So, it proves that I was not losing my mind (at least as yet!). 😅


Exploring

Next, I wanted to build a map on my own. I used the same data 'Employee Distribution' and represented it per Country and State instead of just the Country.

I created an expression in my PS Query (used in Connected Query source for Search Definition) that concatenates COUNTRY_2CHAR and STATE fields into a single query field.


Next, I created a visualization in Kibana using this field as the Join Field for an 'Administrative region' vector map - 'Region ISO code'.



I look forward to your questions, comments and feedback (please use the comments section below).

Thursday, March 11, 2021

SignOn PeopleCode: Base64 Decode + Inflate

This is a follow-up to my previous post where we saw how we can Deflate + Base64 Encode a SAML Request. 

Refer: https://pe0ples0ft.blogspot.com/2021/03/sso-deflate-base64-encode-saml.html

Here is an example of the reverse - Base64 Decode + Inflate:

Wednesday, March 10, 2021

SignOn PeopleCode: Deflate + Base64 Encode (SAML Request)

Often, I hear questions about PeopleSoft's support for SAML, OAuth or other types of SSO. I have also seen some bolt-on solutions that are available for purchase. My thoughts on this age old question is as follows:

Signon PeopleCode + SetAuthenticationResult Function + PeopleCode Java Functions

Signon PeopleCode is incredibly flexible and allows us to build any custom SSO integration that might be unique to our requirements. Couple this with the built in SetAuthenticationResult function (to manage redirects and authentication) and PeopleCode Java functions, we have everything that we need to develop an integration with any SSO solution.

Working on PeopleSoft SSO implementations is interesting. No matter what standard or tailored solution we choose, there is always something unique with each environment. I plan to write more follow-up posts on this topic! Stay tuned.

This brings my focus to the purpose of this particular post. A SignOn PeopleCode requirement that was brought to my attention by Diego De Boni - a colleague (and a new friend) in the PeopleSoft community!

The requirement is to Deflate and Base64 encode a string (in this case a SAML Request) in SignOn PeopleCode. This is where PeopleCode Java functions come in handy!

Useful Resources:
What is SAML and how does it work?
SAML Developer Tools - Deflate + Base64 Encode SAML Message

Here is an example of a simple string "ABCDE" that is deflated and Base64 encoded. This string could be replaced with a SAML Request for real use cases.

Before I could come up with a solution, Diego beat me to it and found a way to achieve the Deflate + Base64 encoding using Java in Signon PeopleCode. I asked his permission to share the following sample code as it will help many others in the community. More importantly, it shows the power of this formula:

Signon PeopleCode + SetAuthenticationResult Function + PeopleCode Java Functions

Signon PeopleCode Snippet

I look forward to your comments and feedback (please use the comments section).

Sunday, February 21, 2021

Event Mapping on Fluid Homepage

I regularly get questions on how we can make changes to Tiles on the Homepage dynamically:

  • Display/hide Tiles based on certain conditions
  • Use different Tile title/content based on certain conditions
  • And so on...

And every time I struggle to remember and find this reference to an old Oracle community discussion:
https://community.oracle.com/tech/apps-infra/discussion/4052095/hide-fluid-tile-from-a-homepage

Just to avoid searching for this again, I am sharing/documenting this link on my blog. 😇

On this thread, Divesh Gupta shared an idea to use Event Mapping on the Fluid Homepage to dynamically display/hide Tiles.
Component: PT_LANDINGPAGE.GBL
CREF: Fluid Structure Content > Fluid Pages > PeopleSoft Applications > Fluid Home

This is a brilliant idea which could be extended for many use cases. It opens up the door for all sorts of dynamic customizations (without the overhead of a customized object). I refer to this on several occasions and hope you find it useful!

Also, be on the look out for a new feature that is planned for PeopleTools 8.59!
Refer: PeopleSoft Planned Features and Enhancements (Doc ID 1966243.2) > Technology (Tab) > Hiding or Displaying Tiles Using an Application Class

Saturday, February 20, 2021

Push Notifications - Disabling the Notification Badge

I saw a question on a forum where someone wanted to disable the push notifications badge from showing the incremental counter.

What is the Notification Badge? It is the counter on the notification icon which indicates any new notifications that were pushed to the client/users.

Why would we want to disable this? Yes, that is a good question. It is hard enough to setup and ensure that Push Notifications is functional, so I would not touch anything if you ever get the badge to increment properly! 😉

That aside, let's say we have a valid reason to remove the counter. Maybe we decided to not interrupt our users and just let them view their notifications on their own accord (i.e., the next time they make a request to the server).

My first thought was that we could simply disable this at the app server configuration level.
PeopleBooks: Configuring an App Server Domain for Push Notifications 

However, this would only stop the server from sending 'push' notifications to the client using WebSockets. This would not stop the counter from displaying when the client/users initiate a request (such as initial login and subsequent actions within the application).

Note: In PeopleTools 8.58, the web profile custom property EnablePNSubscriptions is no longer used. Refer: Understanding Push Notification Configuration

Option 1

Looking for other options, I stumbled upon a PeopleTools Personalization that is new in 8.58.
Refer: Adding PeopleTools Option to Disable and Re-enable Push Notifications

This works great! Easy to setup online (no need to reboot any domains) and effectively stops the notification badge counter from displaying all together. The beauty about this approach is that we could either setup the default option as true or false (i.e., enabled/disabled) at a system level and let users (with appropriate access) to personalize this option via 'My Preferences' at an individual level.

Option 2

The other idea I had was to simply hide the badge using CSS.


CSS

For the sake of a proof of concept, I made the following update to the delivered CSS object - PSBASE_A_STYLES.

This is another option to achieve the same result at a system level.