SAP Knowledge Base Article - Public

2727185 - Employee Central - Off Cycle Event Batch: How the Scheduled Job Works

Symptom

This article explains how the Off Cycle Event Batch job "Bizx Daily Rule Processing Batch" works

  • How does the Off Cycle Event Batch work?
  • How do the filters work?

Environment

SAP SuccessFactors Employee Central

Reproducing the Issue

Cause

Resolution

Please carefully read the below explanation and examples for the 4 stages of the Off Cycle Event Batch in order to understand how it works and how you can troubleshoot issues. Make sure you are also using the Business Rule Execution Log to troubleshoot rule execution (see article 2257064).

Off Cycle Event Batch Documentation (example for Grade Step Progression)

Index

  

Stage 1) Select the User list to be processed by OffCycle (Applicable Only if Off Cycle Event Batch User Group is configured): 

This is the first stage of the processor to get the user list for which off cycle process need to be executed.  If Off cycle definition contains” Off Cycle Event Batch User Group" then processor will select all users from this group (accordingly to group definition in “Manage Offcycle Group Page”)

Stage 2) Filter criteria/Filter the user records:

Based on the Offcycle definition toFilter condition and definition fields, user’s base entity records will be filtered.

“Include All Matched Records In Every Run” flag: “Include All Matched Records In Every Run” works as flag for filtering the records for Off Cycle Event Batch process and depends on the flag value Offcycle processor will decide if records need to be filtered during every run or not.

Stage2.png

Example:

Offcycle definition:
Base Object: Job Information
Include All Matched Records In Every Run = No
Filter condition: Date_Filter_field=Hire_Date,   Operator= "is on or before", offset=15, units=Years

Current design condition for "Include All Matched Records In Every Run" flag of Offcycle definition:
  Last_successful_run_date - offset units is < Date_Filter_field && Date_Filter_field is (Operator) Current_date - offset units

User job Info Records:
User Id   Hire Date
User1     11/11/2003
User2     11/12/2003
User3     11/13/2003

Offcycle Run 1:
Job run details:
Last_successful_run_date= 11-11-2018
Current_date = 11/12/2018

Based on above data following condition will be generated as per current design:
Last_successful_run_date - offset units is < Date_Filter_field && Date_Filter_field is (Operator) Current_date - offset units

User1 : 11/11/2003       <        11/11/2003      &&          11/11/2003<=11/12/2003            Condition  Result=False
 User2 : 11/11/2003       <        11/12/2003      &&          11/12/2003<=11/12/2003            Condition  Result=True
 User3 : 11/11/2003       <        11/13/2003      &&          11/13/2003<=11/12/2003            Condition  Result=False

Offcycle Run 2:
Job run details:
Last_successful_run_date= 11-12-2018
Current_Date= 11/13/2018

Based on above data following condition will be generated as per current design:
Last_successful_run_date - offset units is < Date_Filter_field && Date_Filter_field is (Operator) Current_date - offset units

User1 : 11/12/2003       <         11/11/2003      &&          11/11/2003<=11/13/2003            Condition  Result=False
 User2 : 11/12/2003       <         11/12/2003      &&          11/12/2003<=11/13/2003            Condition  Result=False
 User3 : 11/12/2003       <         11/13/2003      &&          11/13/2003<=11/13/2003            Condition  Result=True

Include Only Current Record:  Field will appear only when “Job Information” is selected from "Base Object" field in off cycle event batch definition. With this field user has an option to define if Offcycle need to select only current effective record during filtering the user record or not. If user sets "Include Only Current Record” field value as “Yes” then off cycle will select only current effective record of the user during user record filtering process.

Following query will be appended to the Offcycle record search criteria when “Include only Current Record” field value is set as “Yes” in the off cycle definition.

Example Scenario:

User’s Job Info Record:

seqno      User id                 Effective_start_date        Hire_date               Effective_end_date

1                111                       01/01/2001                   01/01/2001                    01/01/2002

2                111                       02/01/2001                   01/01/2001                     01/01/2003

3               111                        02/01/2003                    01/01/2001                    31/12/9999

Off Cycle Definition:  simple off cycle without any filter

