Class ProcessGraph<P,S extends Enum<S> & ProcessStepKey>

java.lang.Object
su.onno.process.ProcessGraph<P,S>

public final class ProcessGraph<P,S extends Enum<S> & ProcessStepKey> extends Object
Typed business-process route graph.

Application code connects node handles rather than string names. The graph becomes immutable after definition validation.

  • Constructor Details

    • ProcessGraph

      public ProcessGraph()
  • Method Details

    • start

      public StartNode<P,S> start()
    • human

      public <O extends Enum<O>> HumanTaskNode<P,S,O> human(S step, HumanTask<P,O> task)
      Add a typed human-task node.
    • automatic

      public AutomaticNode<P,S> automatic(S step, AutomaticStep<P> action)
      Add an immediate application-code step with one continuation.
    • decision

      public <O extends Enum<O>> DecisionNode<P,S,O> decision(S step, TypedDecision<P,O> decision)
      Add an immediate, exhaustive typed decision.
    • timer

      public TimerNode<P,S> timer(S step, ProcessTimer<P> timer)
      Add a durable timer wait with one continuation.
    • parallel

      public <B extends Enum<B>> ParallelForkNode<P,S,B> parallel(S forkStep, Class<B> branchType, S joinStep)
      Add a typed parallel fork and its paired join.

      Declare every branch with ParallelForkNode.on(Enum) and connect the continuation through fork.join().to(next).

    • subprocess

      public <C, CS extends Enum<CS> & ProcessStepKey> SubprocessNode<P,S,C,CS> subprocess(S step, SubprocessCall<P,C,CS> call)
      Add a durable typed child-process call.
    • end

      public EndNode<P,S> end(S step)
      Add a terminal node. A graph may have multiple meaningful endings.
    • node

      public ProcessNode<P,S> node(S step)
      Resolve a node by its typed step key.
    • nodeByKey

      public ProcessNode<P,S> nodeByKey(String key)
      Resolve a node by its stable persisted step key.
    • nodes

      public List<ProcessNode<P,S>> nodes()
      Declared route nodes in definition order, excluding the synthetic start.
    • stepType

      public Class<S> stepType()
      Enum class that owns this graph's typed step keys.
    • descriptor

      public ProcessGraphDescriptor descriptor()
      Immutable, serialization-friendly structural description of this validated graph.