void addPackageForExternalType(Resource resource,
ResourceType type,
ResourceConfiguration configuration) throws Exception {
KieAssemblers assemblers = ServiceRegistryImpl.getInstance().get(KieAssemblers.class);
KieAssemblerService assembler = assemblers.getAssemblers().get(type);
if (assembler != null) {
assembler.addResource(this,
resource,
type,
configuration);
} else {
throw new RuntimeException("Unknown resource type: " + type);