package io.trygvis.engine; import org.kie.internal.runtime.StatefulKnowledgeSession; public class Main { public static void main(String[] args) throws Exception { CalamusJbpm calamus = new CalamusJbpm(); String brokerUrl = "tcp://localhost:61616"; StatefulKnowledgeSession session = calamus.getSession(); // EntityManager entityManager = calamus.getEntityManagerFactory().createEntityManager(); // EntityTransaction transaction = entityManager.getTransaction(); // transaction.begin(); // entityManager.createQuery("FROM Process"); // transaction.commit(); try (MqClient buildResultClient = new MqClient(brokerUrl, "jenkins.build-result", new JenkinsBuildResultMessageListener(session)); MqClient newDeployClient = new MqClient(brokerUrl, "nexus.new-artifact", new NexusNewArtifactMessageListener(calamus.getEntityManagerFactory(), session))) { while (true) { Thread.sleep(1000); } } } }