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

package "Compile_time" {
  [Resource_provider] -> [Compilation_Manager]
  note bottom of [Resource_provider]
    Any service requiring codegen/class compilation
     (e.g. Kie Maven Plugin, Kogito, KieLoaderService)
  end note
}


package "Runtime" {
  [Execution_provider] -> [Runtime_Manager]
    note bottom of [Execution_provider]
      Any service requiring compiled class for execution
    end note
}

[Compilation_Manager]
[Runtime_Manager]
[Filesystem]

node "Model-specific plugin" {
  [Compilation_Manager] -->  [KieCompilerService]
  [Runtime_Manager] --> [KieLoaderService]
  [KieLoaderService] ..> [Compilation_Manager]: on-the-fly codegen/compilation
  [KieLoaderService] ..> [Filesystem]: load from jar
  note bottom of [KieCompilerService]
        Actual codegen/class compilation.
        May return compiled class(es) or intermediate resource
  end note
}



@enduml