Package su.onno.process
Class JdbcProcessEngine
java.lang.Object
su.onno.process.JdbcProcessEngine
- All Implemented Interfaces:
ProcessEngine
Core JDBI runtime for durable, versioned typed process definitions.
Execution tokens, rather than onno_process_instances._current_step, are authoritative.
The scalar current step is retained as a compatibility projection for sequential consumers.
-
Constructor Summary
ConstructorsConstructorDescriptionJdbcProcessEngine(org.jdbi.v3.core.Jdbi jdbi, ProcessDefinitions definitions, MetadataRegistry registry, ProcessPayloadCodec payloadCodec, ProcessEventPublisher events) -
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 outcomeName, ProcessActor actor) Dynamic/transport boundary used when an enum constant arrives as JSON text.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface su.onno.process.ProcessEngine
complete
-
Constructor Details
-
JdbcProcessEngine
public JdbcProcessEngine(org.jdbi.v3.core.Jdbi jdbi, ProcessDefinitions definitions, MetadataRegistry registry, ProcessPayloadCodec payloadCodec, ProcessEventPublisher events)
-
-
Method Details
-
start
public <P,S extends Enum<S> & ProcessStepKey> ProcessSnapshot start(ProcessDefinition<P, S> definition, P payload, ProcessActor actor) - Specified by:
startin interfaceProcessEngine
-
find
- Specified by:
findin interfaceProcessEngine
-
instances
Description copied from interface:ProcessEngineProcess instances visible to an actor through start, participation, or administration.- Specified by:
instancesin interfaceProcessEngine
-
history
- Specified by:
historyin interfaceProcessEngine
-
tokens
Description copied from interface:ProcessEngineActive and historical execution tokens for an inspectable process timeline.- Specified by:
tokensin interfaceProcessEngine
-
inbox
- Specified by:
inboxin interfaceProcessEngine
-
claim
- Specified by:
claimin interfaceProcessEngine
-
delegate
public ProcessWorkItem delegate(UUID workItemId, ProcessIdentity target, String reason, ProcessActor actor) Description copied from interface:ProcessEngineTransfer 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
ProcessEngine.workItemHistory(java.util.UUID, su.onno.process.ProcessActor).- Specified by:
delegatein interfaceProcessEngine
-
workItemHistory
Description copied from interface:ProcessEngineAuthorized, chronological audit history for one human task.- Specified by:
workItemHistoryin interfaceProcessEngine
-
complete
Description copied from interface:ProcessEngineDynamic/transport boundary used when an enum constant arrives as JSON text.- Specified by:
completein interfaceProcessEngine
-
cancel
Description copied from interface:ProcessEngineCancel an active process and all of its live tasks, timers, branches, and subprocesses.- Specified by:
cancelin interfaceProcessEngine
-
migrate
Description copied from interface:ProcessEngineApply the registered definition-migration chain to the latest definition version.- Specified by:
migratein interfaceProcessEngine
-
runPending
public int runPending(int limit) Description copied from interface:ProcessEngineAdvance 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.
- Specified by:
runPendingin interfaceProcessEngine
-