Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Technically, a Prompt Before Validation rule is a class implementing org.kuali.ricekfs.kns.rule.PromptBeforeValidation, which specifies a single method: boolean processPrompts(ActionForm form, HttpServletRequest request, PromptBeforeValidationEvent event)).

...

org.kuali.kfs.coa.document.validation.impl.ObjectCodePreRules is a good example of how it works. Prompt Before Validation classes extend org.kuali.ricekfs.kns.rules.PromptBeforeValidationBase, or (far more rarely!) implement org.kuali.ricekfs.kns.rules.PromptBeforeValidation directly. If PromptBeforeValidationBase.java is extended, the only method that needs to be overridden is doPrompts() which takes in a document and returns true if the check completed successfully. If this method returns false, the current action will be halted and control determined by the state of the PromptBeforeValidationEvent object. (See the PromptBeforeValidationEventdocumentation below for more details.) Otherwise, the requested action continues.

...