From d38810a179a6f669ea0d3e7588f2aabed762deff Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 13 Apr 2014 09:59:38 +0200 Subject: yay --- calamus-engine/pom.xml | 26 +++-- .../java/io/trygvis/engine/CalamusDbConfig.java | 129 +++++++++++++++++++++ .../main/java/io/trygvis/engine/CalamusJbpm.java | 111 ++++++------------ .../java/io/trygvis/engine/CalamusJbpmConfig.java | 63 ++++++++++ .../src/main/java/io/trygvis/engine/Main.java | 2 +- .../engine/NexusNewArtifactMessageListener.java | 84 ++++++++------ .../io/trygvis/engine/domain/AbstractEntity.java | 6 +- .../java/io/trygvis/engine/domain/Artifact.java | 36 +++++- .../java/io/trygvis/engine/domain/Process.java | 2 +- .../src/main/resources/META-INF/persistence.xml | 3 +- .../main/resources/db/public/V001_000__jbpm.sql | 3 - .../resources/db/public/V001_001__baseline.sql | 12 +- calamus-engine/src/main/resources/logback.xml | 3 + 13 files changed, 338 insertions(+), 142 deletions(-) create mode 100644 calamus-engine/src/main/java/io/trygvis/engine/CalamusDbConfig.java create mode 100644 calamus-engine/src/main/java/io/trygvis/engine/CalamusJbpmConfig.java diff --git a/calamus-engine/pom.xml b/calamus-engine/pom.xml index 98ad6bf..48711fa 100755 --- a/calamus-engine/pom.xml +++ b/calamus-engine/pom.xml @@ -245,6 +245,7 @@ org.jbpm jbpm-test + test javax.transaction @@ -314,19 +315,22 @@ - diff --git a/calamus-engine/src/main/resources/db/public/V001_000__jbpm.sql b/calamus-engine/src/main/resources/db/public/V001_000__jbpm.sql index 4d2a194..e13e6fb 100644 --- a/calamus-engine/src/main/resources/db/public/V001_000__jbpm.sql +++ b/calamus-engine/src/main/resources/db/public/V001_000__jbpm.sql @@ -1,6 +1,3 @@ -DROP SCHEMA public CASCADE; -CREATE SCHEMA public; - CREATE TABLE Attachment ( AttachmentId INT8 NOT NULL, accessType INT4, diff --git a/calamus-engine/src/main/resources/db/public/V001_001__baseline.sql b/calamus-engine/src/main/resources/db/public/V001_001__baseline.sql index 3e39c06..5270d2c 100644 --- a/calamus-engine/src/main/resources/db/public/V001_001__baseline.sql +++ b/calamus-engine/src/main/resources/db/public/V001_001__baseline.sql @@ -9,8 +9,8 @@ CREATE TABLE artifact ( version VARCHAR(100) NOT NULL, classifier VARCHAR(100), extension VARCHAR(100) NOT NULL, - git_hash CHAR(40) NOT NULL, - level VARCHAR(100) NOT NULL + level VARCHAR(100) NOT NULL, + git_hash CHAR(40) ); DROP TABLE IF EXISTS process; @@ -22,16 +22,16 @@ CREATE TABLE process ( DROP TABLE IF EXISTS process_trigger; CREATE TABLE process_trigger ( - id BIGINT NOT NULL PRIMARY KEY, - process_id BIGINT NOT NULL REFERENCES process, - mvel VARCHAR(1000) NOT NULL + id BIGINT NOT NULL PRIMARY KEY, + process BIGINT NOT NULL REFERENCES process, + mvel VARCHAR(1000) NOT NULL ); INSERT INTO process (id, name, process_id) VALUES ((SELECT nextval('calamus_seq')), 'Deploy', 'io.trygvis.calamus.Deploy'); -INSERT INTO process_trigger (id, process_id, mvel) +INSERT INTO process_trigger (id, process, mvel) VALUES ((SELECT nextval('calamus_seq')), (SELECT diff --git a/calamus-engine/src/main/resources/logback.xml b/calamus-engine/src/main/resources/logback.xml index 743dd8b..46502f3 100644 --- a/calamus-engine/src/main/resources/logback.xml +++ b/calamus-engine/src/main/resources/logback.xml @@ -7,6 +7,9 @@ + + + -- cgit v1.2.3