Symptom
Error when using business rules with the Get Next Value() fucnction.
Environment
Successfactors - Employee Central Business Rules.
Reproducing the Issue
- Create a business rule to generate position code using the Get Next Value() function as mentioned in the KBA 2352610 - Position Management: Automatic Generation of Position Code
- In the business rule, the Get Next Value function uses a sequence object to fetch its next value.
- On creating a position, an error is thrown as below:
Call function 'getNextValue' with parameters [com.successfactors.ruleengine.gorule.bean.model.Sequence@7ca22306]. Result: 'null'. Duration: 21 milliseconds. [Error] [Error: getNextValue( toTypeInstance( "go_mdf", "Sequence", "PG-FO-SubSectionExtCode" ) ): [key=Exception thrown in rules execution, values=[com.successfactors.ruleengine.ruletrace.RuleTraceException: Trace already opened.]]]
- This can also be present in the rule execution log.
NOTE: The issue can arise where ever there is a business rule assigned which is using the Get Next Value() function.
Cause
- This can happen if there is an onSave rule in the 'Sequence' object.
- The engineering team has fixed this bug the 1802 release.
Resolution
- In b1802, engineering team introduced a new provisioning opt-in for a new implementation of the rule function getNextValue().
- Please enable the provisioning flag "Enable the new implementation of the 'getNextValue' function for Rule Engine". If you do not have access to provisioning, please open a support case under the component LOD-SF-EC-RUL with your permission to enable the same.
- For b1802, this new provisioning flag was introduced for certain customers who faced data center performance issue due to which this was not included in the release notes.
- From b1805 release, the new behavior will be universal for all customers and the provisioning flag will be removed.
Keywords
Call function 'getNextValue' with parameters [com.successfactors.ruleengine.gorule.bean.model.Sequence@7ca22306]. Result: 'null'. Duration: 21 milliseconds. [Error] [Error: getNextValue( toTypeInstance( "go_mdf", "Sequence", "PG-FO-SubSectionExtCode" ) ): [key=Exception thrown in rules execution, values=[com.successfactors.ruleengine.ruletrace.RuleTraceException: Trace already opened.]]] getNextValue Sequence toTypeInstance Get Next Value Business Rule Enable the new implementation of the 'getNextValue' function for Rule Engine , KBA , LOD-SF-EC-JOB-RUL , Job Info Business Rules , LOD-SF-EC-HIR-RUL , Business Rules , Problem