This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/master by this push:
new 74f539b Upgrading Flowable
74f539b is described below
commit 74f539be5a17cd7f4e6a581aa6822e2af36cf497
Author: Francesco Chicchiriccò <[email protected]>
AuthorDate: Fri Jan 24 10:50:35 2020 +0100
Upgrading Flowable
---
.../FlowableLiquibaseEnvironmentPostProcessor.java | 43 ++++++++++++++++++++++
.../core/flowable/support/DomainProcessEngine.java | 13 ++++++-
.../src/main/resources/META-INF/spring.factories | 3 ++
fit/core-reference/src/main/resources/log4j2.xml | 4 ++
pom.xml | 2 +-
5 files changed, 63 insertions(+), 2 deletions(-)
diff --git
a/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/FlowableLiquibaseEnvironmentPostProcessor.java
b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/FlowableLiquibaseEnvironmentPostProcessor.java
new file mode 100644
index 0000000..bf39105
--- /dev/null
+++
b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/FlowableLiquibaseEnvironmentPostProcessor.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.flowable;
+
+import java.util.Map;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.env.EnvironmentPostProcessor;
+import org.springframework.core.env.ConfigurableEnvironment;
+import org.springframework.core.env.MapPropertySource;
+
+/**
+ * Needed with Flowable 6.5.0 or higer.
+ *
+ * @see https://github.com/flowable/flowable-engine/issues/2142
+ */
+public class FlowableLiquibaseEnvironmentPostProcessor implements
EnvironmentPostProcessor {
+
+ private static final String LIQUIBASE_PROPERTY =
"spring.liquibase.enabled";
+
+ @Override
+ public void postProcessEnvironment(final ConfigurableEnvironment env,
final SpringApplication app) {
+ if (!env.containsProperty(LIQUIBASE_PROPERTY)) {
+ env.getPropertySources().addLast(
+ new MapPropertySource("flowable-liquibase-override",
Map.of(LIQUIBASE_PROPERTY, false)));
+ }
+ }
+}
diff --git
a/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/support/DomainProcessEngine.java
b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/support/DomainProcessEngine.java
index f78b4f0..1f08981 100644
---
a/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/support/DomainProcessEngine.java
+++
b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/support/DomainProcessEngine.java
@@ -29,6 +29,7 @@ import org.flowable.engine.IdentityService;
import org.flowable.engine.ManagementService;
import org.flowable.engine.ProcessEngine;
import org.flowable.engine.ProcessEngineConfiguration;
+import org.flowable.engine.ProcessMigrationService;
import org.flowable.engine.RepositoryService;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.TaskService;
@@ -57,7 +58,7 @@ public class DomainProcessEngine implements ProcessEngine {
@Override
public void close() {
- engines.values().forEach(ProcessEngine::close);
+ engines.get(AuthContextUtils.getDomain()).close();
}
@Override
@@ -105,6 +106,16 @@ public class DomainProcessEngine implements ProcessEngine {
return
engines.get(AuthContextUtils.getDomain()).getDynamicBpmnService();
}
+ @Override
+ public ProcessMigrationService getProcessMigrationService() {
+ return
engines.get(AuthContextUtils.getDomain()).getProcessMigrationService();
+ }
+
+ @Override
+ public void startExecutors() {
+ engines.get(AuthContextUtils.getDomain()).startExecutors();
+ }
+
public DataSource getDataSource() {
ProcessEngineImpl engine = (ProcessEngineImpl)
engines.get(AuthContextUtils.getDomain());
return engine.getProcessEngineConfiguration().getDataSource();
diff --git
a/ext/flowable/flowable-bpmn/src/main/resources/META-INF/spring.factories
b/ext/flowable/flowable-bpmn/src/main/resources/META-INF/spring.factories
index 686c490..f1adb2f 100644
--- a/ext/flowable/flowable-bpmn/src/main/resources/META-INF/spring.factories
+++ b/ext/flowable/flowable-bpmn/src/main/resources/META-INF/spring.factories
@@ -15,5 +15,8 @@
# specific language governing permissions and limitations
# under the License.
+org.springframework.boot.env.EnvironmentPostProcessor=\
+ org.apache.syncope.core.flowable.FlowableLiquibaseEnvironmentPostProcessor
+
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.apache.syncope.core.flowable.WorkflowFlowableContext
diff --git a/fit/core-reference/src/main/resources/log4j2.xml
b/fit/core-reference/src/main/resources/log4j2.xml
index 41909ed..6bc339c 100644
--- a/fit/core-reference/src/main/resources/log4j2.xml
+++ b/fit/core-reference/src/main/resources/log4j2.xml
@@ -152,6 +152,10 @@ under the License.
<appender-ref ref="mainFile"/>
<appender-ref ref="main"/>
</asyncLogger>
+ <asyncLogger name="liquibase" additivity="false" level="ERROR">
+ <appender-ref ref="mainFile"/>
+ <appender-ref ref="main"/>
+ </asyncLogger>
<asyncLogger name="org.apache.cocoon" additivity="false" level="ERROR">
<appender-ref ref="mainFile"/>
<appender-ref ref="main"/>
diff --git a/pom.xml b/pom.xml
index 2d2d86a..41090a4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -425,7 +425,7 @@ under the License.
<groovy.version>3.0.0-rc-3</groovy.version>
- <flowable.version>6.4.2</flowable.version>
+ <flowable.version>6.5.0</flowable.version>
<camel.version>3.0.1</camel.version>