Symptom
- Is there a way to trace a Business Rule?
- How to check if a Business Rule has executed properly
- How to check the rule execution steps when any rule is executed
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
SAP SuccessFactors Employee Central
Resolution
A Business Rule Trace is a troubleshooting tool in SAP SuccessFactors that helps administrators analyze the execution of Business Rules.
When a configured rule is triggered, the trace records information about its execution, including how the system evaluates the rule conditions and processes the associated actions. This information can help administrators identify why a rule is or is not behaving as expected.
Procedure
Step 1: Create a Rule Trace
- Navigate to Admin Center.
- Search for and open Business Rule Execution Log.
- Select Create New and choose Rule Trace.
- Enter a Code and a Name for the trace.
You can use any meaningful naming convention, provided that the code and name help you identify the trace later when retrieving the execution logs.
Step 2: Configure the Start Date and End Date
Specify the date and time range during which the Business Rule is expected to execute.
Important considerations:
- The Start Date and End Date must cover the actual execution time of the transaction.
- Use the server date and time as a reference when configuring the trace.
- As a best practice, verify the current server date and time before creating the trace. Consider setting the End Date to the following day to ensure that the relevant execution falls within the selected period.
- If the configured date range does not cover the actual rule execution time, the trace may return no results.
To check the server date and time:
- Open the user menu at the top of the page.
- Select Show Version Information.
- Review the displayed server information and use the applicable server date and time as a reference when configuring the trace.
Step 3: Select the Login User
In the Login User field, select the user under whose execution context the transaction that triggers the Business Rule is performed.
Consider the following scenarios:
- Standard user session: Select the user performing the transaction.
- Proxy session: Select the user being proxied as, whose transaction triggers the rule, rather than automatically selecting the administrator who initiated the proxy session. Confirm the execution context for the specific scenario.
- Provisioning job: If the rule is triggered by a Provisioning job, select the job owner as the Login User, as applicable.
The selected user must be an active system user.
Note: If a user's First Name and Last Name are not maintained in Personal Information, the user may not appear in the Login User search results.
Selecting the correct Login User is essential. If the selected user does not match the execution context of the transaction, the trace may not capture the expected rule execution.
Step 4: Configure the Rules to Be Logged
In the Rules to be Logged section, choose whether to trace all associated rules or a specific rule.
- Leave the field empty: The trace captures the associated Business Rules executed during the transaction, subject to the trace configuration and supported execution context.
- Select a specific rule: The trace captures execution information for the selected rule rather than all associated rules.
If you are unsure which rule is causing the issue, leave the field empty initially. This can help you identify which rules are executed during the transaction.
If you already know which rule needs to be investigated, select that rule to narrow the trace results.
Step 5: Select the Trace Mode
Select the appropriate trace mode:
- Complete: Use this mode when detailed information about rule execution is required.
- Short: Use this mode when a more concise trace is sufficient.
Choose the mode based on the level of detail needed for the investigation. Refer to the relevant SAP documentation for the exact differences between Complete and Short trace modes.
Refer to our Handbook Link: Creating Business Rule Execution Logs | SAP Help Portal
Step 6: Execute the Transaction and Review the Trace
- Save or create the Rule Trace configuration.
- Perform the transaction that is expected to trigger the Business Rule during the configured date and time range.
- Navigate back to Business Rule Execution Log.
- Retrieve the trace using the configured code or name.
- Review the captured execution details to understand how the rule was evaluated and whether its conditions and actions were processed as expected.
Troubleshooting
If the Rule Trace returns no results, verify the following:
- The Start Date and End Date cover the actual transaction execution time.
- The correct Login User has been selected.
- The transaction was performed after the trace was configured and within the configured period.
- The selected rule, if specified, is the rule triggered by the transaction.
- The transaction and Business Rule execution are supported by the selected trace configuration.
If the trace still returns no results, review the applicable SAP documentation and confirm the trace configuration for the affected scenario.
Post- release: 1H2024
Rule trace threshold Error: The maximum amount of 50 rule traces has been reached. This means that you have to delete old rule traces before creating a new one to stay under the threshold.
FAQ - Additional Information
Q) Where can I get information on this from the Guide?
A) Handbook: Implementing Business Rules in SAP SuccessFactors
Chapter:Creating Business Rule Execution Logs
Q) Can we use Diagnostic Tool instead of rule trace?
A) Some scenarios are supported in Diagnostic tool. This tool provides a detailed and visual presentation on how the rules impact different portlets, fields, etc. It's easier to understand the results in Diagnostic tool compared to Rule Trace.
KBA: 3468733 - Diagnostic Tool for Employee Central save transactions and workflows
Handbook: Using the Diagnostic Tool
See Also
Keywords
SF, success factors, EC, rule isn't working, logging, empty, missing, rule trace, business rule execution log, execution log, log, trace, file, export, track, FAQ, PLT business rules, The maximum amount of 50 rule traces has been reached. This means that you have to delete old rule traces before creating a new one to stay under the threshold, Business Rule Trace, Business Rule Execution Log, Rule Trace, SAP SuccessFactors Business Rules, Business Rule Troubleshooting, Business Rule Execution, Complete Trace, Short Trace, Rule Execution Log, Business Rule Debugging, Create New Rule Trace, Configure Business Rule Trace, Login User, Proxy User, Provisioning Job Owner, Rule Trace Start Date, Rule Trace End Date, Business Rule Conditions, Business Rule Actions, Rule Trace Returns No Results, Empty Rule Trace Logs, Admin Center Business Rule Execution Log, Business Rule Trace Not Capturing Logs, Business Rule Execution Log Is Empty, Rule Trace Returns No Results, Business Rule Not Traced, Business Rule Execution Not Recorded, Incorrect Login User in Rule Trace, Business Rule Trace Date Range, Short Trace vs Complete Trace, Accrual Rule Troubleshooting, Accrual Simulation Trace, Time off rule trace, Time Sheet Rule trace, Rule Logs validation, rule execution logs, how to create rule trace, what is rule trace, how to generate rule trace, Take Rule logs, Onsave rule logs, Take Rule Troubleshooting, Accrual Rule Troubleshooting, Accrual Amount Troubleshooting, Recalculation Troubleshooting, Rule Troubleshooting, Successfactors, Time Management Rules, Time Rules, Time Sheet Rules, Hire Rule, Workflow Rules, Workflow rule troubleshooting, Workflow rule logs. , KBA , LOD-SF-EC-JOB-RUL , Job Info Business Rules , LOD-SF-EC-ADM , Admin Tools (EC Core only) , LOD-SF-EC-CMP-RUL , Business Rules , LOD-SF-MDF-RUL , Custom Oject based Business Rules , LOD-SF-RCM-RUL , Recruiting Rule Issues with MDF Platform , LOD-SF-EC , Employee Central , LOD-SF-EC-TIM , Time Off , LOD-SF-EC-TIM-RUL , TAT Rules, Validation & Take rules , LOD-SF-EC-TIM-UI , Team Absence Calender/ Workbench/ ESS UI's , How To
SAP Knowledge Base Article - Public