}
public BulkTestRunResult runScenariosInPackage(ModuleItem packageItem) throws SerializationException {
if (!packageItem.isBinaryUpToDate() || !RuleBaseCache.getInstance().contains(packageItem.getUUID())) {
ClassLoaderBuilder classLoaderBuilder = new ClassLoaderBuilder(packageItem.listAssetsWithVersionsSpecifiedByDependenciesByFormat(AssetFormats.MODEL));
if (packageItem.isBinaryUpToDate()) {
RuleBaseCache.getInstance().put(packageItem.getUUID(),
loadRuleBase(packageItem,
classLoaderBuilder.buildClassLoader()));
} else {
BuilderResult result = repositoryModuleOperations.buildModule(packageItem,
false);
if (result == null || result.getLines().size() == 0) {
RuleBaseCache.getInstance().put(packageItem.getUUID(),
loadRuleBase(packageItem,
classLoaderBuilder.buildClassLoader()));
} else {
return new BulkTestRunResult(result,
null,
0,
null);