TSK-1407: taskana-simplehistory-rest-spring now using provided test util classes from taskana-common-test

This commit is contained in:
Mustapha Zorgati 2020-10-11 16:29:56 +02:00
parent 49c0751e8b
commit 3a6f3dea87
19 changed files with 187 additions and 481 deletions

View File

@ -18,7 +18,6 @@ import java.util.stream.Stream;
import javax.sql.DataSource;
import org.apache.ibatis.jdbc.RuntimeSqlException;
import org.apache.ibatis.jdbc.ScriptRunner;
import org.apache.ibatis.jdbc.SqlRunner;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -29,17 +28,14 @@ public class SampleDataGenerator {
private static final String CACHED_TEST = "TEST";
private static final String CACHED_SAMPLE = "SAMPLE";
private static final String CACHED_EVENTSAMPLE = "EVENTSAMPLE";
private static final String CACHED_MONITOR = "MONITOR";
private static final String CACHED_CLEARDB = "CLEARDB";
private static final String CACHED_DROPDB = "DROPDB";
private static HashMap<String, List<String>> cachedScripts = new HashMap<>();
private static final String CACHED_CLEAR_DB = "CLEARDB";
private static final String CACHED_DROP_DB = "DROP_DB";
private static final HashMap<String, List<String>> CACHED_SCRIPTS = new HashMap<>();
private final DataSource dataSource;
private final ZonedDateTime now;
/**
* This value cannot be automatically obtained by connection.getSchema(), because setting not yet
* existing schema will result into an SQL Exception.
*/
// This value cannot be automatically obtained by connection.getSchema(), because setting not yet
// existing schema will result into an SQL Exception.
private final String schema;
public SampleDataGenerator(DataSource dataSource, String schema) {
@ -54,21 +50,9 @@ public class SampleDataGenerator {
public void generateSampleData() {
LOGGER.debug("entry to generateSampleData()");
runScripts(
(runner) -> {
clearDb();
Stream<String> scripts;
String cacheKey;
// dbtable constants?
if (tableExists("TASK_HISTORY_EVENT")) {
scripts = SampleDataProvider.getScriptsWithEvents();
cacheKey = CACHED_EVENTSAMPLE;
} else {
scripts = SampleDataProvider.getSampleDataCreationScripts();
cacheKey = CACHED_SAMPLE;
}
executeAndCacheScripts(scripts, cacheKey);
});
Stream<String> scripts = SampleDataProvider.getSampleDataCreationScripts();
executeAndCacheScripts(scripts, CACHED_SAMPLE);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("exit from generateSampleData()");
}
@ -93,30 +77,17 @@ public class SampleDataGenerator {
public void clearDb() {
LOGGER.debug("entry to clearDb()");
Stream<String> scripts = SampleDataProvider.getScriptsToClearDatabase();
executeAndCacheScripts(scripts, CACHED_CLEARDB);
executeAndCacheScripts(scripts, CACHED_CLEAR_DB);
LOGGER.debug("exit from clearDb()");
}
public void dropDb() {
LOGGER.debug("entry to dropDb()");
Stream<String> scripts = SampleDataProvider.getScriptsToDropDatabase();
executeAndCacheScripts(scripts, CACHED_DROPDB);
executeAndCacheScripts(scripts, CACHED_DROP_DB);
LOGGER.debug("exit from dropDb()");
}
boolean tableExists(String table) {
try (Connection connection = dataSource.getConnection()) {
connection.setSchema(schema);
SqlRunner runner = new SqlRunner(connection);
String tableSafe = SqlReplacer.getSanitizedTableName(table);
String query = "SELECT 1 FROM " + tableSafe + " LIMIT 1;";
runner.run(query);
return true;
} catch (RuntimeSqlException | SQLException e) {
return false;
}
}
private List<String> parseScripts(Stream<String> scripts) {
try (Connection connection = dataSource.getConnection()) {
String dbProductName = connection.getMetaData().getDatabaseProductName();
@ -156,7 +127,7 @@ public class SampleDataGenerator {
LOGGER.debug("entry to executeAndCacheScripts(scripts = {}, cacheKey = {})", scripts, cacheKey);
runScripts(
runner ->
cachedScripts.computeIfAbsent(cacheKey, key -> parseScripts(scripts)).stream()
CACHED_SCRIPTS.computeIfAbsent(cacheKey, key -> parseScripts(scripts)).stream()
.map(s -> s.getBytes(StandardCharsets.UTF_8))
.map(ByteArrayInputStream::new)
.map(s -> new InputStreamReader(s, StandardCharsets.UTF_8))
@ -174,6 +145,7 @@ public class SampleDataGenerator {
connection.setSchema(schema);
runner.setLogWriter(logWriter);
runner.setErrorLogWriter(errorLogWriter);
runner.setStopOnError(true);
return runner;
}
}

View File

@ -43,11 +43,8 @@ public final class SampleDataProvider {
SAMPLE_TASK_COMMENT,
SAMPLE_ATTACHMENT,
SAMPLE_WORKBASKET_ACCESS_LIST,
SAMPLE_OBJECT_REFERENCE);
}
static Stream<String> getScriptsWithEvents() {
return Stream.concat(getSampleDataCreationScripts(), Stream.of(SAMPLE_TASK_HISTORY_EVENT));
SAMPLE_OBJECT_REFERENCE,
SAMPLE_TASK_HISTORY_EVENT);
}
static Stream<String> getScriptsToClearDatabase() {

View File

@ -24,10 +24,6 @@ final class SqlReplacer {
return parseAndReplace(getScriptBufferedStream(scriptPath), now, dbProductName);
}
static boolean isPostgreSql(String databaseProductName) {
return "PostgreSQL".equals(databaseProductName);
}
static boolean isDb2(String dbProductName) {
return dbProductName != null && dbProductName.contains("DB2");
}

View File

@ -1,47 +1,46 @@
INSERT INTO TASK_HISTORY_EVENT (ID, BUSINESS_PROCESS_ID, PARENT_BUSINESS_PROCESS_ID, TASK_ID, EVENT_TYPE, CREATED, USER_ID, DOMAIN, WORKBASKET_KEY, POR_COMPANY, POR_SYSTEM, POR_INSTANCE, POR_TYPE, POR_VALUE, TASK_CLASSIFICATION_KEY, TASK_CLASSIFICATION_CATEGORY, ATTACHMENT_CLASSIFICATION_KEY, OLD_VALUE, NEW_VALUE, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, DETAILS) VALUES
-- BUSINESS_PROCESS_ID, PARENT_BUSINESS_PROCESS_ID, TASK_ID, EVENT_TYPE, CREATED, USER_ID, DOMAIN, WORKBASKET_KEY, POR_COMPANY , POR_SYSTEM, POR_INSTANCE , POR_TYPE , POR_VALUE , TASK_CLASSIFICATION_KEY, TASK_CLASSIFICATION_CATEGORY , ATTACHMENT_CLASSIFICATION_KEY , OLD_VALUE , NEW_VALUE , CUSTOM_1 , CUSTOM_2 , CUSTOM_3 , CUSTOM_4
('THI:000000000000000000000000000000000000', 'BPI:01' ,'', 'TKI:000000000000000000000000000000000000', 'CREATED', RELATIVE_DATE(0) , 'USER-2-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' ,' L140101' , 'TASK' ,'' ,'old_val12' ,'new_val12' ,'custom1' ,'custom2' , 'custom3' ,'custom4', 'some Details'),
('THI:000000000000000000000000000000000001', 'BPI:02' ,'', 'TKI:000000000000000000000000000000000000', 'UPDATED', RELATIVE_DATE(0), 'USER-1-1', 'DOMAIN_A', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '65464564' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000002', 'BPI:03' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000003', 'BPI:04' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000004', 'BPI:03' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000005', 'BPI:02' ,'' , 'TKI:000000000000000000000000000000000000', 'CREATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000006', 'BPI:06' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000007', 'BPI:02' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000008', 'BPI:04' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'CREATED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000009','BPI:02' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000010','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000011','BPI:03' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000012','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000013','BPI:03' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000014','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000015','BPI:05' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000016','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'CREATED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000017','BPI:04' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000018','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000019','BPI:03' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000020','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000021','BPI:05' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000022','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000023','BPI:05' ,'' , 'TKI:000000000000000000000000000000000000', 'CREATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000024','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000025','BPI:03' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000026','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'CREATED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000027','BPI:04' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000028','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000029','BPI:03' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000030','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000031','BPI:05' ,'' , 'TKI:000000000000000000000000000000000000', 'CREATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000032','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000033','BPI:06' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000034','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'CREATED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000035','BPI:04' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000036','BPI:03' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000037','BPI:02' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000038','BPI:03' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000039','BPI:02' ,'' , 'TKI:000000000000000000000000000000000000', 'CREATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000040','BPI:06' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000041','BPI:02' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000042','BPI:03' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('THI:000000000000000000000000000000000043','BPI:04' ,'' , 'TKI:000000000000000000000000000000000000', 'CREATED', RELATIVE_DATE(0), 'USER-1-2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('THI:000000000000000000000000000000000044','BPI:03' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', RELATIVE_DATE(0) , 'USER-2-1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details');
-- TASK_HISTORY_EVENT TABLE (ID , BUSINESS_PROCESS_ID, PARENT_BUSINESS_PROCESS_ID, TASK_ID , EVENT_TYPE, CREATED , USER_ID , DOMAIN , WORKBASKET_KEY , POR_COMPANY, POR_SYSTEM, POR_INSTANCE, POR_TYPE, POR_VALUE , TASK_CLASSIFICATION_KEY, TASK_CLASSIFICATION_CATEGORY, ATTACHMENT_CLASSIFICATION_KEY, OLD_VALUE , NEW_VALUE , CUSTOM_1 , CUSTOM_2 , CUSTOM_3 , CUSTOM_4 , DETAILS );
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000000', 'BPI:01' , '' , 'TKI:000000000000000000000000000000000000', 'CREATED' , RELATIVE_DATE(0) , 'USER_2_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', 'L140101' , 'TASK' , '' , 'old_val12', 'new_val12', 'custom1', 'custom2', 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000001', 'BPI:02' , '' , 'TKI:000000000000000000000000000000000000', 'UPDATED' , RELATIVE_DATE(-2), 'USER_1_1', 'DOMAIN_A', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '65464564', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000002', 'BPI:03' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000003', 'BPI:04' , '' , 'TKI:000000000000000000000000000000000000', 'UPDATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000004', 'BPI:03' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000005', 'BPI:02' , '' , 'TKI:000000000000000000000000000000000000', 'CREATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000006', 'BPI:06' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000007', 'BPI:02' , '' , 'TKI:000000000000000000000000000000000000', 'UPDATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000008', 'BPI:04' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'CREATED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000009', 'BPI:02' , '' , 'TKI:000000000000000000000000000000000000', 'UPDATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000010', 'BPI:02' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000011', 'BPI:03' , '' , 'TKI:000000000000000000000000000000000000', 'UPDATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000012', 'BPI:02' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000013', 'BPI:03' , '' , 'TKI:000000000000000000000000000000000000', 'UPDATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000014', 'BPI:02' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000015', 'BPI:05' , '' , 'TKI:000000000000000000000000000000000000', 'UPDATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000016', 'BPI:02' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'CREATED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000017', 'BPI:04' , '' , 'TKI:000000000000000000000000000000000000', 'UPDATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000018', 'BPI:02' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000019', 'BPI:03' , '' , 'TKI:000000000000000000000000000000000000', 'UPDATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000020', 'BPI:02' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000021', 'BPI:05' , '' , 'TKI:000000000000000000000000000000000000', 'UPDATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000022', 'BPI:02' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000023', 'BPI:05' , '' , 'TKI:000000000000000000000000000000000000', 'CREATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000024', 'BPI:02' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000025', 'BPI:03' , '' , 'TKI:000000000000000000000000000000000000', 'UPDATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000026', 'BPI:02' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'CREATED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000027', 'BPI:04' , '' , 'TKI:000000000000000000000000000000000000', 'UPDATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000028', 'BPI:02' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000029', 'BPI:03' , '' , 'TKI:000000000000000000000000000000000000', 'UPDATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000030', 'BPI:02' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000031', 'BPI:05' , '' , 'TKI:000000000000000000000000000000000000', 'CREATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000032', 'BPI:02' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000033', 'BPI:06' , '' , 'TKI:000000000000000000000000000000000000', 'UPDATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000034', 'BPI:02' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'CREATED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000035', 'BPI:04' , '' , 'TKI:000000000000000000000000000000000000', 'UPDATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000036', 'BPI:03' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000037', 'BPI:02' , '' , 'TKI:000000000000000000000000000000000000', 'UPDATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000038', 'BPI:03' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000039', 'BPI:02' , '' , 'TKI:000000000000000000000000000000000000', 'CREATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000040', 'BPI:06' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000041', 'BPI:02' , '' , 'TKI:000000000000000000000000000000000000', 'UPDATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000042', 'BPI:03' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000043', 'BPI:04' , '' , 'TKI:000000000000000000000000000000000000', 'CREATED' , RELATIVE_DATE(-1), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344', '' , '' , '' , '2old_val' , 'new_val2' , 'custom1', '' , 'custom3', 'custom4', 'some Details');
INSERT INTO TASK_HISTORY_EVENT VALUES ('HEI:000000000000000000000000000000000044', 'BPI:03' , 'BPI:01' , 'TKI:000000000000000000000000000000000001', 'DELETED' , RELATIVE_DATE(0) , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' , 'DOCTYPE_DEFAULT' , '' , '' , 'custom1', '' , 'custom3', '' , 'some Details');

View File

@ -10,19 +10,17 @@ class SampleDataProviderTest {
@Test
void getScriptsNotNull() {
assertThat(SampleDataProvider.getSampleDataCreationScripts()).isNotNull();
assertThat(SampleDataProvider.getScriptsWithEvents()).isNotNull();
}
@Test
void getScriptsNotEmpty() {
assertThat(SampleDataProvider.getSampleDataCreationScripts().count() > 0).isTrue();
assertThat(SampleDataProvider.getScriptsWithEvents().count() > 0).isTrue();
assertThat(SampleDataProvider.getSampleDataCreationScripts()).isNotEmpty();
}
@Test
void getScriptsFileExists() {
SampleDataProvider.getSampleDataCreationScripts()
.map(SqlReplacer::getScriptBufferedStream)
.forEach(script -> assertThat(script).isNotNull());
assertThat(SampleDataProvider.getSampleDataCreationScripts())
.extracting(SqlReplacer::getScriptBufferedStream)
.doesNotContainNull();
}
}

View File

@ -5,8 +5,9 @@ import java.util.UUID;
/** This class contains util methods for generating ids. */
public final class IdGenerator {
private static final String SEPERATOR = ":";
private static final String SEPARATOR = ":";
// disable initialization
private IdGenerator() {}
/**
@ -16,10 +17,6 @@ public final class IdGenerator {
* @return a String with a length of 40 characters
*/
public static String generateWithPrefix(String prefix) {
return new StringBuilder()
.append(prefix)
.append(SEPERATOR)
.append(UUID.randomUUID().toString())
.toString();
return prefix + SEPARATOR + UUID.randomUUID();
}
}

View File

@ -53,6 +53,12 @@
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>pro.taskana</groupId>
<artifactId>taskana-common-test</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
@ -74,7 +80,6 @@
<version>${version.spring.core}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>

View File

@ -6,11 +6,10 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import pro.taskana.simplehistory.impl.SimpleHistoryServiceImpl;
import pro.taskana.simplehistory.rest.assembler.TaskHistoryEventRepresentationModelAssembler;
/** Configuration for Taskana history REST service. */
@Configuration
@ComponentScan({"pro.taskana", "pro.taskana.simplehistory.rest"})
@ComponentScan("pro.taskana")
@EnableTransactionManagement
public class TaskHistoryRestConfiguration {
@ -18,9 +17,4 @@ public class TaskHistoryRestConfiguration {
public SimpleHistoryServiceImpl getSimpleHistoryService() {
return new SimpleHistoryServiceImpl();
}
@Bean
public TaskHistoryEventRepresentationModelAssembler getTaskHistoryEventResourceAssembler() {
return new TaskHistoryEventRepresentationModelAssembler();
}
}

View File

@ -5,6 +5,7 @@ import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.methodOn;
import org.springframework.hateoas.server.RepresentationModelAssembler;
import org.springframework.lang.NonNull;
import org.springframework.stereotype.Component;
import pro.taskana.common.api.exceptions.SystemException;
import pro.taskana.simplehistory.rest.TaskHistoryEventController;
@ -13,6 +14,7 @@ import pro.taskana.spi.history.api.events.task.TaskHistoryCustomField;
import pro.taskana.spi.history.api.events.task.TaskHistoryEvent;
/** Transforms any {@link TaskHistoryEvent} into its {@link TaskHistoryEventRepresentationModel}. */
@Component
public class TaskHistoryEventRepresentationModelAssembler
implements RepresentationModelAssembler<TaskHistoryEvent, TaskHistoryEventRepresentationModel> {

View File

@ -1,80 +0,0 @@
package pro.taskana.simplehistory.rest.sampledata;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StringReader;
import java.io.StringWriter;
import java.nio.charset.StandardCharsets;
import java.sql.Connection;
import java.sql.SQLException;
import javax.sql.DataSource;
import org.apache.ibatis.jdbc.ScriptRunner;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pro.taskana.common.internal.configuration.DB;
/** This class generates sample data for manual testing purposes. */
public class SampleDataGenerator {
private static final Logger LOGGER = LoggerFactory.getLogger(SampleDataGenerator.class);
private static final String TEST_DATA = "/sql.sample-data";
private static final String CLEAR = TEST_DATA + "/clear-db.sql";
private static final String TASK_HISTORY_EVENT = TEST_DATA + "/task-history-event.sql";
DataSource dataSource;
String dbProductName;
public SampleDataGenerator(DataSource dataSource) throws SQLException {
try (Connection connection = dataSource.getConnection()) {
dbProductName = connection.getMetaData().getDatabaseProductName();
if (LOGGER.isTraceEnabled()) {
String msg = connection.getMetaData().toString();
LOGGER.trace(msg);
}
}
this.dataSource = dataSource;
}
public void generateSampleData(String schemaName) {
final StringWriter outWriter = new StringWriter();
final PrintWriter logWriter = new PrintWriter(outWriter);
final StringWriter errorWriter = new StringWriter();
final PrintWriter errorLogWriter = new PrintWriter(errorWriter);
try (Connection connection = dataSource.getConnection()) {
ScriptRunner runner = new ScriptRunner(connection);
runner.runScript(selectSchemaScript(dbProductName, schemaName));
runner.setStopOnError(false);
runner.runScript(
new BufferedReader(
new InputStreamReader(
SampleDataGenerator.class.getResourceAsStream(CLEAR), StandardCharsets.UTF_8)));
runner.setStopOnError(true);
runner.setLogWriter(logWriter);
runner.setErrorLogWriter(errorLogWriter);
runner.runScript(
new BufferedReader(
new InputStreamReader(
SampleDataGenerator.class.getResourceAsStream(TASK_HISTORY_EVENT),
StandardCharsets.UTF_8)));
} catch (Exception e) {
LOGGER.error("caught Exception {}", e, e);
}
LOGGER.trace(outWriter.toString());
if (!errorWriter.toString().trim().isEmpty()) {
LOGGER.error(errorWriter.toString());
}
}
private StringReader selectSchemaScript(String dbProductName, String schemaName) {
return new StringReader(
DB.isPostgreSql(dbProductName)
? "SET search_path TO " + schemaName + ";"
: "SET SCHEMA " + schemaName + ";");
}
}

View File

@ -1,2 +0,0 @@
logging.level.pro.taskana=INFO
taskana.schemaName=TASKANA

View File

@ -1,3 +0,0 @@
-- the order is important!
DELETE FROM TASK_HISTORY_EVENT;
COMMIT;

View File

@ -1,3 +0,0 @@
DROP TABLE TASK_HISTORY_EVENT;
COMMIT;

View File

@ -1,47 +0,0 @@
INSERT INTO TASK_HISTORY_EVENT (ID, BUSINESS_PROCESS_ID, PARENT_BUSINESS_PROCESS_ID, TASK_ID, EVENT_TYPE, CREATED, USER_ID, DOMAIN, WORKBASKET_KEY, POR_COMPANY, POR_SYSTEM, POR_INSTANCE, POR_TYPE, POR_VALUE, TASK_CLASSIFICATION_KEY, TASK_CLASSIFICATION_CATEGORY, ATTACHMENT_CLASSIFICATION_KEY, OLD_VALUE, NEW_VALUE, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, DETAILS) VALUES
-- BUSINESS_PROCESS_ID, PARENT_BUSINESS_PROCESS_ID, TASK_ID, EVENT_TYPE, CREATED, USER_ID, DOMAIN, WORKBASKET_KEY, POR_COMPANY , POR_SYSTEM, POR_INSTANCE , POR_TYPE , POR_VALUE , TASK_CLASSIFICATION_KEY, TASK_CLASSIFICATION_CATEGORY , ATTACHMENT_CLASSIFICATION_KEY , OLD_VALUE , NEW_VALUE , CUSTOM_1 , CUSTOM_2 , CUSTOM_3 , CUSTOM_4
('HEI:000000000000000000000000000000000000','BPI:01' ,'', 'TKI:000000000000000000000000000000000000', 'CREATED', CURRENT_TIMESTAMP , 'USER_2_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' ,' L140101' , 'TASK' ,'' ,'old_val12' ,'new_val12' ,'custom1' ,'custom2' , 'custom3' ,'custom4', 'some Details'),
('HEI:000000000000000000000000000000000001','BPI:02' ,'', 'TKI:000000000000000000000000000000000000', 'UPDATED', DATEADD('DAY', -2, CURRENT_TIMESTAMP ), 'USER_1_1', 'DOMAIN_A', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '65464564' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000002','BPI:03' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000003','BPI:04' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000004','BPI:03' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000005','BPI:02' ,'' , 'TKI:000000000000000000000000000000000000', 'CREATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000006','BPI:06' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000007','BPI:02' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000008','BPI:04' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'CREATED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000009','BPI:02' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000010','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000011','BPI:03' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000012','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000013','BPI:03' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000014','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000015','BPI:05' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000016','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'CREATED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000017','BPI:04' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000018','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000019','BPI:03' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000020','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000021','BPI:05' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000022','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000023','BPI:05' ,'' , 'TKI:000000000000000000000000000000000000', 'CREATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000024','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000025','BPI:03' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000026','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'CREATED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000027','BPI:04' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000028','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000029','BPI:03' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000030','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000031','BPI:05' ,'' , 'TKI:000000000000000000000000000000000000', 'CREATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000032','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000033','BPI:06' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000034','BPI:02' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'CREATED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000035','BPI:04' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000036','BPI:03' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000037','BPI:02' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000038','BPI:03' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000039','BPI:02' ,'' , 'TKI:000000000000000000000000000000000000', 'CREATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000040','BPI:06' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000041','BPI:02' ,'' , 'TKI:000000000000000000000000000000000000', 'UPDATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000042','BPI:03' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details'),
('HEI:000000000000000000000000000000000043','BPI:04' ,'' , 'TKI:000000000000000000000000000000000000', 'CREATED', DATEADD('DAY', -1, CURRENT_TIMESTAMP ), 'USER_1_2', 'DOMAIN_B', 'WBI:100000000000000000000000000000000001', '00' , 'PASystem', '00' , 'VNR' , '11223344' , '' , '' ,'' ,'2old_val' ,'new_val2' ,'custom1' ,'' , 'custom3' ,'custom4','some Details'),
('HEI:000000000000000000000000000000000044','BPI:03' ,'BPI:01', 'TKI:000000000000000000000000000000000001', 'DELETED', CURRENT_TIMESTAMP , 'USER_2_1', 'DOMAIN_B', 'WBI:100000000000000000000000000000000002', '11' , '' , '22' , '' , '' , 'L140101' , 'TASK' ,'DOCTYPE_DEFAULT' ,'' ,'' ,'custom1' ,'' , 'custom3' ,'','some Details');

View File

@ -1,62 +0,0 @@
package pro.taskana.simplehistory.rest;
import java.sql.SQLException;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.DependsOn;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Primary;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.PlatformTransactionManager;
import pro.taskana.simplehistory.rest.sampledata.SampleDataGenerator;
/** Example Application to create the documentation. */
@SpringBootApplication
@Import({TaskHistoryRestConfiguration.class})
public class ExampleDocumentationApplication {
@Value("${taskana.schemaName:TASKANA}")
private String schemaName;
@Autowired private SampleDataGenerator sampleDataGenerator;
public static void main(String[] args) {
SpringApplication.run(ExampleDocumentationApplication.class, args);
}
@Bean
@Primary
@ConfigurationProperties(prefix = "datasource")
public DataSourceProperties dataSourceProperties() {
DataSourceProperties props = new DataSourceProperties();
props.setUrl(
"jdbc:h2:mem:taskana;IGNORECASE=TRUE;LOCK_MODE=0;INIT=CREATE SCHEMA IF NOT EXISTS "
+ schemaName);
return props;
}
@Bean
public DataSource dataSource(DataSourceProperties properties) {
return properties.initializeDataSourceBuilder().build();
}
@Bean
public PlatformTransactionManager txManager(DataSource dataSource) {
return new DataSourceTransactionManager(dataSource);
}
@Bean
@DependsOn("getTaskanaEngine") // generate sample data after schema was inserted
public SampleDataGenerator generateSampleData(DataSource dataSource) throws SQLException {
sampleDataGenerator = new SampleDataGenerator(dataSource);
sampleDataGenerator.generateSampleData(schemaName);
return sampleDataGenerator;
}
}

View File

@ -3,61 +3,44 @@ package pro.taskana.simplehistory.rest;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.module.paramnames.ParameterNamesModule;
import java.time.LocalDateTime;
import java.util.Collections;
import org.assertj.core.api.ThrowableAssert.ThrowingCallable;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.hateoas.IanaLinkRelations;
import org.springframework.hateoas.Link;
import org.springframework.hateoas.mediatype.hal.Jackson2HalModule;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.web.client.RestTemplate;
import pro.taskana.common.test.rest.RestHelper;
import pro.taskana.common.test.rest.TaskanaSpringBootTest;
import pro.taskana.simplehistory.rest.models.TaskHistoryEventListResource;
import pro.taskana.simplehistory.rest.models.TaskHistoryEventRepresentationModel;
/** Controller for integration test. */
@ExtendWith(SpringExtension.class)
@SpringBootTest(
classes = {TaskHistoryRestConfiguration.class},
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@TaskanaSpringBootTest
class TaskHistoryEventControllerIntTest {
@Value("${taskana.schemaName:TASKANA}")
public String schemaName;
private static final RestTemplate TEMPLATE = RestHelper.TEMPLATE;
String server = "http://127.0.0.1:";
private final RestHelper restHelper;
RestTemplate template = getRestTemplate();
HttpEntity<String> request;
@LocalServerPort int port;
@Autowired
TaskHistoryEventControllerIntTest(RestHelper restHelper) {
this.restHelper = restHelper;
}
@Test
void testGetAllHistoryEvent() {
ResponseEntity<TaskHistoryEventListResource> response =
template.exchange(
server + port + "/api/v1/task-history-event",
TEMPLATE.exchange(
restHelper.toUrl("/api/v1/task-history-event"),
HttpMethod.GET,
request,
restHelper.defaultRequest(),
ParameterizedTypeReference.forType(TaskHistoryEventListResource.class));
assertThat(response.getBody()).isNotNull();
assertThat(response.getBody().getLink(IanaLinkRelations.SELF)).isNotNull();
@ -66,13 +49,13 @@ class TaskHistoryEventControllerIntTest {
@Test
void testGetAllHistoryEventDescendingOrder() {
String parameters =
String url =
"/api/v1/task-history-event?sort-by=business-process-id&order=desc&page-size=3&page=1";
ResponseEntity<TaskHistoryEventListResource> response =
template.exchange(
server + port + parameters,
TEMPLATE.exchange(
restHelper.toUrl(url),
HttpMethod.GET,
request,
restHelper.defaultRequest(),
ParameterizedTypeReference.forType(TaskHistoryEventListResource.class));
assertThat(response.getBody()).isNotNull();
assertThat(response.getBody().getContent()).hasSize(3);
@ -81,19 +64,19 @@ class TaskHistoryEventControllerIntTest {
.get()
.extracting(Link::getHref)
.asString()
.endsWith(parameters);
.endsWith(url);
}
@Test
void should_ReturnSpecificTaskHistoryEventWithoutDetails_When_ListIsQueried() {
String url =
"/api/v1/task-history-event?business-process-id=BPI:01"
+ "&sort-by=business-process-id&order=asc&page-size=6&page=1";
ResponseEntity<TaskHistoryEventListResource> response =
template.exchange(
server
+ port
+ "/api/v1/task-history-event?business-process-id=BPI:01"
+ "&sort-by=business-process-id&order=asc&page-size=6&page=1",
TEMPLATE.exchange(
restHelper.toUrl(url),
HttpMethod.GET,
request,
restHelper.defaultRequest(),
ParameterizedTypeReference.forType(TaskHistoryEventListResource.class));
assertThat(response.getBody()).isNotNull();
assertThat(response.getBody().getLink(IanaLinkRelations.SELF)).isNotNull();
@ -105,10 +88,10 @@ class TaskHistoryEventControllerIntTest {
@Test
void should_ReturnSpecificTaskHistoryEventWithDetails_When_SingleEventIsQueried() {
ResponseEntity<TaskHistoryEventRepresentationModel> response =
template.exchange(
server + port + "/api/v1/task-history-event/HEI:000000000000000000000000000000000000",
TEMPLATE.exchange(
restHelper.toUrl("/api/v1/task-history-event/HEI:000000000000000000000000000000000000"),
HttpMethod.GET,
request,
restHelper.defaultRequest(),
ParameterizedTypeReference.forType(TaskHistoryEventRepresentationModel.class));
assertThat(response.getBody()).isNotNull();
@ -120,10 +103,10 @@ class TaskHistoryEventControllerIntTest {
void testThrowsExceptionIfInvalidFilterIsUsed() {
ThrowingCallable httpCall =
() ->
template.exchange(
server + port + "/api/v1/task-history-event?invalid=BPI:01",
TEMPLATE.exchange(
restHelper.toUrl("/api/v1/task-history-event?invalid=BPI:01"),
HttpMethod.GET,
request,
restHelper.defaultRequest(),
ParameterizedTypeReference.forType(TaskHistoryEventListResource.class));
assertThatThrownBy(httpCall)
.isInstanceOf(HttpClientErrorException.class)
@ -138,10 +121,10 @@ class TaskHistoryEventControllerIntTest {
final String finalCurrentTime = currentTime;
ThrowingCallable httpCall =
() ->
template.exchange(
server + port + "/api/v1/task-history-event?created=" + finalCurrentTime,
TEMPLATE.exchange(
restHelper.toUrl("/api/v1/task-history-event?created=" + finalCurrentTime),
HttpMethod.GET,
request,
restHelper.defaultRequest(),
ParameterizedTypeReference.forType(TaskHistoryEventListResource.class));
assertThatThrownBy(httpCall)
.isInstanceOf(HttpClientErrorException.class)
@ -152,10 +135,10 @@ class TaskHistoryEventControllerIntTest {
// correct Format 'yyyy-MM-dd'
currentTime = currentTime.substring(0, 10);
ResponseEntity<TaskHistoryEventListResource> response =
template.exchange(
server + port + "/api/v1/task-history-event?created=" + currentTime,
TEMPLATE.exchange(
restHelper.toUrl("/api/v1/task-history-event?created=" + currentTime),
HttpMethod.GET,
request,
restHelper.defaultRequest(),
ParameterizedTypeReference.forType(TaskHistoryEventListResource.class));
assertThat(response.getBody()).isNotNull();
assertThat(response.getBody().getLink(IanaLinkRelations.SELF)).isNotNull();
@ -164,13 +147,12 @@ class TaskHistoryEventControllerIntTest {
@Test
void testGetSecondPageSortedByKey() {
String parameters =
"/api/v1/task-history-event?sort-by=workbasket-key&order=desc&page=2&page-size=2";
String url = "/api/v1/task-history-event?sort-by=workbasket-key&order=desc&page=2&page-size=2";
ResponseEntity<TaskHistoryEventListResource> response =
template.exchange(
server + port + parameters,
TEMPLATE.exchange(
restHelper.toUrl(url),
HttpMethod.GET,
request,
restHelper.defaultRequest(),
ParameterizedTypeReference.forType(TaskHistoryEventListResource.class));
assertThat(response.getBody()).isNotNull();
@ -182,7 +164,7 @@ class TaskHistoryEventControllerIntTest {
.get()
.extracting(Link::getHref)
.asString()
.endsWith(parameters);
.endsWith(url);
assertThat(response.getBody().getLink("allTaskHistoryEvent"))
.isNotNull()
.get()
@ -193,25 +175,4 @@ class TaskHistoryEventControllerIntTest {
assertThat(response.getBody().getLink(IanaLinkRelations.FIRST)).isNotNull();
assertThat(response.getBody().getLink(IanaLinkRelations.LAST)).isNotNull();
}
/**
* Return a REST template which is capable of dealing with responses in HAL format.
*
* @return RestTemplate
*/
private RestTemplate getRestTemplate() {
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
mapper.registerModule(new Jackson2HalModule());
mapper
.registerModule(new ParameterNamesModule())
.registerModule(new Jdk8Module())
.registerModule(new JavaTimeModule());
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
converter.setSupportedMediaTypes(MediaType.parseMediaTypes("application/hal+json"));
converter.setObjectMapper(mapper);
return new RestTemplate(Collections.singletonList(converter));
}
}

View File

@ -33,7 +33,7 @@ import pro.taskana.workbasket.api.models.WorkbasketSummary;
import pro.taskana.workbasket.internal.WorkbasketQueryImpl;
/** This class is responsible for the transfer of tasks. */
public class TaskTransferrer {
class TaskTransferrer {
private static final String WAS_NOT_FOUND2 = " was not found.";
private static final String TASK_IN_END_STATE_WITH_ID_CANNOT_BE_TRANSFERRED =
@ -43,15 +43,14 @@ public class TaskTransferrer {
private static final String THE_WORKBASKET = "The workbasket ";
private static final String ID_PREFIX_HISTORY_EVENT = "HEI";
private static final Logger LOGGER = LoggerFactory.getLogger(TaskTransferrer.class);
private InternalTaskanaEngine taskanaEngine;
private WorkbasketService workbasketService;
private TaskServiceImpl taskService;
private TaskMapper taskMapper;
private HistoryEventManager historyEventManager;
private final InternalTaskanaEngine taskanaEngine;
private final WorkbasketService workbasketService;
private final TaskServiceImpl taskService;
private final TaskMapper taskMapper;
private final HistoryEventManager historyEventManager;
TaskTransferrer(
InternalTaskanaEngine taskanaEngine, TaskMapper taskMapper, TaskServiceImpl taskService) {
super();
this.taskanaEngine = taskanaEngine;
this.taskService = taskService;
this.taskMapper = taskMapper;
@ -270,11 +269,7 @@ public class TaskTransferrer {
}
List<MinimalTaskSummary> taskSummaries;
if (taskIds.isEmpty()) {
taskSummaries = new ArrayList<>();
} else {
taskSummaries = taskMapper.findExistingTasks(taskIds, null);
}
checkIfTransferConditionsAreFulfilled(taskIds, taskSummaries, bulkLog);
updateTasksToBeTransferred(taskIds, taskSummaries, destinationWorkbasket);
if (LOGGER.isDebugEnabled()) {
@ -411,7 +406,7 @@ public class TaskTransferrer {
private void createTasksTransferredEvents(
List<MinimalTaskSummary> taskSummaries, TaskSummaryImpl updateObject) {
taskSummaries.stream()
taskSummaries
.forEach(
task -> {
TaskImpl newTask = (TaskImpl) taskService.newTask(task.getWorkbasketId());

View File

@ -1,6 +1,5 @@
package pro.taskana.sampledata;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatCode;
import org.apache.ibatis.datasource.pooled.PooledDataSource;
@ -24,16 +23,4 @@ class SampleDataGeneratorTest {
pooledDataSource.forceCloseAll();
}
@Test
void tableExists() {
PooledDataSource pooledDataSource = new PooledDataSource("org.h2.Driver", JDBC_URL, "sa", "sa");
assertThatCode(() -> new DbSchemaCreator(pooledDataSource, "TASKANA").run())
.doesNotThrowAnyException();
SampleDataGenerator sampleDataGenerator = new SampleDataGenerator(pooledDataSource, "TASKANA");
assertThat(sampleDataGenerator.tableExists("TASK")).isTrue();
assertThat(sampleDataGenerator.tableExists("TASKRANDOM")).isFalse();
pooledDataSource.forceCloseAll();
}
}

View File

@ -3,7 +3,6 @@ package pro.taskana.common.rest;
import static org.assertj.core.api.Assertions.assertThat;
import java.util.List;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.ParameterizedTypeReference;
@ -20,19 +19,20 @@ import pro.taskana.common.test.rest.TaskanaSpringBootTest;
@TaskanaSpringBootTest
class TaskanaEngineControllerIntTest {
private static RestTemplate template;
@Autowired
RestHelper restHelper;
private static final RestTemplate TEMPLATE = RestHelper.TEMPLATE;
@BeforeAll
static void init() {
template = RestHelper.TEMPLATE;
private final RestHelper restHelper;
@Autowired
TaskanaEngineControllerIntTest(RestHelper restHelper) {
this.restHelper = restHelper;
}
@Test
void testDomains() {
ResponseEntity<List<String>> response =
template.exchange(
TEMPLATE.exchange(
restHelper.toUrl(Mapping.URL_DOMAIN),
HttpMethod.GET,
restHelper.defaultRequest(),
@ -43,7 +43,7 @@ class TaskanaEngineControllerIntTest {
@Test
void testClassificationTypes() {
ResponseEntity<List<String>> response =
template.exchange(
TEMPLATE.exchange(
restHelper.toUrl(Mapping.URL_CLASSIFICATION_TYPES),
HttpMethod.GET,
restHelper.defaultRequest(),
@ -54,7 +54,7 @@ class TaskanaEngineControllerIntTest {
@Test
void testClassificationCategories() {
ResponseEntity<List<String>> response =
template.exchange(
TEMPLATE.exchange(
restHelper.toUrl(Mapping.URL_CLASSIFICATION_CATEGORIES),
HttpMethod.GET,
restHelper.defaultRequest(),
@ -66,7 +66,7 @@ class TaskanaEngineControllerIntTest {
@Test
void testGetCurrentUserInfo() {
ResponseEntity<TaskanaUserInfoRepresentationModel> response =
template.exchange(
TEMPLATE.exchange(
restHelper.toUrl(Mapping.URL_CURRENT_USER),
HttpMethod.GET,
restHelper.defaultRequest(),