Autocomplete Errors
These are the common errors that you may encounter while implementing autocomplete rules.
Issue |
Resolution |
---|---|
Rule doesn't trigger |
Test the event with a simple rule to confirm whether the issue is with the triggering event or with the logic contained therein. This will help identify whether the invalid starting point is the business object or the rule type, before getting into the actual rule logic. |
Rule triggers multiple times |
If the same error message is shown multiple times, you may be working with the Assignment object where you haven't added the IF WorkTermsAssignmentId NOT NULL condition. Alternatively, you may be working on an action where multiple records of the same object are saved, for example Convert Pending Worker or Change Salary. In the latter case, you need to add the necessary additional condition for your rule to apply to only the record you're interested in. |
Rule triggers too early |
If the rule triggers too early, you're using an object that's shared across multiple sections and hence gets saved (and validated) at the end of each section. For example, Person Legislative Info, or Termination Info sections in the respective flows. You can do one of these things:
|
Rule triggers too late |
The nature of the given object is such that it simply doesn't support validation rule immediately on exit of a section, as it's expected to be validated only during Submit. Work Measure and Salary are examples of such objects. Most objects are validated on Submit. |
Works for some actions but not others |
There are a number of exceptions where a rule only supports certain actions or fields. Refer to the known exceptions and adaptations for all business objects. If your condition falls under the category of known exceptions, this may not be supported as yet. If your condition falls under the category of known adaptations, then follow the instructions listed therein to implement the fix. |
Error in Expression...Line# |
These are the possible causes:
The line number cited in the error message refers to the line number of the groovy code that's generated by Autocomplete Rules and not the rule line. These are the resolutions.
|
Error in Logic |
There can also be an issue with the logic. You need to know the functional relationship between major objects and key attributes. You can build the rule incrementally, code elements, and gradually increase complexity by introducing variables to understand where you're going wrong. |