@Experimental public final class UpdatePmState<I,P extends ProcessManager<I,S,B>,S extends io.spine.base.EntityState<I>,B extends io.spine.validate.ValidatingBuilder<S>> extends ProcessManagerMigration<I,P,S,B>
ProcessManager
state according
to the logic defined in onBeforeCommit()
method, if it is defined.
onBeforeCommit()
is designed to contain common logic on setting
the calculated state fields. In a normal operational mode, it is executed after a process manager
handles some signal and before the respective transaction is committed.
If this calculation logic is changed in the code, end-users may need to update the calculated
state of many process managers at once. This migration operation is a straightforward way
to invoke the onBeforeCommit()
method within a separate transaction and save the changes
made by it to the states of process managers.
Constructor and Description |
---|
UpdatePmState() |
Modifier and Type | Method and Description |
---|---|
S |
apply(S s) |
startTransaction
id, isArchived, isDeleted, markArchived, markDeleted, removeFromStorage, version