Rule:  If Job Info hire_date is>> 01/01/2000 then Update custom_long_filed1=”123”;

  • When user set "Include Only Current Record” field value as “Yes”):  In above scenario Offcycle process will select only current effective  dated record  for the user ( i.e. #3 )and insert only one updated record into job information table.
  • When user set "Include Only Current Record” field value as “No:  In above scenario Offcycle process will select all the 3 matching records and updated all three records, inserts the same into job information table.

Stage 3) Process Off Cycle Rule:

Based on the associated rule in Offcycle definition, further filtering on user records will be performed based on Rule's IF condition. Then the filtered user record’s info will be modified according to the Rule's THEN SET condition.

Stage 4) Import:

This is the ‘Employee Data Import’ stage. In this stage records processed from stage3 will be saved/imported to Database.

Off cycle result report:

OffCycleReport.png

Configure the BizXDailyRulesProcessingJob job to run OffCycleEventBatch Daily:

This Job will pick all active OffCycleEventBatch Records and execute them. You cannot preferentially select which offcycle events batches should be picked up by the job.

ECT-219021 - More Employee Central Jobs on Job Scheduler in Scheduled Job Manager.

[Note] The Job should be configured to run daily, this setting should not be modified.

 

Process job logic for OffCycleEventBacth:

  1. Get all active off cycle event batches
  2. For each batch,
    • Fetch the records for the filters configured for this batch
    • Invoke associated rule for collected records
    • Save the records (uses Imports framework)
    • Create batch result
  3. Collect result for each batch, send to BizXDailyRulesProcessingJob
  4. This result is available as logs in Admin Center> Monitor Jobs

Execution Order:

[Note] The BizXDailyRulesProcessingJob is not specific to Employee Central, as other SAP SuccessFactors modules use this job for batch processing as well. The below is a list of the processes (in order of execution).

Each process will run a separate sub-job from the parent job BizXDailyRulesProcessingJob (in order below). In Provisioning the execution is read from the bottom to top, and will only include processes which are configred - for example if you do not use Position Management, then you will not see the Position Management processor in the list of sub-jobs:


 1. OFFCYCLE EVENT batch Process: (Employee Central) 
    Process Label: Offcycle Event Batch
  
 2. Position Management (Employee Central)
    Process Label: Position Management
  
 3. Candidate Creation (Recruiting Management)
    Process Label: Candidate Creation For New Hires Event Batch,
 
 4. Candidate Creation NON_EC (Recruiting Management)
    Process Label: Candidate Creation For New Hires Event in Non EC Systems Batch,
 
 5. On boarding Sync (Onboarding)
 Process Label: Where To Go Sync Job
   
 6. On boarding close job (Onboarding)
 Process Label: Processes close Job
 
 7. Scheduled Jobs Purging: (DRTM - Platform) 
 Process Label: Scheduled Jobs Purging

Known Limitations:

  1. Ability to configure the run frequency for the OffCycleEventbatch, as of now the job will run daily
  2. Refine selection criteria before sending the records to associated rule. Today you can only filter the records based on dates [Employment Information, Job Information date fields]
  3. Reprocessing the failed records. Today the failed records are not reprocessed.
  4. Order of Execution of OffCycleEventBatches is not customizable. Today they run in the order of creation.
  5. Benchmarking performance, better monitoring and performance enhancements

Additional Information to analyze the issue:

Stage 1: (Applicable Only if Off Cycle Event Batch User Group is configured): If user record is not selected according to the customer expectations check the group definition in “manage offcycle group page”.

Stage 2:  If user record is not filtered according to the customer expectations, make sure Offcycle definition field criteria’s and tofilter criteria are satisfied by user record.

Stage 3:  If the user record is not selected by rule, check record satisfies rule’s IF condition. Also make sure rule configuration is supported by Offcycle i.e. Only “SET” clause(s) in THEN block of the business rule.

Note: If root cause is not found then attach Business Rule Execution log for associated rule while raising the JIRA ticket along with other basic required information.

