Class WorkflowCompiler

java.lang.Object
com.axelor.workflow.compiler.WorkflowCompiler

public final class WorkflowCompiler extends Object
Compiles a parsed Workflow into an immutable WorkflowPlan: the structural gate the runtime relies on (one start, unique ids, every edge resolving, joins paired with their splits). Problems are collected, never thrown, so the validator and Studio get the full list; runtime callers use Compilation.planOrThrow(String). Semantic rules belong to WorkflowValidator.
  • Method Details

    • compile

      public static Compilation compile(Workflow workflow)
    • compileBody

      public static Compilation compileBody(Workflow body, String nodeId)
      Compile a <subflow>'s body with the same compiler; its node ids are scoped to itself, and its plan is identified by the node it hangs from.
    • requireNext

      public static boolean requireNext(String nodeId, String next, List<Violation> sink)
      Collect a node-next-required violation when next is blank; returns whether it is present.
    • compileBoundaries

      public static List<WorkflowPlan.Boundary> compileBoundaries(String nodeId, List<BoundaryNode> boundaries, List<Violation> sink)
      Compile one node's boundaries in declaration order, the order they are tried. Whether a trigger suits the host is WorkflowValidator's.