Rule configured to derive different Event Reasons on modification of different Pay Components in EC Compensation portlet
We can have multiple payComps in compensation section:
If amount of any of the payComp in the list is changed then we need to trigger different event reasons.
- Example 1: Base Salary amount changed then trigger ChangeBase event-reason
- Example 2: Monthly Car amount is changed then trigger ChangeCarMonthly event-reason
Employee Central - Compensation Information
Employee Central - Business Rule
Reproducing the Issue
1.create a rule with compinfo model as base object
In If condition we used comp model>comp information model>paycomp>value Where paycomp literal value = ***
NOT EQUAL TO comp model>comp information model>paycomp> previous value Where paycomp literal value = ***
THEN SET compinfo model > event reason to ****
The above rule never worked because the paycomp amount with WHERE always returned null. Null is never equal to null and rule fails.
2.We cant set compinfo> event reason if we use payCompRecurring as base object
System says- base object missing, and we cant use this rule either
This is a known limitation where WHERE IF statement with literal values are not considering the suitable payComps, so any changes to amount in these payComps are not considered by the system.
A way to address this requirement is to add each Pay Component to a unique Pay Component Group.
Pay Component Group is directly available in the rules and you can use IF condition as comp info model > Pay Component Group (select from available Pay Component Group)> previous value NOT EQUAL TO > Compensation Information Model > Pay Component Group > value.
PS: this solution cannot detect changes to frequency currency as unique, it will trigger same event reason as in the end any changes to all these fields are considered as change in Pay Component Group value.
So if you change amounts of different paycomps then you can use this kind of rule. (or changes to data of any Pay Component, in fact)
NOTE: You would use exactly the same logic below for Workflow derivation Business Rules, as well as the XML version.
Sample Objects we had used in trials:
Pay Component Group: (display on UI should be enabled for rule to work)
Rule: (Assign this rule on CompInfo hris element)
Correct event reason set on change of MONCAR pay comp in the compensation section:
Please also note that a similar limitation exists with the Event Derivation XML - you cannot derive Event Reason based on Pay Component changes. You will need to use the same solution in the XML, and base the XML rule on the Pay Component Group value change
Pay component Pay change pay component change compensation change Pay Component Group compInfo event-reason event derivation , KBA , LOD-SF-EC-RUL , Business Rules & Event Derivation , LOD-SF-EC , Employee Central , LOD-SF-EC-CMP , Comp Info,Recurring & Non Recurring , How To