Package su.onno.process
Interface ProcessEngine
- All Known Implementing Classes:
JdbcProcessEngine
public interface ProcessEngine
Transactional durable runtime for typed
process definitions.-
Method Summary
Modifier and TypeMethodDescriptioncancel(UUID instanceId, String reason, ProcessActor actor) Cancel an active process and all of its live tasks, timers, branches, and subprocesses.claim(UUID workItemId, ProcessActor actor) complete(UUID workItemId, String outcome, ProcessActor actor) Dynamic/transport boundary used when an enum constant arrives as JSON text.default <O extends Enum<O>>
ProcessSnapshotcomplete(UUID workItemId, O outcome, ProcessActor actor) Complete from typed Java; the enum constant is validated again against the active task.delegate(UUID workItemId, ProcessIdentity target, String reason, ProcessActor actor) Transfer a claimed task to another stable authenticated identity.inbox(ProcessActor actor) instances(ProcessActor actor) Process instances visible to an actor through start, participation, or administration.migrate(UUID instanceId, ProcessActor actor) Apply the registered definition-migration chain to the latest definition version.intrunPending(int limit) Advance due timers and completed/cancelled subprocess waits.<P,S extends Enum<S> & ProcessStepKey>
ProcessSnapshotstart(ProcessDefinition<P, S> definition, P payload, ProcessActor actor) Active and historical execution tokens for an inspectable process timeline.workItemHistory(UUID workItemId, ProcessActor actor) Authorized, chronological audit history for one human task.
-
Method Details
-
start
<P,S extends Enum<S> & ProcessStepKey> ProcessSnapshot start(ProcessDefinition<P, S> definition, P payload, ProcessActor actor) -
find
-
instances
Process instances visible to an actor through start, participation, or administration. -
history
-
tokens
Active and historical execution tokens for an inspectable process timeline. -
inbox
-
claim
-
delegate
ProcessWorkItem delegate(UUID workItemId, ProcessIdentity target, String reason, ProcessActor actor) Transfer a claimed task to another stable authenticated identity.The current assignee (or an administrator) may delegate. The reason is required and the transfer is recorded in
workItemHistory(java.util.UUID, su.onno.process.ProcessActor). -
workItemHistory
Authorized, chronological audit history for one human task. -
complete
default <O extends Enum<O>> ProcessSnapshot complete(UUID workItemId, O outcome, ProcessActor actor) Complete from typed Java; the enum constant is validated again against the active task. -
complete
Dynamic/transport boundary used when an enum constant arrives as JSON text. -
cancel
Cancel an active process and all of its live tasks, timers, branches, and subprocesses. -
migrate
Apply the registered definition-migration chain to the latest definition version. -
runPending
int runPending(int limit) Advance due timers and completed/cancelled subprocess waits.The starter invokes this from its durable background-job scheduler. Calling it from application code is safe; row locks and token state make duplicate polls no-ops.
-