Skip to content

Commit

Permalink
Merge pull request #93 from rgdoliveira/sync_main
Browse files Browse the repository at this point in the history
Sync main branch with Apache main branch
  • Loading branch information
rgdoliveira authored Dec 17, 2024
2 parents b123a45 + 9c2d570 commit 60557e0
Show file tree
Hide file tree
Showing 83 changed files with 1,956 additions and 2,456 deletions.
8 changes: 0 additions & 8 deletions .rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,16 @@
.rat-excludes
# DISCLAIMER-WIP
DISCLAIMER-WIP
# drools-decisiontables/src/main/java/org/drools/decisiontable/parser/csv/CsvLineParser.java
CsvLineParser.java
# drools-decisiontables/src/test/resources/data/ComplexWorkbook.drl.csv
ComplexWorkbook.drl.csv
# drools-decisiontables/src/test/resources/data/TestCsv.drl.csv
TestCsv.drl.csv
# drools-decisiontables/src/test/resources/org/drools/decisiontable/DeclaresWorkbook.drl.csv
DeclaresWorkbook.drl.csv
# drools-decisiontables/src/test/resources/org/drools/decisiontable/changeSetTestCSV.drl.csv
changeSetTestCSV.drl.csv
# drools-decisiontables/src/test/resources/org/drools/decisiontable/changeSetTestCSV2.drl.csv
changeSetTestCSV2.drl.csv
# drools-decisiontables/src/test/resources/org/drools/decisiontable/columnReplaceTest.drl.csv
columnReplaceTest.drl.csv
# drools-decisiontables/src/test/resources/org/drools/decisiontable/emptyAction.drl.csv
emptyAction.drl.csv
# drools-decisiontables/src/test/resources/org/drools/decisiontable/scannerChangeSetTestCSV.drl.csv
scannerChangeSetTestCSV.drl.csv
# drools-decisiontables/src/test/resources/org/drools/decisiontable/unicode.drl.csv
unicode.drl.csv
# drools-decisiontables/src/test/resources/org/drools/decisiontable/integrationtests/csv/kmoduleCSVTest.dtable.drl.csv
Expand Down
396 changes: 384 additions & 12 deletions LICENSE

Large diffs are not rendered by default.

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 @@ -187,7 +187,7 @@ public void testCreateClique() {
jtBuilder.createClique(dX1.getId(), clonedAdjMatrix, vertices, adjList );

assertThat(vertices).hasSize(3);
assertThat(vertices).containsExactly(2, 3, 4);
assertThat(vertices).containsExactlyInAnyOrder(2, 3, 4);

assertLinkedNode(jtBuilder, 1, 2, 3, 4);
assertLinkedNode(jtBuilder, 2, 1, 3, 4);
Expand Down Expand Up @@ -477,7 +477,7 @@ public void testIterativeEliminationUsingEdgeAndWeight() {
adjList = clonedAdjMatrix[ id ];
jtBuilder.createClique(4, clonedAdjMatrix, verticesToUpdate, adjList);
assertThat(verticesToUpdate).hasSize(3);
assertThat(verticesToUpdate).containsExactly(1, 2, 6); // don't forget 3 and 5 were already eliminated
assertThat(verticesToUpdate).containsExactlyInAnyOrder(1, 2, 6); // don't forget 3 and 5 were already eliminated
jtBuilder.eliminateVertex(p, elmVertMap, clonedAdjMatrix, adjList, verticesToUpdate, v );

// assert all new edges
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 @@ -55,6 +55,10 @@ public static String getFunctionName(Supplier<Class<?>> exprClassSupplier, Strin
functionName = "maxI";
} else if (exprClass == Long.class) {
functionName = "maxL";
} else if (exprClass == BigInteger.class) {
functionName = "maxBI";
} else if (exprClass == BigDecimal.class) {
functionName = "maxBD";
} else if (Number.class.isAssignableFrom( exprClass )) {
functionName = "maxN";
}
Expand All @@ -64,6 +68,10 @@ public static String getFunctionName(Supplier<Class<?>> exprClassSupplier, Strin
functionName = "minI";
} else if (exprClass == Long.class) {
functionName = "minL";
} else if (exprClass == BigInteger.class) {
functionName = "minBI";
} else if (exprClass == BigDecimal.class) {
functionName = "minBD";
} else if (Number.class.isAssignableFrom( exprClass )) {
functionName = "minN";
}
Expand Down
Loading

0 comments on commit 60557e0

Please sign in to comment.