CleanupPolicy

sealed class CleanupPolicy

Per-flow cleanup behavior applied when a flow is left open.

If the flow is explicitly finished or aborted before conditions defined by the policy are met, the policy has no effect.

Each policy carries a target flowStatus - the flow is auto-finished with that status and sent.

Inheritors

Types

Link copied to clipboard
data class OnProcessStart(val ignoreIfIntervalTimeoutPresent: Boolean, val flowStatus: FlowStatus = FlowStatus.Unknown) : CleanupPolicy

Apply cleanup on the next (main) process start for any still-open flow.

Link copied to clipboard
data class OnTimeout(val duration: Duration, val flowStatus: FlowStatus = FlowStatus.Unknown) : CleanupPolicy

Apply cleanup if a flow stays open beyond a specified time.

Properties

Link copied to clipboard
abstract val flowStatus: FlowStatus

The status to use when this policy triggers.