10.1 Why assigning rules to objects?
A rule is only triggered when it is assigned to the corresponding object.
The object to which you assign the rule can be an EC object (foundation object, person object, or employment object) that is defined as an HRIS element, or an MDF object that is defined using the Metadata Framework (MDF). Depending on the object type, you have to follow different ways of assigning the rule to the object.
10.2 Assigning a Rule to an MDF Object
To assign the rule to an MDF object, refer to the description in the Metadata Framework Implementation Handbook, under Adding Rules.
10.3 Assigning a Rule to an EC Object in Administration Tools
Here's how you assign a rule to an EC object in the Administration Tools, using the Business Configuration UI.
Context
You can assign a rule to EC objects using the Business Configuration UI. Consider the following limitations:
● You can assign rules only for person or employment objects (that is, employee data), but not foundation objects (that is, company data).
● You can assign rules with the base objects Employee Information, <person or employment object> or <person or employment object> Model, but not with the base object Employee Information Model.
Procedure
1. Go to Administration Tools.
2. In the Company Processes & Cycles portlet, select Company Settings Manage Business Configuration . 3. Under Employee Central, click the person or employment object that you want to assign the rule to.
For example: jobInfo for Job Information.
4. To assign the rule on object level (HRIS element level):
122 © 2014 SAP SE or an SAP affiliate company. All rights reserved.
Configuring Business Rules in SuccessFactors Assigning Rules to Objects
a) Scroll down to the Trigger Rules section.
b) Select the corresponding base object, event type and rule.
5. To assign the rule on HRIS field level (for onChange event type only):
a) Under HRIS fields, click the Details link next to the field to which you want to assign the rule.
b) In the Details popup, scroll down to the Trigger Rules section.
c) Select the corresponding base object, event type and rule.
d) Click Done to close the popup.
6. Click Save.
Note: You can find more information about the Business Configuration UI in the Employee Central Implementation Handbook.
10.3.1 Limitations for onView Rules
The following limitations apply to onView rules:
● You cannot use onView rules for the following EC objects:
○ Home Address
○ Primary Emergency Contact
● For Model base objects that represents data in rows and columns (also referred to as 'data grids'), you have to consider the following:
○ To set a column to invisible or required, create a rule without an IF condition (Always True selected) and put only visibility and required changes in the THEN statement of the rule. Do not set values here.
○ To set values for single rows or for the whole data grid: Create a rule with or without IF conditions and set the values in the THEN statement. Do not set the visible or required attributes in this rule.
Note
This limitation applies to the following Model base objects:
○ Spot Bonus Model (for HRIS element payComponentNonRecurring)
○ Job Relationships Model (for HRIS element jobRelationsInfo)
○ Compensation Model (for HRIS element payComponentRecurring)
○ National ID Information Model (for HRIS element nationalIdCard)
○ Work Permit Info Model (for HRIS element workPermitInfo)
○ Email Information Model (for HRIS element emailInfo)
○ Social Accounts Information Model (for HRIS element imInfo)
○ Direct Deposit Model (for HRIS element directDeposit)
See also About Model Base Objects.
Configuring Business Rules in SuccessFactors
Assigning Rules to Objects © 2014 SAP SE or an SAP affiliate company. All rights reserved. 123
10.3.2 Rule Events
Rule events define which user action in the system triggers rule execution.
Note that the base object you have selected for creating a rule limits which event you can choose; for an overview, see Creating a Rule with EC Objects.
Here's an overview of the available events and when to use which event:
Rule is triggered
onInit HRIS element Set field properties (for example, making fields manda
tory, or hiding fields), or to default values that should be shown as soon as the user calls up a page
Portlet or page is saved
onSave HRIS element Validate user entries when the user wants to save the changes
For example, if the user didn't make an entry in a man
datory field, an error message is displayed.
Field value is changed
onChang e
HRIS field Trigger rules as soon as the user makes a change to a field
Portlet or page with transient field is loaded
onView HRIS element Calculate fields that are transient (this means the re
sult is not a fixed value stored on the database, but is calculated during runtime when the user calls up the page)
For example, to calculate an employee's age.
Note: Requires an additional onSave rule that sets the transient field back to null.
Please see also Limitations for onView Rules.
Portlet or page is
Such defaults might be derived from other fields in the user context.
Please note that onEdit is different from onInit: While both are similar in use (to set defaults using rules), onInit is used on the Add New Employee page only (with a person or employment object as base object), whereas onEdit is used on all other editable pages.
Change to Job infor
mation record is saved
saveAlert HRIS element Send alerts and notifications for approval workflows This is an exception: This event type is only used in combination with approval workflows in Employee Cen
tral. For more information, see the Employee Central Implementation Handbook, under How do you set up alerts and notifications?
124 © 2014 SAP SE or an SAP affiliate company. All rights reserved.
Configuring Business Rules in SuccessFactors Assigning Rules to Objects