Skip to content

Instantly share code, notes, and snippets.

View bbalakriz's full-sized avatar

bbalakriz

View GitHub Profile
package com.bala.housekeeper;
import java.util.Hashtable;
import java.util.ArrayList;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
....
// With the aforementioned configuration changes, userid and password could be passed as "null"
KieServicesConfiguration kieServicesConfig = KieServicesFactory.newRestConfiguration(
"http://localhost:8080/kie-server/services/rest/server",
null, null, 60);
....
....
......
......
<security-constraint>
<web-resource-collection>
<web-resource-name>REST web resources</web-resource-name>
<url-pattern>/services/rest/*</url-pattern>
<http-method>GET</http-method>
<http-method>PUT</http-method>
<http-method>POST</http-method>
<http-method>DELETE</http-method>
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: user-cluster-role
rules:
- apiGroups:
- config.openshift.io
resources:
- clusteroperators
verbs:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: user-cluster-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: user-cluster-role
subjects:
- apiGroup: rbac.authorization.k8s.io
package com.test;
public class ProcessContainer implements java.io.Serializable {
static final long serialVersionUID = 1L;
private java.lang.String containerAlias;
private java.lang.String processId;
private java.lang.String processVersion;
package com.test;
import org.jbpm.services.api.service.ServiceRegistry;
import org.jbpm.services.api.ProcessService;
import org.kie.server.services.api.KieServerRegistry;
import org.kie.server.services.impl.locator.ContainerLocatorProvider;
import org.kie.server.services.impl.KieServerLocator;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@bbalakriz
bbalakriz / sample-custom-kie-server.Dockerfile
Created September 15, 2021 08:32
sample-custom-kie-server.Dockerfile
#
# This Dockerfile is divided in two stages, the first is a builder for the KJAR
# and the second is the executable image (KIE Server + KJAR).
# dependency:go-offline does not resolve transitive BOM (from drools-bom), therefore '--offline' does not work.
### BUILDER IMAGE ###
FROM docker.io/maven:3.8.1-jdk-11-slim as builder
ARG MVN="mvn --show-version --batch-mode"
@bbalakriz
bbalakriz / results.js
Created May 8, 2020 06:17
results.html
$(function () {
var tags = [];
var source = new EventSource("/hashtags/stream");
source.onmessage = function (event) {
// Parse hashtag & weight
var input = event.data.split(":");
var tag = [{ word: input[0], weight: input[1] }];
// Check if the same hashtag exists in the tag cloud and get its index in the array
const objIndex = tags.findIndex((obj => obj.word === input[0]));
@bbalakriz
bbalakriz / HashTagReaderService.java
Created May 8, 2020 06:14
HashTagReaderService.java
@ApplicationScoped
public class HashTagReaderService {
@Incoming("agg-feeds")
@Outgoing("hash-stream")
@Broadcast
public String stream(String hashStream) {
return hashStream;
}
}