Skip to content

Instantly share code, notes, and snippets.

@tkobayas
tkobayas / possible-PR-to-drools-website.diff
Created June 14, 2022 06:29
possible-PR-to-drools-website
diff --git a/templates/_content_learn_documentation.ftl b/templates/_content_learn_documentation.ftl
index 5d26b07..8b140c7 100644
--- a/templates/_content_learn_documentation.ftl
+++ b/templates/_content_learn_documentation.ftl
@@ -15,6 +15,10 @@
<p><strong>Documentation for Drools ${pom.latestFinal.version}</strong></p>
<div class="ulist">
<ul>
+ <li>
+ <p><span class="image"><img src="documentation.png" alt="Documentation"></span>
[INFO] Running org.kie.karaf.itest.blueprint.KieBlueprintProcessDependencyKarafIntegrationTest
16:34:22.902 [main] INFO o.k.k.i.AbstractKarafIntegrationTest.<clinit>:131 - KIE Project Version : 7.56.0-SNAPSHOT
16:34:22.927 [main] INFO o.k.k.i.AbstractKarafIntegrationTest.getKarafDistributionOption:179 - *** The karaf version is 4.2.3 ***
16:34:22.927 [main] INFO o.k.k.i.AbstractKarafIntegrationTest.getKarafDistributionOption:180 - *** The cxf version is 3.2.14 ***
16:34:22.927 [main] INFO o.k.k.i.AbstractKarafIntegrationTest.getKarafDistributionOption:181 - *** The camel version is 2.21.5 ***
16:34:22.943 [main] INFO o.k.k.i.AbstractKarafIntegrationTest.getFeaturesUrl:294 - Features URL: mvn:org.kie/kie-karaf-features/7.56.0-SNAPSHOT/xml/features
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.felix.framework.ext.ClassPathExtenderFactory$DefaultClassLoaderExtender (file:/home/tkobayas/usr/work/BXMSPROD-1372/droolsjbpm-integration/kie-osgi/kie-
@tkobayas
tkobayas / MvelConstraint.java
Created March 12, 2021 01:22
fully synchronized MVELConditionEvaluator
protected boolean evaluate(InternalFactHandle handle, InternalWorkingMemory workingMemory, Tuple tuple) {
if (!jitted) {
int jittingThreshold = TEST_JITTING ? 0 : workingMemory.getKnowledgeBase().getConfiguration().getJittingThreshold();
if (conditionEvaluator == null) {
if (jittingThreshold == 0 && !isDynamic) { // Only for test purposes or when jitting is enforced at first evaluation
synchronized (this) {
if (conditionEvaluator == null) {
conditionEvaluator = forceJitEvaluator(handle, workingMemory, tuple);
}
}
package org.drools.ancompiler;
public class Compiledorg_drools_ancompiler_PersonNetwork312265489211RangeWIP4 extends org.drools.ancompiler.CompiledNetwork {
private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(Compiledorg_drools_ancompiler_PersonNetwork312265489211RangeWIP4.class);
org.drools.core.spi.InternalReadAccessor readAccessor;
private org.drools.core.util.index.AlphaRangeIndex rangeIndex4_0; // including [AlphaNode(4) constraint=age >= 18] etc.
private org.drools.core.reteoo.AlphaTerminalNode alphaTerminalNode8; // [AlphaTerminalNode(8)]
private org.drools.core.reteoo.AlphaTerminalNode alphaTerminalNode11; // [AlphaTerminalNode(11)]
private org.drools.core.reteoo.AlphaTerminalNode alphaTerminalNode5; // [AlphaTerminalNode(5)]
@Test
public void testAccumulateLambdaToString() {
SecurityManager origSecurityManager = System.getSecurityManager();
try {
System.setSecurityManager(new SecurityManager() {
@Override
public void checkPermission(Permission perm) {
if (perm instanceof RuntimePermission && "accessDeclaredMembers".equals(perm.getName())) {
for (StackTraceElement elem : Thread.currentThread().getStackTrace()) {
/*
This file was automatically generated by the Drools DMN open source engine Strongly Typed facility.
Do not modify this file, as any modifications will be lost when invoking the facility again.
Do not rely on the generated class(es) implementation, as the actual implementations may change.
Generated on: 2020-07-30T13:51:22.861+09:00[Asia/Tokyo]
*/
package KIE__API__TYPECHECK__TYPESAFEhttp_58_47_47www_46trisotech_46com_47definitions_47__69430b3e_4517b8_45430d_45b760_45c505bf6469f9dateTime_32Table_3258;
/**
public class InputSet implements java.io.Serializable, org.kie.dmn.api.core.FEELPropertyAccessible {
public InputSet() {
}
@Override()
public org.kie.dmn.feel.util.EvalHelper.PropertyValueResult getFEELProperty(java.lang.String property) {
switch(property) {
case "MyPerson":
return org.kie.dmn.feel.util.EvalHelper.PropertyValueResult.ofValue(this.getMyPerson());
package org.example.alerts;
public class AlertingServiceDTO implements java.util.function.Supplier<AlertingService> {
@Override()
public AlertingService get() {
AlertingService unit = new AlertingService();
{
org.kie.kogito.rules.DataStream<org.example.alerts.Event> eventData = org.kie.kogito.rules.DataSource.createStream();
unit.setEventData(eventData);
2020-04-28 18:51:49,020 ERROR [KogitoAssetsProcessor] (build-26) src/main/java/org/example/alerts/AlertingServiceDTO.java (15:31) : incompatible types: org.kie.kogito.rules.DataStream<org.example.alerts.Alert> cannot be converted to org.example.alerts.DataStreamWithKafka<org.example.alerts.Alert>
2020-04-28 18:51:49,027 ERROR [io.qua.dev.DevModeMain] (main) Failed to start Quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step org.kie.kogito.quarkus.deployment.KogitoAssetsProcessor#generateModel threw an exception: java.lang.IllegalStateException: src/main/java/org/example/alerts/AlertingServiceDTO.java (15:31) : incompatible types: org.kie.kogito.rules.DataStream<org.example.alerts.Alert> cannot be converted to org.example.alerts.DataStreamWithKafka<org.example.alerts.Alert>
src/main/java/org/example/alerts/AlertingServiceDTO.java (15:31) : incompatible types: org.kie.kogito.rules.DataStream<org.example.alerts.Alert> cannot be co
@tkobayas
tkobayas / new-file.bpmn
Created April 24, 2020 01:59
new-file.bpmn
<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" id="_JEw-QGf9EDiRWNuf8XUubw" exporter="jBPM Process Modeler" exporterVersion="2.0" targetNamespace="http://www.omg.org/bpmn20"><bpmn2:itemDefinition id="__68129975-1C2C-4DB9-A6CF-3174DD53B025_SkippableInputXItem" structureRef="Object"/><bpmn2:itemDefinition id="__68129975-1C2C-4DB9-A6CF-3174DD53B025_PriorityInputXItem" structureRef="Object"/><bpmn2:itemDefinition id="__68129975-1C2C-4DB9-A6CF-3174DD53B025_CommentInputXItem" structureRef="Object"/><bpmn2:itemDefinition id="__68129975-1C2C-4DB9-A6CF-3174DD53B025_DescriptionInputXItem" structureRef="Object"/><bpmn2:itemDefinition id="__68129975-1C2C-4DB9-A6CF-3174DD53B025_CreatedByInputXItem" structureRef="Object"/><bpmn2:itemDefinition id="__68129975-1C2C-4DB9-A6CF-3174DD53B025_TaskNameInputXItem" structureRef="Object"/><bpmn2:itemDefinition id="__68129975-1C2C-4DB9-A6CF-3174DD53B025_GroupIdInputXItem" structureRef="Object"/><bpmn2:itemDefinition