View lsspecial.sh
for i in *; do if [[ $i =~ ^[0-9]{1,2}$ ]]; then echo $i; fi ; done |
View cf.py
# Open a file | |
fi = open("/home/donato/cf.txt", "r+") | |
fo = open("/home/donato/date.txt", "w+") | |
meseCod = "ABCDEHLMPRST" | |
for cf in fi: | |
try: | |
anno = int(cf[6:8]) | |
mese = meseCod.index(cf[8:9]) + 1 | |
giorno = int(cf[9:11]) |
View jaxrs-client.java
Client client = ClientBuilder.newClient(); | |
Response res = client.target("http://localhost:8888/Rest/ok").request().get(); | |
Simple[] entity = res.readEntity(Simple[].class); |
View pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>it.a2a.poc.bpm</groupId> | |
<artifactId>RestDataProvider</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<name>RestDataProvider</name> | |
<dependencies> | |
<dependency> | |
<groupId>org.jboss.resteasy</groupId> |
View Remediation.java
testVar = "remed"; | |
kcontext.setVariable("testVar",testVar); | |
org.jbpm.casemgmt.CaseMgmtService cmService = new org.jbpm.casemgmt.CaseMgmtUtil(kcontext); | |
java.util.Map<String, Object> workParams = new java.util.HashMap<String, Object>(); | |
workParams.put("Message", testVar); | |
View loose-rules.wid
import org.drools.core.process.core.datatype.impl.type.StringDataType; | |
import org.drools.core.process.core.datatype.impl.type.ObjectDataType; | |
[ | |
[ | |
"name" : "loose-rules", | |
"description" : "invoke rules from an independent rule project", | |
"parameters" : [ | |
"kbaseName" : new StringDataType(), | |
"fact" : new ObjectDataType() | |
], |
View dmn pom.xml
<dependency> | |
<groupId>org.kie</groupId> | |
<artifactId>kie-ci</artifactId> | |
<version>7.1.0.Final</version> | |
</dependency> | |
<dependency> | |
<groupId>org.kie</groupId> | |
<artifactId>kie-dmn-core</artifactId> | |
<version>7.1.0.Final</version> | |
</dependency> |
View dmn.java
KieServices kieServices = KieServices.Factory.get(); | |
KieContainer kieContainer = kieServices.getKieClasspathContainer(); | |
DMNRuntime dmnRuntime = kieContainer.newKieSession().getKieRuntime( DMNRuntime.class ); | |
DMNModel dmnModel = dmnRuntime.getModel("http://www.trisotech.com/definitions/_90a17b17-c884-4fa9-ba59-7a47899d89b2", "driving-eligibility"); | |
DMNContext dmnContext = dmnRuntime.newContext(); | |
Map<String, Object> person = new HashMap<>(); | |
person.put("name", "Donato"); | |
person.put("age", 17); |
View kmodule.xml
<kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<kbase name="kbase"> | |
<ksession name="ksession" default="true" /> | |
</kbase> | |
</kmodule> |
View EnvInfo.java
package utils; | |
public class EnvInfo { | |
private static String MOCK = "http://mas460:8088/mockPecManagerWsPortBinding"; | |
public static String wsdl(String name){ | |
return System.getProperty(name+"-wsdl", endpoint(name)+"?WSDL"); | |
} | |
public static String endpoint(String name){ |