@startuml
'https://plantuml.com/sequence-diagram


title KieSessionLocal Resource

autonumber 1
actor Input_provider
note over Input_provider: Any service requiring DRL evaluation (e.g. Kogito, KieServer)

Input_provider -> Runtime_Manager: execute (EfestoInputDrlKieSessionLocal)
Runtime_Manager --> KieRuntimeServiceDrlMapInput: canManageInput (EfestoInputDrlKieSessionLocal)
KieRuntimeServiceDrlMapInput --> Runtime_Manager: false
Runtime_Manager --> KieRuntimeServiceDrlKieSessionLocal: canManageInput (EfestoInputDrlKieSessionLocal)
KieRuntimeServiceDrlKieSessionLocal --> Runtime_Manager: true
Runtime_Manager --> KieRuntimeServiceDrlKieSessionLocal: evaluateInput (EfestoInputDrlKieSessionLocal)
KieRuntimeServiceDrlKieSessionLocal --> Runtime_Manager: Optional<EfestoOutputDrlKieSessionLocal>
Runtime_Manager -> Input_provider: Optional<EfestoOutputDrlKieSessionLocal>


newpage MapInput Resource

autonumber 1
note over Input_provider: Any service requiring DRL evaluation (e.g. Kogito, KieServer)

Input_provider -> Runtime_Manager: execute (EfestoInputDrlMap)
Runtime_Manager --> KieRuntimeServiceDrlKieSessionLocal: canManageInput (EfestoInputDrlMap)
KieRuntimeServiceDrlKieSessionLocal --> Runtime_Manager: false
Runtime_Manager --> KieRuntimeServiceDrlMapInput: canManageInput (EfestoInputDrlMap)
KieRuntimeServiceDrlMapInput --> Runtime_Manager: true
Runtime_Manager --> KieRuntimeServiceDrlMapInput: evaluateInput (EfestoInputDrlMap)
KieRuntimeServiceDrlMapInput --> Runtime_Manager: Optional<EfestoOutputDrlMap>
Runtime_Manager -> Input_provider: Optional<EfestoOutputDrlMap>

@enduml