Skip to content

Commit

Permalink
[incubator-kie-drools-6160] Clean up leftover of .rf support
Browse files Browse the repository at this point in the history
  • Loading branch information
tkobayas committed Dec 6, 2024
1 parent 924e88a commit ae5505f
Show file tree
Hide file tree
Showing 13 changed files with 4 additions and 374 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public static ProcessPackage getOrCreate(ResourceTypePackageRegistry rtps) {
rtp = new ProcessPackage();
// register the same instance for all types. There is no distinction
rtps.put(ResourceType.BPMN2, rtp);
rtps.put(ResourceType.DRF, rtp);
rtps.put(ResourceType.CMMN, rtp);
}
return rtp;
Expand All @@ -55,7 +54,7 @@ public Map<String, Process> getRuleFlows() {

/**
* The ResourceType for {@link ProcessPackage} is always BPMN2,
* but there is no distinction between DRF, and CMMN as they all live under
* but there is no distinction between CMMN as they all live under
* the same package.
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ private void buildProcesses() {

private void buildResources() {
buildResourceType(ResourceBuilder.DSL_RESOURCE_BUILDER, ResourceType.DSL);
buildResourceType(ResourceBuilder.DRF_RESOURCE_BUILDER, ResourceType.DRF);
buildResourceType(ResourceBuilder.XSD_RESOURCE_BUILDER, ResourceType.XSD);
}

Expand Down Expand Up @@ -277,8 +276,6 @@ private interface ResourceBuilder {
ResourceBuilder BPMN2_RESOURCE_BUILDER = ( kBuilder, resourceDescr ) -> kBuilder.addKnowledgeResource( resourceDescr.resource, ResourceType.BPMN2, resourceDescr.configuration );

ResourceBuilder CMMN_RESOURCE_BUILDER = ( kBuilder, resourceDescr ) -> kBuilder.addKnowledgeResource( resourceDescr.resource, ResourceType.CMMN, resourceDescr.configuration );

ResourceBuilder DRF_RESOURCE_BUILDER = ( kBuilder, resourceDescr ) -> kBuilder.addKnowledgeResource( resourceDescr.resource, ResourceType.DRF, resourceDescr.configuration );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -340,16 +340,6 @@ public void addDsl(Resource resource) throws IOException {
}
}

/**
* Add a ruleflow (.rfm) asset to this package.
*/
public void addRuleFlow(Reader processSource) {
addKnowledgeResource(
new ReaderResource(processSource, ResourceType.DRF),
ResourceType.DRF,
null);
}

@Deprecated
public void addProcessFromXml(Resource resource) {
addKnowledgeResource(
Expand All @@ -362,11 +352,6 @@ public ProcessBuilder getProcessBuilder() {
return processBuilder;
}

@Deprecated
public void addProcessFromXml( Reader processSource) {
addProcessFromXml(new ReaderResource(processSource, ResourceType.DRF));
}

public void addKnowledgeResource(Resource resource,
ResourceType type,
ResourceConfiguration configuration) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ private List<Process> findProcesses(InternalKieModule kieModule, KieBaseModelImp
List<Resource> processResources = kieModule.getFileNames().stream()
.filter(fileName -> {
ResourceType resourceType = determineResourceType(fileName);
return resourceType == ResourceType.DRF || resourceType == ResourceType.BPMN2;
return resourceType == ResourceType.BPMN2;
})
.map(fileName -> {
final Resource processResource = kieModule.getResource(fileName);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ private void checkKModule(KieBaseTestConfiguration kieBaseTestConfiguration , fi
public void testAddMissingResourceToPackageBuilder(KieBaseTestConfiguration kieBaseTestConfiguration) throws Exception {
final KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

assertThatThrownBy(() -> kbuilder.add(ResourceFactory.newClassPathResource("some.rf"), ResourceType.DRL))
assertThatThrownBy(() -> kbuilder.add(ResourceFactory.newClassPathResource("some.drl"), ResourceType.DRL))
.isInstanceOf(RuntimeException.class);

assertThatThrownBy(() -> kbuilder.add(ResourceFactory.newClassPathResource("some.bpmn"), ResourceType.BPMN2))
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import static org.assertj.core.api.Assertions.assertThat;

/**
* Tests loading of different types of resources (DRL, DSL, DRF, BPMN2, DTABLE).
* Tests loading of different types of resources (DRL, DSL, BPMN2, DTABLE).
* Packages are loaded and built using KnowledgeBuilder.
*/
public class ResourcesTest {
Expand Down
Loading

0 comments on commit ae5505f

Please sign in to comment.