Package su.onno.process
Class ProcessDefinition<P,S extends Enum<S> & ProcessStepKey>
java.lang.Object
su.onno.process.ProcessDefinition<P,S>
- Type Parameters:
P- process payload typeS- enum containing this process's stable step keys
Typed definition of one business-process route.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProcessDefinition(String key, int version, Class<P> payloadType) protectedProcessDefinition(String key, Class<P> payloadType) -
Method Summary
Modifier and TypeMethodDescriptioncancellationAssignment(P payload) Users/roles allowed to cancel an active instance.protected abstract voiddefine(ProcessGraph<P, S> graph) Declare tasks, endings, and typed transitions.final StringDeterministic SHA-256 identity of this version's payload type and route structure.final ProcessGraph<P, S> graph()Validated immutable graph for this definition.final Stringkey()Stable persisted definition identity.Payload type used by the durable runtime's JSON codec.abstract TaskAssignmentstartAssignment(P payload) Candidate users/roles allowed to start this process through a generic user-facing boundary.title()Human-facing process title.final intversion()Persisted definition version used to resume and migrate durable instances safely.
-
Constructor Details
-
ProcessDefinition
-
ProcessDefinition
-
-
Method Details
-
key
Stable persisted definition identity. Never derived from a display title or class name. -
version
public final int version()Persisted definition version used to resume and migrate durable instances safely. -
payloadType
Payload type used by the durable runtime's JSON codec. -
fingerprint
Deterministic SHA-256 identity of this version's payload type and route structure.A durable runtime persists this value and rejects a same-key, same-version definition whose graph later changes. Bump
version()and provide a migration instead. -
title
Human-facing process title. -
startAssignment
Candidate users/roles allowed to start this process through a generic user-facing boundary. Ordinary trusted Java services may still callProcessEngine.start(su.onno.process.ProcessDefinition<P, S>, P, su.onno.process.ProcessActor)directly. -
cancellationAssignment
Users/roles allowed to cancel an active instance.By default the same audience that can start the process may cancel it. Definitions may narrow or broaden that audience independently.
-
define
Declare tasks, endings, and typed transitions. Called once on first graph access. -
graph
Validated immutable graph for this definition.
-