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

com.github.lemfi.kest.cadence.cli.functions.kt Maven / Gradle / Ivy

package com.github.lemfi.kest.cadence.cli

import com.github.lemfi.kest.cadence.builder.ActivityCallExecutionBuilder
import com.github.lemfi.kest.cadence.builder.WorkflowExecutionBuilder
import com.github.lemfi.kest.core.builder.ScenarioBuilder
import com.github.lemfi.kest.core.model.RetryStep
import com.github.lemfi.kest.core.model.Step

inline fun  ScenarioBuilder.`given activity call`(retryStep: RetryStep? = null, crossinline h: ActivityCallExecutionBuilder.()->Unit): Step {
    return Step({ ActivityCallExecutionBuilder(R::class.java).apply(h).build() }, retry = retryStep).apply {
        steps.add(this)
    }
}

inline fun  ScenarioBuilder.`given workflow`(retryStep: RetryStep? = null, crossinline h: WorkflowExecutionBuilder.()->Unit): Step {
    return Step({WorkflowExecutionBuilder().apply(h).build()}, retry = retryStep).apply {
        steps.add(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy