Skip to content

Instantly share code, notes, and snippets.


Rafael T. C. Soares (A.K.A Tuelho) rafaeltuelho

View GitHub Profile
rafaeltuelho / rhpam78-authoring-with-cors.yaml
Last active Oct 2, 2020
RHPAM 7.8 Operator KieApp Authoring Environment sample with CORS enabled, Postgres, ControllerBasedStartupStrategy
View rhpam78-authoring-with-cors.yaml
kind: KieApp
name: pam
adminPassword: 'yours passwd here'
adminUser: pamAdmin
environment: rhpam-authoring
rafaeltuelho /
Created Sep 20, 2020
Example of KafkaStream + Kogito CEP capabilities
package com.redhat.workshop.dil;
import com.redhat.workshop.util.JsonPOJODeserializer;
import com.redhat.workshop.util.JsonPOJOSerializer;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;
import org.apache.kafka.common.serialization.Serde;
import org.apache.kafka.common.serialization.Serdes;
import org.apache.kafka.common.serialization.Serializer;
rafaeltuelho /
Created Sep 8, 2020
Drools kie-server request using raw Java Objects
  • request payload
    "commands": [
            "insert": {
                "object": {
                    "java.lang.String": "go1"
                "out-identifier": "Response1",
rafaeltuelho /
Created Aug 17, 2020
Vert.x Twitter Web Client with oAuth2 authentication
package io.vertx.example.webclient.oauth;
import io.vertx.core.AbstractVerticle;
import io.vertx.core.json.JsonObject;
import io.vertx.example.util.Runner;
import io.vertx.ext.web.client.WebClient;
import io.vertx.ext.web.codec.BodyCodec;
* @author <a href="">Akshay Kumar</a>
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import org.kie.server.api.marshalling.MarshallingFormat;
View openshift-pod-debug.yaml
kind: Pod
apiVersion: v1
name: pod-debug
app: debug
deploymentconfig: debug
restartPolicy: Always
serviceAccountName: default
View creditcardfraud-integration-service-dep-tree.out
[INFO] Scanning for projects...
[WARNING] Some problems were encountered while building the effective model for
[WARNING] 'dependencies.dependency.version' for commons-lang:commons-lang:jar is either LATEST or RELEASE (both of them are being deprecated) @ line 78, column 13
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
View EmbeddedDataTable.dmn
<dmn:definitions xmlns:dmn="" xmlns="" xmlns:di="" xmlns:kie="" xmlns:dmndi="" xmlns:dc="" xmlns:feel="" id="_72BA4308-069E-4F8D-8608-D4FDDFA5A1A5" name="new-file" typeLanguage="" namespace="">
<dmn:itemDefinition id="_B8E3371A-9B39-4914-8C74-C7C0A8C808FB" name="tLoanProduct" isCollection="false">
<dmn:itemComponent id="_D849B756-2A5A-4000-B1EA-A2274AD15659" name="lenderName" isCollection="false">
<dmn:itemComponent id="_C9E5C508-D4FA-42E2-AA56-39A3DBB3D127" name="rate" isCollection="false">
View Notes on Case


"Case management is an extension of Business Process Management (BPM) that enables you to manage adaptable business processes."

"Many real-world applications cannot be described completely from start to finish (including all possible paths, deviations, and exceptions). Using a process-oriented approach in certain cases can lead to complex solutions that are hard to maintain."

"A case definition usually consists of loosely coupled process fragments that can be connected directly or indirectly to lead to certain milestones and ultimately a business goal, while the process is managed dynamically in response to changes that occur during run time. "

"Case management differs from business process management (BPM) in that it focuses on the actual data being handled throughout the case and less on the sequence of steps taken to complete a goal. Case data is the most important piece of information in case handling, while business context and decision-making is in the hands of the human case worker. "

View Loan prequalification.dmn
<dmn:definitions xmlns:dmn="" xmlns="" xmlns:di="" xmlns:kie="" xmlns:dmndi="" xmlns:dc="" xmlns:feel="" id="_e60ee8db-ad8b-405e-973b-195dd069c174" name="Loan prequalification" typeLanguage="" namespace="">
<dmn:itemDefinition id="_752AC063-7FAD-4A9D-B7D6-49F01A7222B1" name="tLoanPrequalification" isCollection="false">
<dmn:allowedValues id="_F50A70B8-632D-461F-9B3A-469BEDDFD69B">
<dmn:text>"Likely approved","Possibly approved","Likely disapproved"</dmn:text>
You can’t perform that action at this time.