Sunday 22 February 2015

Using Expression Language in Fusion HCM

We've been doing lots of fun things with Expression Language in Fusion HCM (now there's a sad statement if ever I heard one).  Expression Language (EL) is a much under-utilised feature of Fusion Apps which can be a great help when tailoring your application.

We've all heard that in a SaaS environment you can't 'customize'.  But, Fusion Applications comes which a whole host of tools which help you control the way your application works, looks and feels.  This is all configuration.  And that's one of the differentiating feature with Fusion Apps.

Let's look at a few example.

EL Embedded in Setup

Instead of having a complicated fast formula to calculate leave entitlements, we can now use an Expression Language Formula.

Here we see a 22 day annual leave entitlement for people on Grade 1.



EL as a Conditional Statement in Navigator Menu

The Navigator menu is constructed from the Roles provisioned to a user.  For example, the HR Specialist role gives access to the Person Management Workarea.  This workarea is an item which is dynamically placed in the Navigator menu for users with that role.

However, using the FSM task Manage Menu Customizations, we can control the placement, description and visibility of the menu item.

Here's an example of the Manage Menu Customizations task,  We are looking at the New Person workarea link:



 When we edit the New Person link, we see the following properties:




 

The Rendered property is set to true and will therefore always display this item.

However, let's say we want to only display it when the logged on user has the HR Specialist Role.  We can override the Role Based Access (not change it, but just override it), with an EL Statement.


#{securityContext.userInRole['PER_HUMAN_RESOURCE_SPECIALIST_JOB']}

This statement will return TRUE if the user has the HR Specialist Role otherwise it will return FALSE.

We simply place this statement in the Expression Language field of the Edit Item Node window:




So the end product looks like this:



And now the menu will be dynamically changed according to our own variation of the role provisioning.

There are many other, much more complex variations, but I hope this gives a simple illustration of the power of the Expression Language.