SAP Knowledge Base Article - Public

2639401 - Error: unexpected token in contstructor during execution of Business Rules


  •  Customer created a cross portlet Business Rule but it is not getting triggered.
  •  When creating a new rule trace to confirm the cause, you will receive a similar message to: 

[Error: unexpected token in contstructor], [Near ....]


[Error: failed to access property: ] [ Error: illegal use of []: unknown type...]

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.


SAP SuccessFactors Employee Central

Reproducing the Issue

  1.  Create a Business Rule for any portlet, for instance:

  2. If you test the rule in the compensation portlet, it will not execute
  3. Go to Admin Center and search for "Business Rule Execution Log"
  4. Select Create New -> And populate the required information, including the rule name. For more details about this tool, check the references section
  5. In other tab, try to perform the changes that should trigger the rule
  6. Return to the Business Rule Execution Log and download the result, you will get an excel file and if you check the logs, there are some errors in the execution


The rule configuration is incorrect.


  • The Rule trace file will provide details of where the rule is failing. For example:

    [Error: failed to access property: employmentInfo.compInfo[0].is_20eligible_20for_20car: [Error: illegal use of []: unknown type: com.successfactors.hris.bean.eo.EmpCompInfoEO], ]

  • From that error it can be determined the issue is when the system is trying to access the path employmentInfo.compInfo[0].is_20eligible_20for_20car. By checking the example attached to this document, in the SET statement, "Compensation Information.Employment Details.Compensation Information.Is Eligible For Car" was selected:


  • This configuration is not correct. If the Base Object of the rule is "Compensation Information" and a value in a field under that section is needed, it is not necessayr to search the field in the Employment Details section. Instead use:


  • Note: Employment Details is used when accessing a field that belongs to other section (Cross Portlet Rules). If the object of the rule is Compensation, but access to fields related to Job Information is needed, then use Employment Details:



EC, Business Rules, Execution Log, SF, Success Factors, unexpected token in constructor, failed to access property, Error: illegal use of , KBA , LOD-SF-EC-CMP-RUL , Business Rules , LOD-SF-EC-CMP-REC , Recurring Payments , How To


SAP SuccessFactors Employee Central all versions