Class ProcedureValidator

java.lang.Object
com.axelor.ai.procedure.ProcedureValidator

public class ProcedureValidator extends Object
Checks procedures against the application before they can reach a chat, so a broken one is refused where it is written — at import, and later when the builder saves a skill — rather than failing halfway through a run.

Views and fields are checked against the form's FormSpec, the one a run opens: the action-view resolves to a form of its model, and every step is one the spec accepts (FormSpec.check(com.axelor.meta.headless.FormStep)) — a set key the form has, a click on one of its buttons. Expressions must compile, and an input read without its inputs. prefix is refused unless a field of that name exists — it would otherwise read null without a word. Interactions name actions the procedure's own chains reach (or a clicked button's prompt), and an action-validate's own alert messages.

  • Constructor Details

    • ProcedureValidator

      public ProcedureValidator()
  • Method Details

    • validate

      public void validate(List<Procedure> procedures)
      Throws:
      ProcedureException - naming every problem found, when there is one
    • problems

      public List<String> problems(Procedure procedure)
      The problems of one procedure, each naming the procedure and, where it applies, the step.
    • problems

      public List<String> problems(Procedure procedure, FormSpec spec)
      The problems of one procedure whose form's spec the caller has built already, or null to build it here.