Stage 4:

  1. Record insertion failed: Check the response for any error messages and try correcting the errors.
  2. Records inserted successfully but info changed for some field: Check if any business rules configured under the HRIS element for which user record is being processed and verify if any of these rules modify user record.
    • Note: If root cause is not found then attach the Business Rule Execution log while raising the JIRA ticket along with other basic required information. Also raise COSR ticket to get the application logs for corresponding “BizxDailyRuleProcessingBatch” job (Refer COSR-148759).  Job run details can be found via Provisioning tool>> Monitor jobs.
  3. Records inserted successfully into the HRIS element which is updated by the Off cycle event batch rule but the rule associated with that HIRS element is not working as expected or rules not triggered.  :
    • (examle: job information updated successfully through the Offcycle but  Onsave/Onchange rule associated with Job info which suppose to update compensation information is not triggered).
    1. Check if same scenario works from the UI.
    2. If UI works fine as expected then check, if same scenario works fine from the import?
      • If imports doesn't work then please check import settings and RBP permissions to see the Rules support is enabled for the import. 

Troubleshooting Job/Performance issues:

To avoid the scenario of long running jobs, please ensure that you are appropriately filtering recors to be checked by the Off Cycle Event Batch. If your Off Cycle Event Batch is not filtering appropriately, then it might be running Business Rules against ALL possible records. Then the job will be expected to take a lot of time to process.

Also bear in mind that other factors, such as other Business Rules could impact the time it takes for this job to complete. Please do consider the volume of rules and also the complexity.

Long running jobs:

Verify if jobs are running for long time and actual data transaction is happening for very few records. This can happen when users have multiple time slice records which are matching to the filter conditions. To improve the performance and to reduce the execution time optimize the Offcycle event batch object configurations.

  • Dynamic user group: Business requirement is to process the Offcycle on specific user group make sure have proper dynamic user group accordingly. By having proper efficient DG group will can reduce the invalid user records (or user records which need to be in the process) reaching to the filter stage.
  • Include only Current record: If multiple time slice records getting selected  for a user on the filter stage, it means all those records belongs to different time period(past present and future) will be iterated through the rule engine to validate again rule configuration. which take lots of time to complete its tasks.   To stop iterating the rule on Past/ future dated user records use "Include only current Record" (Only if customer don't want to process any past dated and future dated records of the user ) and mark "Include only current record" option  as "Yes".  This will make sure only current effective dated record of the user will be filtered and only current effective records will reach to the rule stage for processing.   So in the rule engine step rule will check only on the valid records which customer wants to process rather than processing all past present and future dated records.     
  • Include all matched record in every run:  Utilize this filed efficiently and mark it according based on if customer really want to process all the records in every run or only newly matched record need to be processed for each run. 
  • Add inactive records: Mark this field "No" until unless customer wants to process the inactive user records for some specific use cases.
  • Business rules:  rule can be a major factor when total execution time is high for a specific job run. Please do consider the volume of rules and also the complexity of the rule configuration while configuration Offcycle event batch. In If condition try to have the most possible matching If condition first then least possible matching condition at last, by this we can reduce the rule iteration time on each user records.
  • BizXDailyRuleProcessing job schedule: try to have schedule job run on proper time slot when server load is less. To get good performance for job execution,  avoid scheduling all the job execution in that instance at same time until unless it is very much required to do so to support the business requirement. 
  • toFilter: Ensure that you define a "toFilter" to avoid records from being incorrectly excluded from the process. You can do this by adding a dummy filter for example on jobInfo.hireDate where the hireDate is greater than 3 minutes. This will ensure that all records are correctly evaluated after the other filters (such as Dynamic User Group, Include only Current Record, Include all matched records, etc)

See Also

  • 2719010 - Employee Central - Off Cycle Event Batch
  • 2257064 - Employee Central - Business Rule Execution Log

Keywords

BizxDailyRuleProcessingBatch, Bizx Daily Rule Processing Batch, OffCycle, Off Cycle Event Batch, scheduled job, automated rule execution, ECT-126309, FAQ , KBA , LOD-SF-EC-JOB-OFF , Off Cycle Event Batch , LOD-SF-EC-POS , Position Management , LOD-SF-EC-EDP-JOB , Job Information Imports , LOD-SF-EC-CMP-PSC , Pay Scales - Obj Structure, Increases & Grade Step , How To

Product

SAP SuccessFactors Employee Central all versions ; SAP SuccessFactors HCM suite all versions