2079920 - How to create a Business Rule for Employee Central - FAQ

SAP Knowledge Base Article - Public

2079920 - How to create a Business Rule for Employee Central - FAQ

Symptom

  • How to create a Rule Object for Employee Central 2.0
  • We would like to configure Employee Central to follow certain rules under certain conditions. One example would be that we want a field to be propagated based on the value of another field.

Environment

  • Employee Central

Resolution

  • Rules can be created via Admin Tools > Manage Rule Objects > click Create New Rule. Fill in the empty fields -:
  • Code = same as Foundation Objects, this is the external code for the rule, this will be needed when associating the rule with a field/section in the Succession Data Model XML.
  • Name = Give the rule and easy to recognize title, such as the task it is going to perform
  • Base Object = Can be any Object type, in this example we are using Job Information, so we can associate Job Info fields with the rule
  • Rule Type = Select the Rule Type from the list. If there is not a rule type that matches then you need to amend the MDF Picklist “RuleType” via Admin Tools > Configure Object Definitions.
    • Then, create the rule with the actions you intend to happen. In the example below, the rule will work as follows -: If the Division = ACEDivision, and the Sub Division = null (no value set), Then Raise the follow message as a Warning message

      1.JPG

  • Then, create the rule with the actions you intend to happen. In the example below, the rule will work as follows -: If the Division = ACEDivision, and the Sub Division = null (no value set), Then Raise the follow message as a Warning message

 

  • Once the rule has been created, you need to decide how the rule gets triggered. There are currently 3 options that decide when the rule is triggered -:

 

  • onSave = When clicking save, the system will action the rule
  • onChange = when changing the fields value, the rule will action
  • onInit = only applies to New Hire wizard process, and will trigger when the page is loaded

 

  • These triggers will force the rule to action based on the trigger type defined above.
  • Once you have decided on the trigger type, you will need to raise a case with Customer Success to get the rule linked to the area of Employee Central where you want the rule to trigger. Please be sure to provide the information to Customer Success as follows -:
  • Rule External Code + Section or Field in EC that the rule should trigger under. In the example above, we would need to provide CS with the following information -:

 
      Rule External Code = “SET_SUB_DIV”
      Trigger = onSave

  • For example if this was to set a default value to a field during the New Hire process, you would need to supply the External Code and also the trigger, which is “onInit”.

 

 

CODE EXAMPLE:

An example of the SDM XML triggers would be as follows -:

<hris-element id="jobInfo">

    <label>Job Information</label>

     <trigger-rule event="onSave" rule="SET_SUB_DIV"/>

     <trigger-rule event="onInit" rule="SET_SUB_DIV"/>

…….

<hris-field max-length="128" id="division" visibility="both">

      <label>Division</label>

       <trigger-rule event="onChange" rule="SET_SUB_DIV"/>

</hris-field>

 

Keywords

KBA , sf employee central , LOD-SF-EC , Employee Central , How To

Product

SAP SuccessFactors HCM Core all versions