All Downloads are FREE. Search and download functionalities are using the official Maven repository.

s2.spring.automate.executor.S2AutomateStoringExecutor.kt Maven / Gradle / Ivy

The newest version!
package s2.spring.automate.executor

import kotlinx.coroutines.flow.Flow
import s2.dsl.automate.Evt
import s2.dsl.automate.S2Command
import s2.dsl.automate.S2InitCommand
import s2.dsl.automate.S2State
import s2.dsl.automate.model.WithS2State

interface S2AutomateStoringExecutor, EVENT: Evt> {

	suspend fun  createWithEvent(
		command: S2InitCommand,
		buildEvent: suspend ENTITY.() -> EVENT_OUT,
		buildEntity: suspend () -> ENTITY,
	): EVENT_OUT

	suspend fun  createWithEvent(
		command: S2InitCommand, build: suspend () -> Pair
	): EVENT_OUT

	@Deprecated("Use doTransition with S2Command")
	suspend fun  doTransition(
		id: ID, command: S2Command,
		exec: suspend ENTITY.() -> Pair
	): EVENT_OUT

	suspend fun  doTransition(
		command: S2Command, exec: suspend ENTITY.() -> Pair
	): EVENT_OUT

	suspend fun  createWithEventFlow(
		command: Flow,
		build: suspend (cmd: COMMAND) -> Pair
	): Flow

	suspend fun , EVENT_OUT: EVENT> doTransitionFlow(
		command: Flow,
		exec: suspend (COMMAND, ENTITY) -> Pair
	): Flow

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy