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

com.github.frtu.kotlin.transition.HandoffImpl.kt Maven / Gradle / Ivy

There is a newer version: 2.0.9
Show newest version
package com.github.frtu.kotlin.transition

import com.github.frtu.kotlin.action.execution.TypedAction
import com.github.frtu.kotlin.action.execution.transition.ActionTransitionImpl
import com.github.frtu.kotlin.action.management.ActionId
import com.github.frtu.kotlin.action.management.ActionMetadata

/**
 * Handoff input is a class that return an `ActionMetadata`
 */
open class HandoffImpl(
    parameterJsonSchema: String,
    nextAction: ACTION,
    id: ActionId = ActionId("handoff-to-${nextAction.id}"),
    description: String = "Transfer to '${nextAction.id}' if the user wants ${nextAction.description}",
) : TypedAction, Handoff, ActionTransitionImpl(
    parameterJsonSchema = parameterJsonSchema,
    nextAction = nextAction,
    id = id,
    description = description,
) {
    override suspend fun execute(parameter: INPUT): ACTION = nextAction
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy