You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
541 B
Kotlin
17 lines
541 B
Kotlin
package wf.servitor.engine.dispatcher
|
|
|
|
import org.apache.commons.jexl3.JexlContext
|
|
import org.apache.commons.jexl3.MapContext
|
|
import wf.servitor.common.workflow.Workflow
|
|
|
|
|
|
class NamespaceAwareMapContext(
|
|
private val workflow: Workflow,
|
|
map: Map<String, Any?>,
|
|
private val dispatchedValues: MutableList<Any?>
|
|
) : MapContext(map), JexlContext.NamespaceResolver {
|
|
override fun resolveNamespace(name: String): Any? {
|
|
workflow.services.get(name) ?: return null
|
|
return NamespaceFaker(name, dispatchedValues)
|
|
}
|
|
} |