提交 93d4b932 编写于 作者: M Miguel Ruiz 提交者: mergify[bot]

[AAE-785] Add application version field to processes and tasks in Activiti Core (#3001)

* AAE-785: Added appVersion, refactor, tests

* AAE-785: Fixed schema version number

* AAE-785: Increased value column size

* AAE-785: Addressed CRs
上级 d51a9c64
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
package org.activiti.runtime.api.model.impl; package org.activiti.runtime.api.model.impl;
import java.util.Objects;
import org.activiti.api.process.model.ProcessDefinition; import org.activiti.api.process.model.ProcessDefinition;
import org.activiti.api.runtime.model.impl.ProcessDefinitionImpl; import org.activiti.api.runtime.model.impl.ProcessDefinitionImpl;
import org.activiti.bpmn.model.BpmnModel; import org.activiti.bpmn.model.BpmnModel;
...@@ -37,6 +39,7 @@ public class APIProcessDefinitionConverter extends ListConverter<org.activiti.en ...@@ -37,6 +39,7 @@ public class APIProcessDefinitionConverter extends ListConverter<org.activiti.en
processDefinition.setDescription(internalProcessDefinition.getDescription()); processDefinition.setDescription(internalProcessDefinition.getDescription());
processDefinition.setVersion(internalProcessDefinition.getVersion()); processDefinition.setVersion(internalProcessDefinition.getVersion());
processDefinition.setKey(internalProcessDefinition.getKey()); processDefinition.setKey(internalProcessDefinition.getKey());
processDefinition.setAppVersion(Objects.toString(internalProcessDefinition.getAppVersion(), null));
BpmnModel model = repositoryService.getBpmnModel(internalProcessDefinition.getId()); BpmnModel model = repositoryService.getBpmnModel(internalProcessDefinition.getId());
processDefinition.setFormKey(model.getStartFormKey(internalProcessDefinition.getKey())); processDefinition.setFormKey(model.getStartFormKey(internalProcessDefinition.getKey()));
return processDefinition; return processDefinition;
......
/* /*
* Copyright 2018 Alfresco, Inc. and/or its affiliates. * Copyright 2018 Alfresco, Inc. and/or its affiliates.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
package org.activiti.runtime.api.model.impl; package org.activiti.runtime.api.model.impl;
import java.util.Objects;
import org.activiti.api.process.model.ProcessInstance; import org.activiti.api.process.model.ProcessInstance;
import org.activiti.api.runtime.model.impl.ProcessInstanceImpl; import org.activiti.api.runtime.model.impl.ProcessInstanceImpl;
...@@ -37,6 +39,7 @@ public class APIProcessInstanceConverter extends ListConverter<org.activiti.engi ...@@ -37,6 +39,7 @@ public class APIProcessInstanceConverter extends ListConverter<org.activiti.engi
processInstance.setBusinessKey(internalProcessInstance.getBusinessKey()); processInstance.setBusinessKey(internalProcessInstance.getBusinessKey());
processInstance.setStatus(calculateStatus(internalProcessInstance)); processInstance.setStatus(calculateStatus(internalProcessInstance));
processInstance.setProcessDefinitionVersion(internalProcessInstance.getProcessDefinitionVersion()); processInstance.setProcessDefinitionVersion(internalProcessInstance.getProcessDefinitionVersion());
processInstance.setAppVersion(Objects.toString(internalProcessInstance.getAppVersion(), null));
return processInstance; return processInstance;
} }
......
...@@ -28,7 +28,8 @@ import org.mockito.Mock; ...@@ -28,7 +28,8 @@ import org.mockito.Mock;
import static org.activiti.runtime.api.model.impl.MockProcessDefinitionBuilder.processDefinitionBuilderBuilder; import static org.activiti.runtime.api.model.impl.MockProcessDefinitionBuilder.processDefinitionBuilderBuilder;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.when; import static org.mockito.ArgumentMatchers.any;
import static org.mockito.BDDMockito.given;
import static org.mockito.MockitoAnnotations.initMocks; import static org.mockito.MockitoAnnotations.initMocks;
public class APIProcessDefinitionConverterTest { public class APIProcessDefinitionConverterTest {
...@@ -53,11 +54,11 @@ public class APIProcessDefinitionConverterTest { ...@@ -53,11 +54,11 @@ public class APIProcessDefinitionConverterTest {
BpmnModel model = new BpmnModel(); BpmnModel model = new BpmnModel();
model.addProcess(process); model.addProcess(process);
when(repositoryService.getBpmnModel("anId")).thenReturn(model); given(repositoryService.getBpmnModel(any())).willReturn(model);
} }
@Test @Test
public void convertFromProcessDefinitionShouldSetAllFieldsInTheConvertedProcessDefinition() { public void should_convertFromProcessDefinition_when_allFieldsAreSet() {
ProcessDefinition convertedProcessDefinition = processDefinitionConverter.from( ProcessDefinition convertedProcessDefinition = processDefinitionConverter.from(
processDefinitionBuilderBuilder() processDefinitionBuilderBuilder()
.withId("anId") .withId("anId")
...@@ -65,10 +66,10 @@ public class APIProcessDefinitionConverterTest { ...@@ -65,10 +66,10 @@ public class APIProcessDefinitionConverterTest {
.withName("Process Name") .withName("Process Name")
.withDescription("process description") .withDescription("process description")
.withVersion(3) .withVersion(3)
.withAppVersion(1)
.build() .build()
); );
//THEN
assertThat(convertedProcessDefinition) assertThat(convertedProcessDefinition)
.isNotNull() .isNotNull()
.extracting(ProcessDefinition::getId, .extracting(ProcessDefinition::getId,
...@@ -76,6 +77,7 @@ public class APIProcessDefinitionConverterTest { ...@@ -76,6 +77,7 @@ public class APIProcessDefinitionConverterTest {
ProcessDefinition::getName, ProcessDefinition::getName,
ProcessDefinition::getDescription, ProcessDefinition::getDescription,
ProcessDefinition::getVersion, ProcessDefinition::getVersion,
ProcessDefinition::getAppVersion,
ProcessDefinition::getFormKey) ProcessDefinition::getFormKey)
.containsExactly( .containsExactly(
"anId", "anId",
...@@ -83,6 +85,21 @@ public class APIProcessDefinitionConverterTest { ...@@ -83,6 +85,21 @@ public class APIProcessDefinitionConverterTest {
"Process Name", "Process Name",
"process description", "process description",
3, 3,
"1",
"AFormKey"); "AFormKey");
} }
@Test
public void should_convertProcessDefinition_when_appVersionNull() {
ProcessDefinition convertedProcessDefinition = processDefinitionConverter.from(
processDefinitionBuilderBuilder()
.withKey("processKey")
.withAppVersion(null)
.build());
assertThat(convertedProcessDefinition)
.isNotNull()
.extracting(ProcessDefinition::getAppVersion)
.isNull();
}
} }
...@@ -38,56 +38,60 @@ public class APIProcessInstanceConverterTest { ...@@ -38,56 +38,60 @@ public class APIProcessInstanceConverterTest {
private static final String PROCESS_DEFINITION_KEY = "processDefinitionKey"; private static final String PROCESS_DEFINITION_KEY = "processDefinitionKey";
private static final String PROCESS_DEFINITION_ID = "processDefinitionId"; private static final String PROCESS_DEFINITION_ID = "processDefinitionId";
private static final String PROCESS_INSTANCE_ID = "processInstanceId"; private static final String PROCESS_INSTANCE_ID = "processInstanceId";
public static final int APP_VERSION = 1;
private static final String APP_VERSION_STRING = "1";
private static final Date START_TIME = new Date();
private APIProcessInstanceConverter subject = new APIProcessInstanceConverter(); private APIProcessInstanceConverter subject = new APIProcessInstanceConverter();
private Date startTime = new Date();
@Test @Test
public void shouldConvertFromInternalProcessInstanceWithRunningStatus() { public void should_convertFromInternalProcessInstance_when_withRunningStatus() {
//given ExecutionEntity internalProcessInstance = anInternalProcessInstance(APP_VERSION);
ExecutionEntity internalProcessInstance = anInternalProcessInstance(startTime);
internalProcessInstance.setActive(true);
//when
ProcessInstance result = subject.from(internalProcessInstance); ProcessInstance result = subject.from(internalProcessInstance);
//then
assertValidProcessInstanceResult(result); assertValidProcessInstanceResult(result);
assertThat(result.getStatus()).isEqualTo(ProcessInstanceStatus.RUNNING); assertThat(result.getStatus()).isEqualTo(ProcessInstanceStatus.RUNNING);
} }
@Test @Test
public void shouldConvertFromInternalProcessInstanceWithSuspendedStatus() { public void should_convertFromInternalProcessInstance_when_withSuspendedStatus() {
//given ExecutionEntity internalProcessInstance = anInternalProcessInstance(APP_VERSION);
ExecutionEntity internalProcessInstance = anInternalProcessInstance(startTime);
internalProcessInstance.setSuspensionState(SuspensionState.SUSPENDED.getStateCode()); internalProcessInstance.setSuspensionState(SuspensionState.SUSPENDED.getStateCode());
//when
ProcessInstance result = subject.from(internalProcessInstance); ProcessInstance result = subject.from(internalProcessInstance);
//then
assertValidProcessInstanceResult(result); assertValidProcessInstanceResult(result);
assertThat(result.getStatus()).isEqualTo(ProcessInstanceStatus.SUSPENDED); assertThat(result.getStatus()).isEqualTo(ProcessInstanceStatus.SUSPENDED);
} }
@Test @Test
public void shouldConvertFromInternalProcessInstanceWithCompletedStatus() { public void should_convertFromInternalProcessInstance_when_withCompletedStatus() {
//given ExecutionEntity internalProcessInstance = anInternalProcessInstance(APP_VERSION);
ExecutionEntity internalProcessInstance = anInternalProcessInstance(startTime);
internalProcessInstance.setEnded(true); internalProcessInstance.setEnded(true);
//when
ProcessInstance result = subject.from(internalProcessInstance); ProcessInstance result = subject.from(internalProcessInstance);
//then
assertValidProcessInstanceResult(result); assertValidProcessInstanceResult(result);
assertThat(result.getStatus()).isEqualTo(ProcessInstanceStatus.COMPLETED); assertThat(result.getStatus()).isEqualTo(ProcessInstanceStatus.COMPLETED);
} }
private void assertValidProcessInstanceResult(ProcessInstance result) { @Test
public void should_convertFromInternalProcessInstance_when_appVersionIsNotSet() {
ExecutionEntity internalProcessInstance = anInternalProcessInstance(null);
ProcessInstance result = subject.from(internalProcessInstance);
assertValidProcessInstanceResult(result, null);
}
private static void assertValidProcessInstanceResult(ProcessInstance result) {
assertValidProcessInstanceResult(result, APP_VERSION_STRING);
}
private static void assertValidProcessInstanceResult(ProcessInstance result, String appVersionString) {
assertThat(result).isNotNull(); assertThat(result).isNotNull();
assertThat(result.getId()).isEqualTo(PROCESS_INSTANCE_ID); assertThat(result.getId()).isEqualTo(PROCESS_INSTANCE_ID);
assertThat(result.getBusinessKey()).isEqualTo(BUSINESS_KEY); assertThat(result.getBusinessKey()).isEqualTo(BUSINESS_KEY);
...@@ -98,10 +102,11 @@ public class APIProcessInstanceConverterTest { ...@@ -98,10 +102,11 @@ public class APIProcessInstanceConverterTest {
assertThat(result.getName()).isEqualTo(NAME); assertThat(result.getName()).isEqualTo(NAME);
assertThat(result.getParentId()).isEqualTo(PARENT_PROCESS_INSTANCE_ID); assertThat(result.getParentId()).isEqualTo(PARENT_PROCESS_INSTANCE_ID);
assertThat(result.getInitiator()).isEqualTo(START_USER_ID); assertThat(result.getInitiator()).isEqualTo(START_USER_ID);
assertThat(result.getStartDate()).isEqualTo(startTime); assertThat(result.getStartDate()).isEqualTo(START_TIME);
assertThat(result.getAppVersion()).isEqualTo(appVersionString);
} }
private ExecutionEntity anInternalProcessInstance(Date startTime) { private ExecutionEntity anInternalProcessInstance(Integer appVersion) {
ExecutionEntity internalProcessInstance = new ExecutionEntityImpl(); ExecutionEntity internalProcessInstance = new ExecutionEntityImpl();
internalProcessInstance.setId(PROCESS_INSTANCE_ID); internalProcessInstance.setId(PROCESS_INSTANCE_ID);
...@@ -113,8 +118,9 @@ public class APIProcessInstanceConverterTest { ...@@ -113,8 +118,9 @@ public class APIProcessInstanceConverterTest {
internalProcessInstance.setName(NAME); internalProcessInstance.setName(NAME);
internalProcessInstance.setDescription(DESCRIPTION); internalProcessInstance.setDescription(DESCRIPTION);
internalProcessInstance.setStartUserId(START_USER_ID); internalProcessInstance.setStartUserId(START_USER_ID);
internalProcessInstance.setStartTime(startTime); internalProcessInstance.setStartTime(START_TIME);
internalProcessInstance.setActive(true); internalProcessInstance.setActive(true);
internalProcessInstance.setAppVersion(appVersion);
return internalProcessInstance; return internalProcessInstance;
} }
......
...@@ -61,6 +61,11 @@ public class MockProcessDefinitionBuilder { ...@@ -61,6 +61,11 @@ public class MockProcessDefinitionBuilder {
return this; return this;
} }
public MockProcessDefinitionBuilder withAppVersion(Integer appVersion) {
when(processDefinition.getAppVersion()).thenReturn(appVersion);
return this;
}
public ProcessDefinition build() { public ProcessDefinition build() {
return processDefinition; return processDefinition;
} }
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
package org.activiti.runtime.api.model.impl; package org.activiti.runtime.api.model.impl;
import java.util.Objects;
import org.activiti.api.task.model.Task; import org.activiti.api.task.model.Task;
import org.activiti.api.task.model.impl.TaskImpl; import org.activiti.api.task.model.impl.TaskImpl;
import org.activiti.engine.impl.persistence.entity.TaskEntity; import org.activiti.engine.impl.persistence.entity.TaskEntity;
...@@ -45,6 +47,7 @@ public class APITaskConverter extends ListConverter<org.activiti.engine.task.Tas ...@@ -45,6 +47,7 @@ public class APITaskConverter extends ListConverter<org.activiti.engine.task.Tas
task.setPriority(internalTask.getPriority()); task.setPriority(internalTask.getPriority());
task.setFormKey(internalTask.getFormKey()); task.setFormKey(internalTask.getFormKey());
task.setTaskDefinitionKey(internalTask.getTaskDefinitionKey()); task.setTaskDefinitionKey(internalTask.getTaskDefinitionKey());
task.setAppVersion(Objects.toString(internalTask.getAppVersion(), null));
return task; return task;
} }
......
...@@ -43,8 +43,7 @@ public class APITaskConverterTest { ...@@ -43,8 +43,7 @@ public class APITaskConverterTest {
} }
@Test @Test
public void convertFromTaskShouldSetAllFieldsInTheConvertedTask() { public void should_convertTask_when_allFieldsAreSet() {
//WHEN
Date now = new Date(); Date now = new Date();
Task convertedTask = taskConverter.from( Task convertedTask = taskConverter.from(
taskBuilder() taskBuilder()
...@@ -61,10 +60,10 @@ public class APITaskConverterTest { ...@@ -61,10 +60,10 @@ public class APITaskConverterTest {
.withParentTaskId("testParentTaskId") .withParentTaskId("testParentTaskId")
.withFormKey("testFormKey") .withFormKey("testFormKey")
.withTaskDefinitionKey("taskDefinitionKey") .withTaskDefinitionKey("taskDefinitionKey")
.withAppVersion(1)
.build() .build()
); );
//THEN
assertThat(convertedTask) assertThat(convertedTask)
.isNotNull() .isNotNull()
.extracting(Task::getId, .extracting(Task::getId,
...@@ -80,7 +79,8 @@ public class APITaskConverterTest { ...@@ -80,7 +79,8 @@ public class APITaskConverterTest {
Task::getParentTaskId, Task::getParentTaskId,
Task::getFormKey, Task::getFormKey,
Task::getStatus, Task::getStatus,
Task::getTaskDefinitionKey) Task::getTaskDefinitionKey,
Task::getAppVersion)
.containsExactly("testTaskId", .containsExactly("testTaskId",
"testUser", "testUser",
"testTaskName", "testTaskName",
...@@ -94,7 +94,17 @@ public class APITaskConverterTest { ...@@ -94,7 +94,17 @@ public class APITaskConverterTest {
"testParentTaskId", "testParentTaskId",
"testFormKey", "testFormKey",
ASSIGNED, ASSIGNED,
"taskDefinitionKey"); "taskDefinitionKey",
"1");
}
@Test
public void should_convertTask_when_appVersionNull() {
Task convertedTask = taskConverter.from(taskBuilder().withAppVersion(null).build());
assertThat(convertedTask)
.isNotNull()
.extracting(Task::getAppVersion)
.isNull();
} }
@Test @Test
......
...@@ -132,6 +132,11 @@ public class MockTaskBuilder { ...@@ -132,6 +132,11 @@ public class MockTaskBuilder {
return this; return this;
} }
public MockTaskBuilder withAppVersion(Integer appVersion) {
when(task.getAppVersion()).thenReturn(appVersion);
return this;
}
public Task build() { public Task build() {
return task; return task;
} }
......
/* Licensed under the Apache License, Version 2.0 (the "License"); /* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...@@ -17,7 +17,7 @@ import org.activiti.engine.api.internal.Internal; ...@@ -17,7 +17,7 @@ import org.activiti.engine.api.internal.Internal;
/** /**
* Provides access to all the services that expose the BPM and workflow operations. * Provides access to all the services that expose the BPM and workflow operations.
* *
* <ul> * <ul>
* <li> * <li>
* <b>{@link org.activiti.engine.RuntimeService}: </b> Allows the creation of {@link org.activiti.engine.repository.Deployment}s and the starting of and searching on * <b>{@link org.activiti.engine.RuntimeService}: </b> Allows the creation of {@link org.activiti.engine.repository.Deployment}s and the starting of and searching on
...@@ -29,17 +29,17 @@ import org.activiti.engine.api.internal.Internal; ...@@ -29,17 +29,17 @@ import org.activiti.engine.api.internal.Internal;
* <li> * <li>
* <b>{@link org.activiti.engine.HistoryService}: </b> Service exposing information about ongoing and past process instances.</li> * <b>{@link org.activiti.engine.HistoryService}: </b> Service exposing information about ongoing and past process instances.</li>
* </ul> * </ul>
* *
* Typically, there will be only one central ProcessEngine instance needed in a end-user application. Building a ProcessEngine is done through a {@link ProcessEngineConfiguration} instance and is a * Typically, there will be only one central ProcessEngine instance needed in a end-user application. Building a ProcessEngine is done through a {@link ProcessEngineConfiguration} instance and is a
* costly operation which should be avoided. For that purpose, it is advised to store it in a static field or JNDI location (or something similar). This is a thread-safe object, so no special * costly operation which should be avoided. For that purpose, it is advised to store it in a static field or JNDI location (or something similar). This is a thread-safe object, so no special
* precautions need to be taken. * precautions need to be taken.
* *
*/ */
@Internal @Internal
public interface ProcessEngine { public interface ProcessEngine {
/** the version of the activiti library */ /** the version of the activiti library */
public static String VERSION = "7.1.0.0"; // Note the extra .x at the end. To cater for snapshot releases with different database changes public static String VERSION = "7.1.0-M6"; // Note the extra -x at the end. To cater for snapshot releases with different database changes
/** /**
* The name as specified in 'process-engine-name' in the activiti.cfg.xml configuration file. The default name for a process engine is 'default * The name as specified in 'process-engine-name' in the activiti.cfg.xml configuration file. The default name for a process engine is 'default
...@@ -47,7 +47,7 @@ public interface ProcessEngine { ...@@ -47,7 +47,7 @@ public interface ProcessEngine {
String getName(); String getName();
void close(); void close();
RepositoryService getRepositoryService(); RepositoryService getRepositoryService();
RuntimeService getRuntimeService(); RuntimeService getRuntimeService();
...@@ -57,7 +57,7 @@ public interface ProcessEngine { ...@@ -57,7 +57,7 @@ public interface ProcessEngine {
HistoryService getHistoryService(); HistoryService getHistoryService();
ManagementService getManagementService(); ManagementService getManagementService();
DynamicBpmnService getDynamicBpmnService(); DynamicBpmnService getDynamicBpmnService();
ProcessEngineConfiguration getProcessEngineConfiguration(); ProcessEngineConfiguration getProcessEngineConfiguration();
......
/* Licensed under the Apache License, Version 2.0 (the "License"); /* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...@@ -20,7 +20,7 @@ import org.activiti.bpmn.model.FlowElement; ...@@ -20,7 +20,7 @@ import org.activiti.bpmn.model.FlowElement;
/** /**
* Execution used in {@link JavaDelegate}s and {@link ExecutionListener}s. * Execution used in {@link JavaDelegate}s and {@link ExecutionListener}s.
* *
*/ */
...@@ -33,7 +33,7 @@ public interface DelegateExecution extends VariableScope { ...@@ -33,7 +33,7 @@ public interface DelegateExecution extends VariableScope {
/** Reference to the overall process instance */ /** Reference to the overall process instance */
String getProcessInstanceId(); String getProcessInstanceId();
/** /**
* The 'root' process instance. When using call activity for example, the processInstance * The 'root' process instance. When using call activity for example, the processInstance
* set will not always be the root. This method returns the topmost process instance. * set will not always be the root. This method returns the topmost process instance.
...@@ -44,9 +44,9 @@ public interface DelegateExecution extends VariableScope { ...@@ -44,9 +44,9 @@ public interface DelegateExecution extends VariableScope {
* Will contain the event name in case this execution is passed in for an {@link ExecutionListener}. * Will contain the event name in case this execution is passed in for an {@link ExecutionListener}.
*/ */
String getEventName(); String getEventName();
/** /**
* Sets the current event (typically when execution an {@link ExecutionListener}). * Sets the current event (typically when execution an {@link ExecutionListener}).
*/ */
void setEventName(String eventName); void setEventName(String eventName);
...@@ -79,26 +79,26 @@ public interface DelegateExecution extends VariableScope { ...@@ -79,26 +79,26 @@ public interface DelegateExecution extends VariableScope {
* Returns the tenant id, if any is set before on the process definition or process instance. * Returns the tenant id, if any is set before on the process definition or process instance.
*/ */
String getTenantId(); String getTenantId();
/** /**
* The BPMN element where the execution currently is at. * The BPMN element where the execution currently is at.
*/ */
FlowElement getCurrentFlowElement(); FlowElement getCurrentFlowElement();
/** /**
* Change the current BPMN element the execution is at. * Change the current BPMN element the execution is at.
*/ */
void setCurrentFlowElement(FlowElement flowElement); void setCurrentFlowElement(FlowElement flowElement);
/** /**
* Returns the {@link ActivitiListener} instance matching an {@link ExecutionListener} * Returns the {@link ActivitiListener} instance matching an {@link ExecutionListener}
* if currently an execution listener is being execution. * if currently an execution listener is being execution.
* Returns null otherwise. * Returns null otherwise.
*/ */
ActivitiListener getCurrentActivitiListener(); ActivitiListener getCurrentActivitiListener();
/** /**
* Called when an {@link ExecutionListener} is being executed. * Called when an {@link ExecutionListener} is being executed.
*/ */
void setCurrentActivitiListener(ActivitiListener currentActivitiListener); void setCurrentActivitiListener(ActivitiListener currentActivitiListener);
...@@ -160,12 +160,12 @@ public interface DelegateExecution extends VariableScope { ...@@ -160,12 +160,12 @@ public interface DelegateExecution extends VariableScope {
* Changes whether this execution is a scope or not. * Changes whether this execution is a scope or not.
*/ */
void setScope(boolean isScope); void setScope(boolean isScope);
/** /**
* Returns whather this execution is the root of a multi instance execution. * Returns whather this execution is the root of a multi instance execution.
*/ */
boolean isMultiInstanceRoot(); boolean isMultiInstanceRoot();
/** /**
* Changes whether this execution is a multi instance root or not. * Changes whether this execution is a multi instance root or not.
* @param isMultiInstanceRoot * @param isMultiInstanceRoot
......
/* Licensed under the Apache License, Version 2.0 (the "License"); /* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...@@ -55,7 +55,7 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior { ...@@ -55,7 +55,7 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final Logger LOGGER = LoggerFactory.getLogger(UserTaskActivityBehavior.class); private static final Logger LOGGER = LoggerFactory.getLogger(UserTaskActivityBehavior.class);
protected UserTask userTask; protected UserTask userTask;
public UserTaskActivityBehavior(UserTask userTask) { public UserTaskActivityBehavior(UserTask userTask) {
...@@ -65,9 +65,10 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior { ...@@ -65,9 +65,10 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior {
public void execute(DelegateExecution execution) { public void execute(DelegateExecution execution) {
CommandContext commandContext = Context.getCommandContext(); CommandContext commandContext = Context.getCommandContext();
TaskEntityManager taskEntityManager = commandContext.getTaskEntityManager(); TaskEntityManager taskEntityManager = commandContext.getTaskEntityManager();
TaskEntity task = taskEntityManager.create(); TaskEntity task = taskEntityManager.create();
task.setExecution((ExecutionEntity) execution); ExecutionEntity executionEntity = (ExecutionEntity) execution;
task.setExecution(executionEntity);
task.setTaskDefinitionKey(userTask.getId()); task.setTaskDefinitionKey(userTask.getId());
String activeTaskName = null; String activeTaskName = null;
...@@ -81,10 +82,10 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior { ...@@ -81,10 +82,10 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior {
String activeTaskOwner = null; String activeTaskOwner = null;
List<String> activeTaskCandidateUsers = null; List<String> activeTaskCandidateUsers = null;
List<String> activeTaskCandidateGroups = null; List<String> activeTaskCandidateGroups = null;
ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration(); ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
ExpressionManager expressionManager = processEngineConfiguration.getExpressionManager(); ExpressionManager expressionManager = processEngineConfiguration.getExpressionManager();
if (Context.getProcessEngineConfiguration().isEnableProcessDefinitionInfoCache()) { if (Context.getProcessEngineConfiguration().isEnableProcessDefinitionInfoCache()) {
ObjectNode taskElementProperties = Context.getBpmnOverrideElementProperties(userTask.getId(), execution.getProcessDefinitionId()); ObjectNode taskElementProperties = Context.getBpmnOverrideElementProperties(userTask.getId(), execution.getProcessDefinitionId());
activeTaskName = getActiveValue(userTask.getName(), DynamicBpmnConstants.USER_TASK_NAME, taskElementProperties); activeTaskName = getActiveValue(userTask.getName(), DynamicBpmnConstants.USER_TASK_NAME, taskElementProperties);
...@@ -98,7 +99,7 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior { ...@@ -98,7 +99,7 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior {
activeTaskOwner = getActiveValue(userTask.getOwner(), DynamicBpmnConstants.USER_TASK_OWNER, taskElementProperties); activeTaskOwner = getActiveValue(userTask.getOwner(), DynamicBpmnConstants.USER_TASK_OWNER, taskElementProperties);
activeTaskCandidateUsers = getActiveValueList(userTask.getCandidateUsers(), DynamicBpmnConstants.USER_TASK_CANDIDATE_USERS, taskElementProperties); activeTaskCandidateUsers = getActiveValueList(userTask.getCandidateUsers(), DynamicBpmnConstants.USER_TASK_CANDIDATE_USERS, taskElementProperties);
activeTaskCandidateGroups = getActiveValueList(userTask.getCandidateGroups(), DynamicBpmnConstants.USER_TASK_CANDIDATE_GROUPS, taskElementProperties); activeTaskCandidateGroups = getActiveValueList(userTask.getCandidateGroups(), DynamicBpmnConstants.USER_TASK_CANDIDATE_GROUPS, taskElementProperties);
} else { } else {
activeTaskName = userTask.getName(); activeTaskName = userTask.getName();
activeTaskDescription = userTask.getDocumentation(); activeTaskDescription = userTask.getDocumentation();
...@@ -123,7 +124,7 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior { ...@@ -123,7 +124,7 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior {
} }
task.setName(name); task.setName(name);
} }
if (StringUtils.isNotEmpty(activeTaskDescription)) { if (StringUtils.isNotEmpty(activeTaskDescription)) {
String description = null; String description = null;
try { try {
...@@ -147,17 +148,17 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior { ...@@ -147,17 +148,17 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior {
} else { } else {
businessCalendarName = DueDateBusinessCalendar.NAME; businessCalendarName = DueDateBusinessCalendar.NAME;
} }
BusinessCalendar businessCalendar = Context.getProcessEngineConfiguration().getBusinessCalendarManager() BusinessCalendar businessCalendar = Context.getProcessEngineConfiguration().getBusinessCalendarManager()
.getBusinessCalendar(businessCalendarName); .getBusinessCalendar(businessCalendarName);
task.setDueDate(businessCalendar.resolveDuedate((String) dueDate)); task.setDueDate(businessCalendar.resolveDuedate((String) dueDate));
} else { } else {
throw new ActivitiIllegalArgumentException("Due date expression does not resolve to a Date or Date string: " + activeTaskDueDate); throw new ActivitiIllegalArgumentException("Due date expression does not resolve to a Date or Date string: " + activeTaskDueDate);
} }
} }
} }
if (StringUtils.isNotEmpty(activeTaskPriority)) { if (StringUtils.isNotEmpty(activeTaskPriority)) {
final Object priority = expressionManager.createExpression(activeTaskPriority).getValue(execution); final Object priority = expressionManager.createExpression(activeTaskPriority).getValue(execution);
if (priority != null) { if (priority != null) {
...@@ -185,7 +186,7 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior { ...@@ -185,7 +186,7 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior {
} }
} }
} }
if (StringUtils.isNotEmpty(activeTaskFormKey)) { if (StringUtils.isNotEmpty(activeTaskFormKey)) {
final Object formKey = expressionManager.createExpression(activeTaskFormKey).getValue(execution); final Object formKey = expressionManager.createExpression(activeTaskFormKey).getValue(execution);
if (formKey != null) { if (formKey != null) {
...@@ -197,26 +198,27 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior { ...@@ -197,26 +198,27 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior {
} }
} }
task.setAppVersion(executionEntity.getProcessInstance().getAppVersion());
taskEntityManager.insert(task, (ExecutionEntity) execution); taskEntityManager.insert(task, executionEntity);
task.setVariablesLocal(calculateInputVariables(execution)); task.setVariablesLocal(calculateInputVariables(execution));
boolean skipUserTask = false; boolean skipUserTask = false;
if (StringUtils.isNotEmpty(activeTaskSkipExpression)) { if (StringUtils.isNotEmpty(activeTaskSkipExpression)) {
Expression skipExpression = expressionManager.createExpression(activeTaskSkipExpression); Expression skipExpression = expressionManager.createExpression(activeTaskSkipExpression);
skipUserTask = SkipExpressionUtil.isSkipExpressionEnabled(execution, skipExpression) skipUserTask = SkipExpressionUtil.isSkipExpressionEnabled(execution, skipExpression)
&& SkipExpressionUtil.shouldSkipFlowElement(execution, skipExpression); && SkipExpressionUtil.shouldSkipFlowElement(execution, skipExpression);
} }
// Handling assignments need to be done after the task is inserted, to have an id // Handling assignments need to be done after the task is inserted, to have an id
if (!skipUserTask) { if (!skipUserTask) {
handleAssignments(taskEntityManager, activeTaskAssignee, activeTaskOwner, handleAssignments(taskEntityManager, activeTaskAssignee, activeTaskOwner,
activeTaskCandidateUsers, activeTaskCandidateGroups, task, expressionManager, execution); activeTaskCandidateUsers, activeTaskCandidateGroups, task, expressionManager, execution);
} }
processEngineConfiguration.getListenerNotificationHelper().executeTaskListeners(task, TaskListener.EVENTNAME_CREATE); processEngineConfiguration.getListenerNotificationHelper().executeTaskListeners(task, TaskListener.EVENTNAME_CREATE);
// All properties set, now fire events // All properties set, now fire events
if (Context.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) { if (Context.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) {
ActivitiEventDispatcher eventDispatcher = Context.getProcessEngineConfiguration().getEventDispatcher(); ActivitiEventDispatcher eventDispatcher = Context.getProcessEngineConfiguration().getEventDispatcher();
...@@ -227,7 +229,7 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior { ...@@ -227,7 +229,7 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior {
ActivitiEventBuilder.createEntityEvent(ActivitiEventType.TASK_ASSIGNED, task)); ActivitiEventBuilder.createEntityEvent(ActivitiEventType.TASK_ASSIGNED, task));
} }
} }
if (skipUserTask) { if (skipUserTask) {
taskEntityManager.deleteTask(task, null, false, false); taskEntityManager.deleteTask(task, null, false, false);
leave(execution); leave(execution);
...@@ -243,7 +245,7 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior { ...@@ -243,7 +245,7 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior {
return Collections.emptyMap(); return Collections.emptyMap();
} }
} }
protected Map<String, Object> calculateOutBoundVariables(DelegateExecution execution, protected Map<String, Object> calculateOutBoundVariables(DelegateExecution execution,
Map<String, Object> taskVariables) { Map<String, Object> taskVariables) {
CommandContext commandContext = Context.getCommandContext(); CommandContext commandContext = Context.getCommandContext();
...@@ -255,7 +257,7 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior { ...@@ -255,7 +257,7 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior {
public void trigger(DelegateExecution execution, String signalName, Object signalData) { public void trigger(DelegateExecution execution, String signalName, Object signalData) {
CommandContext commandContext = Context.getCommandContext(); CommandContext commandContext = Context.getCommandContext();
TaskEntityManager taskEntityManager = commandContext.getTaskEntityManager(); TaskEntityManager taskEntityManager = commandContext.getTaskEntityManager();
List<TaskEntity> taskEntities = taskEntityManager.findTasksByExecutionId(execution.getId()); // Should be only one List<TaskEntity> taskEntities = taskEntityManager.findTasksByExecutionId(execution.getId()); // Should be only one
for (TaskEntity taskEntity : taskEntities) { for (TaskEntity taskEntity : taskEntities) {
...@@ -292,7 +294,7 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior { ...@@ -292,7 +294,7 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior {
@SuppressWarnings({ "unchecked", "rawtypes" }) @SuppressWarnings({ "unchecked", "rawtypes" })
protected void handleAssignments(TaskEntityManager taskEntityManager, String assignee, String owner, List<String> candidateUsers, protected void handleAssignments(TaskEntityManager taskEntityManager, String assignee, String owner, List<String> candidateUsers,
List<String> candidateGroups, TaskEntity task, ExpressionManager expressionManager, DelegateExecution execution) { List<String> candidateGroups, TaskEntity task, ExpressionManager expressionManager, DelegateExecution execution) {
if (StringUtils.isNotEmpty(assignee)) { if (StringUtils.isNotEmpty(assignee)) {
Object assigneeExpressionValue = expressionManager.createExpression(assignee).getValue(execution); Object assigneeExpressionValue = expressionManager.createExpression(assignee).getValue(execution);
String assigneeValue = null; String assigneeValue = null;
...@@ -342,9 +344,9 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior { ...@@ -342,9 +344,9 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior {
} }
} }
} }
if (userTask.getCustomUserIdentityLinks() != null && !userTask.getCustomUserIdentityLinks().isEmpty()) { if (userTask.getCustomUserIdentityLinks() != null && !userTask.getCustomUserIdentityLinks().isEmpty()) {
for (String customUserIdentityLinkType : userTask.getCustomUserIdentityLinks().keySet()) { for (String customUserIdentityLinkType : userTask.getCustomUserIdentityLinks().keySet()) {
for (String userIdentityLink : userTask.getCustomUserIdentityLinks().get(customUserIdentityLinkType)) { for (String userIdentityLink : userTask.getCustomUserIdentityLinks().get(customUserIdentityLinkType)) {
Expression idExpression = expressionManager.createExpression(userIdentityLink); Expression idExpression = expressionManager.createExpression(userIdentityLink);
...@@ -362,17 +364,17 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior { ...@@ -362,17 +364,17 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior {
} else { } else {
throw new ActivitiException("Expression did not resolve to a string or collection of strings"); throw new ActivitiException("Expression did not resolve to a string or collection of strings");
} }
} }
} }
} }
if (userTask.getCustomGroupIdentityLinks() != null && !userTask.getCustomGroupIdentityLinks().isEmpty()) { if (userTask.getCustomGroupIdentityLinks() != null && !userTask.getCustomGroupIdentityLinks().isEmpty()) {
for (String customGroupIdentityLinkType : userTask.getCustomGroupIdentityLinks().keySet()) { for (String customGroupIdentityLinkType : userTask.getCustomGroupIdentityLinks().keySet()) {
for (String groupIdentityLink : userTask.getCustomGroupIdentityLinks().get(customGroupIdentityLinkType)) { for (String groupIdentityLink : userTask.getCustomGroupIdentityLinks().get(customGroupIdentityLinkType)) {
Expression idExpression = expressionManager.createExpression(groupIdentityLink); Expression idExpression = expressionManager.createExpression(groupIdentityLink);
Object value = idExpression.getValue(execution); Object value = idExpression.getValue(execution);
if (value instanceof String) { if (value instanceof String) {
...@@ -388,17 +390,17 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior { ...@@ -388,17 +390,17 @@ public class UserTaskActivityBehavior extends TaskActivityBehavior {
} else { } else {
throw new ActivitiException("Expression did not resolve to a string or collection of strings"); throw new ActivitiException("Expression did not resolve to a string or collection of strings");
} }
} }
} }
} }
} }
/** /**
* Extract a candidate list from a string. * Extract a candidate list from a string.
* *
* @param str * @param str
* @return * @return
*/ */
......
...@@ -80,6 +80,8 @@ public class BpmnDeployer implements Deployer { ...@@ -80,6 +80,8 @@ public class BpmnDeployer implements Deployer {
getPreviousVersionsOfProcessDefinitions(parsedDeployment); getPreviousVersionsOfProcessDefinitions(parsedDeployment);
setProcessDefinitionVersionsAndIds(parsedDeployment, setProcessDefinitionVersionsAndIds(parsedDeployment,
mapOfNewProcessDefinitionToPreviousVersion); mapOfNewProcessDefinitionToPreviousVersion);
setProcessDefinitionAppVersion(parsedDeployment);
persistProcessDefinitionsAndAuthorizations(parsedDeployment); persistProcessDefinitionsAndAuthorizations(parsedDeployment);
updateTimersAndEvents(parsedDeployment, updateTimersAndEvents(parsedDeployment,
mapOfNewProcessDefinitionToPreviousVersion); mapOfNewProcessDefinitionToPreviousVersion);
...@@ -437,6 +439,15 @@ public class BpmnDeployer implements Deployer { ...@@ -437,6 +439,15 @@ public class BpmnDeployer implements Deployer {
return isEqual; return isEqual;
} }
private void setProcessDefinitionAppVersion(ParsedDeployment parsedDeployment) {
if (parsedDeployment.getDeployment().getProjectReleaseVersion() != null) {
Integer version = parsedDeployment.getDeployment().getVersion();
for (ProcessDefinitionEntity processDefinition : parsedDeployment.getAllProcessDefinitions()) {
processDefinition.setAppVersion(version);
}
}
}
protected boolean localizeDataObjectElements(List<ValuedDataObject> dataObjects, protected boolean localizeDataObjectElements(List<ValuedDataObject> dataObjects,
ObjectNode infoNode) { ObjectNode infoNode) {
boolean localizationValuesChanged = false; boolean localizationValuesChanged = false;
......
...@@ -82,7 +82,7 @@ public class DeployCmd<T> implements Command<Deployment>, Serializable { ...@@ -82,7 +82,7 @@ public class DeployCmd<T> implements Command<Deployment>, Serializable {
existingDeployment)) { existingDeployment)) {
return existingDeployment; return existingDeployment;
} else { } else {
deployment.setVersion(existingDeployment.getVersion() != null? existingDeployment.getVersion() + 1 : 2); deployment.setVersion(existingDeployment.getVersion() + 1);
} }
} }
} }
......
/* Licensed under the Apache License, Version 2.0 (the "License"); /* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...@@ -13,30 +13,37 @@ ...@@ -13,30 +13,37 @@
package org.activiti.engine.impl.cmd; package org.activiti.engine.impl.cmd;
import java.io.Serializable; import java.io.Serializable;
import java.util.Optional;
import org.activiti.engine.impl.interceptor.Command; import org.activiti.engine.impl.interceptor.Command;
import org.activiti.engine.impl.interceptor.CommandContext; import org.activiti.engine.impl.interceptor.CommandContext;
import org.activiti.engine.impl.persistence.entity.DeploymentEntity;
import org.activiti.engine.impl.persistence.entity.DeploymentEntityManager;
import org.activiti.engine.impl.persistence.entity.TaskEntity; import org.activiti.engine.impl.persistence.entity.TaskEntity;
import org.activiti.engine.task.Task; import org.activiti.engine.task.Task;
/**
*/
public class NewTaskCmd implements Command<Task>, Serializable { public class NewTaskCmd implements Command<Task>, Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
protected String taskId; private final String taskId;
public NewTaskCmd(String taskId) { public NewTaskCmd(String taskId) {
this.taskId = taskId; this.taskId = taskId;
} }
public Task execute(CommandContext commandContext) { public Task execute(CommandContext commandContext) {
TaskEntity task = commandContext.getTaskEntityManager().create(); TaskEntity task = commandContext.getTaskEntityManager().create();
task.setId(taskId); task.setId(taskId);
task.setRevision(0); task.setRevision(0);
return task; findAppVersionFromDeployment(commandContext.getDeploymentEntityManager())
} .ifPresent(task::setAppVersion);
return task;
}
private Optional<Integer> findAppVersionFromDeployment(DeploymentEntityManager deploymentEntityManager) {
DeploymentEntity deployment = deploymentEntityManager.findLatestDeploymentByName("SpringAutoDeployment");
return Optional.ofNullable(deployment)
.map(DeploymentEntity::getVersion);
}
} }
/* Licensed under the Apache License, Version 2.0 (the "License"); /* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...@@ -32,8 +32,6 @@ import java.util.LinkedHashMap; ...@@ -32,8 +32,6 @@ import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.activiti.engine.ActivitiException; import org.activiti.engine.ActivitiException;
import org.activiti.engine.ActivitiOptimisticLockingException; import org.activiti.engine.ActivitiOptimisticLockingException;
...@@ -68,16 +66,10 @@ import org.apache.ibatis.session.SqlSession; ...@@ -68,16 +66,10 @@ import org.apache.ibatis.session.SqlSession;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
/**
*/
public class DbSqlSession implements Session { public class DbSqlSession implements Session {
private static final Logger log = LoggerFactory.getLogger(DbSqlSession.class); private static final Logger log = LoggerFactory.getLogger(DbSqlSession.class);
protected static final Pattern CLEAN_VERSION_REGEX = Pattern.compile("\\d\\.\\d*");
protected static final String LAST_V5_VERSION = "5.99.0.0"; protected static final String LAST_V5_VERSION = "5.99.0.0";
protected static final List<ActivitiVersion> ACTIVITI_VERSIONS = new ArrayList<ActivitiVersion>(); protected static final List<ActivitiVersion> ACTIVITI_VERSIONS = new ArrayList<ActivitiVersion>();
...@@ -118,11 +110,11 @@ public class DbSqlSession implements Session { ...@@ -118,11 +110,11 @@ public class DbSqlSession implements Session {
ACTIVITI_VERSIONS.add(new ActivitiVersion("5.20.0.1")); ACTIVITI_VERSIONS.add(new ActivitiVersion("5.20.0.1"));
ACTIVITI_VERSIONS.add(new ActivitiVersion("5.20.0.2")); ACTIVITI_VERSIONS.add(new ActivitiVersion("5.20.0.2"));
ACTIVITI_VERSIONS.add(new ActivitiVersion("5.21.0.0")); ACTIVITI_VERSIONS.add(new ActivitiVersion("5.21.0.0"));
/* /*
* Version 5.18.0.1 is the latest v5 version in the list here, although if you would look at the v5 code, * Version 5.18.0.1 is the latest v5 version in the list here, although if you would look at the v5 code,
* you'll see there are a few other releases afterwards. * you'll see there are a few other releases afterwards.
* *
* The reasoning is as follows: after 5.18.0.1, no database changes were done anymore. * The reasoning is as follows: after 5.18.0.1, no database changes were done anymore.
* And if there would be database changes, they would have been part of both 5.x _and_ 6.x upgrade scripts. * And if there would be database changes, they would have been part of both 5.x _and_ 6.x upgrade scripts.
* The logic below will assume it's one of these releases in case it isn't found in the list here * The logic below will assume it's one of these releases in case it isn't found in the list here
...@@ -141,6 +133,7 @@ public class DbSqlSession implements Session { ...@@ -141,6 +133,7 @@ public class DbSqlSession implements Session {
// Version 7 // Version 7
ACTIVITI_VERSIONS.add(new ActivitiVersion("7.0.0.0")); ACTIVITI_VERSIONS.add(new ActivitiVersion("7.0.0.0"));
ACTIVITI_VERSIONS.add(new ActivitiVersion("7.1.0.0"));
/* Current */ /* Current */
ACTIVITI_VERSIONS.add(new ActivitiVersion(ProcessEngine.VERSION)); ACTIVITI_VERSIONS.add(new ActivitiVersion(ProcessEngine.VERSION));
...@@ -1191,49 +1184,6 @@ public class DbSqlSession implements Session { ...@@ -1191,49 +1184,6 @@ public class DbSqlSession implements Session {
} }
} }
protected boolean isUpgradeNeeded(String versionInDatabase) {
if (ProcessEngine.VERSION.equals(versionInDatabase)) {
return false;
}
String cleanDbVersion = getCleanVersion(versionInDatabase);
String[] cleanDbVersionSplitted = cleanDbVersion.split("\\.");
int dbMajorVersion = Integer.valueOf(cleanDbVersionSplitted[0]);
int dbMinorVersion = Integer.valueOf(cleanDbVersionSplitted[1]);
String cleanEngineVersion = getCleanVersion(ProcessEngine.VERSION);
String[] cleanEngineVersionSplitted = cleanEngineVersion.split("\\.");
int engineMajorVersion = Integer.valueOf(cleanEngineVersionSplitted[0]);
int engineMinorVersion = Integer.valueOf(cleanEngineVersionSplitted[1]);
if ((dbMajorVersion > engineMajorVersion) || ((dbMajorVersion <= engineMajorVersion) && (dbMinorVersion > engineMinorVersion))) {
throw new ActivitiException("Version of activiti database (" + versionInDatabase + ") is more recent than the engine (" + ProcessEngine.VERSION + ")");
} else if (cleanDbVersion.compareTo(cleanEngineVersion) == 0) {
// Versions don't match exactly, possibly snapshot is being used
log.warn("Engine-version is the same, but not an exact match: {} vs. {}. Not performing database-upgrade.",
versionInDatabase,
ProcessEngine.VERSION);
return false;
}
return true;
}
protected String getCleanVersion(String versionString) {
Matcher matcher = CLEAN_VERSION_REGEX.matcher(versionString);
if (!matcher.find()) {
throw new ActivitiException("Illegal format for version: " + versionString);
}
String cleanString = matcher.group();
try {
Double.parseDouble(cleanString); // try to parse it, to see if it is
// really a number
return cleanString;
} catch (NumberFormatException nfe) {
throw new ActivitiException("Illegal format for version: " + versionString);
}
}
protected String prependDatabaseTablePrefix(String tableName) { protected String prependDatabaseTablePrefix(String tableName) {
return dbSqlSessionFactory.getDatabaseTablePrefix() + tableName; return dbSqlSessionFactory.getDatabaseTablePrefix() + tableName;
} }
......
/* Licensed under the Apache License, Version 2.0 (the "License"); /* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...@@ -22,11 +22,9 @@ import org.activiti.engine.impl.db.HasRevision; ...@@ -22,11 +22,9 @@ import org.activiti.engine.impl.db.HasRevision;
import org.activiti.engine.runtime.Execution; import org.activiti.engine.runtime.Execution;
import org.activiti.engine.runtime.ProcessInstance; import org.activiti.engine.runtime.ProcessInstance;
/**
*/
@Internal @Internal
public interface ExecutionEntity extends DelegateExecution, Execution, ProcessInstance, Entity, HasRevision { public interface ExecutionEntity extends DelegateExecution, Execution, ProcessInstance, Entity, HasRevision {
void setBusinessKey(String businessKey); void setBusinessKey(String businessKey);
void setProcessDefinitionId(String processDefinitionId); void setProcessDefinitionId(String processDefinitionId);
...@@ -42,7 +40,7 @@ public interface ExecutionEntity extends DelegateExecution, Execution, ProcessIn ...@@ -42,7 +40,7 @@ public interface ExecutionEntity extends DelegateExecution, Execution, ProcessIn
ExecutionEntity getProcessInstance(); ExecutionEntity getProcessInstance();
void setProcessInstance(ExecutionEntity processInstance); void setProcessInstance(ExecutionEntity processInstance);
ExecutionEntity getParent(); ExecutionEntity getParent();
void setParent(ExecutionEntity parent); void setParent(ExecutionEntity parent);
...@@ -56,25 +54,25 @@ public interface ExecutionEntity extends DelegateExecution, Execution, ProcessIn ...@@ -56,25 +54,25 @@ public interface ExecutionEntity extends DelegateExecution, Execution, ProcessIn
void setSubProcessInstance(ExecutionEntity subProcessInstance); void setSubProcessInstance(ExecutionEntity subProcessInstance);
void setRootProcessInstanceId(String rootProcessInstanceId); void setRootProcessInstanceId(String rootProcessInstanceId);
public void setParentProcessInstanceId(String parentProcessInstanceId); public void setParentProcessInstanceId(String parentProcessInstanceId);
ExecutionEntity getRootProcessInstance(); ExecutionEntity getRootProcessInstance();
void setRootProcessInstance(ExecutionEntity rootProcessInstance); void setRootProcessInstance(ExecutionEntity rootProcessInstance);
List<? extends ExecutionEntity> getExecutions(); List<? extends ExecutionEntity> getExecutions();
void addChildExecution(ExecutionEntity executionEntity); void addChildExecution(ExecutionEntity executionEntity);
List<TaskEntity> getTasks(); List<TaskEntity> getTasks();
List<EventSubscriptionEntity> getEventSubscriptions(); List<EventSubscriptionEntity> getEventSubscriptions();
List<JobEntity> getJobs(); List<JobEntity> getJobs();
List<TimerJobEntity> getTimerJobs(); List<TimerJobEntity> getTimerJobs();
List<IdentityLinkEntity> getIdentityLinks(); List<IdentityLinkEntity> getIdentityLinks();
void setProcessInstanceId(String processInstanceId); void setProcessInstanceId(String processInstanceId);
...@@ -96,19 +94,19 @@ public interface ExecutionEntity extends DelegateExecution, Execution, ProcessIn ...@@ -96,19 +94,19 @@ public interface ExecutionEntity extends DelegateExecution, Execution, ProcessIn
boolean isEventScope(); boolean isEventScope();
void setEventScope(boolean isEventScope); void setEventScope(boolean isEventScope);
boolean isMultiInstanceRoot(); boolean isMultiInstanceRoot();
void setMultiInstanceRoot(boolean isMultiInstanceRoot); void setMultiInstanceRoot(boolean isMultiInstanceRoot);
void setName(String name); void setName(String name);
void setDescription(String description); void setDescription(String description);
void setLocalizedName(String localizedName); void setLocalizedName(String localizedName);
void setLocalizedDescription(String localizedDescription); void setLocalizedDescription(String localizedDescription);
void setTenantId(String tenantId); void setTenantId(String tenantId);
Date getLockTime(); Date getLockTime();
...@@ -118,7 +116,7 @@ public interface ExecutionEntity extends DelegateExecution, Execution, ProcessIn ...@@ -118,7 +116,7 @@ public interface ExecutionEntity extends DelegateExecution, Execution, ProcessIn
boolean isDeleted(); boolean isDeleted();
void setDeleted(boolean isDeleted); void setDeleted(boolean isDeleted);
void forceUpdate(); void forceUpdate();
String getStartUserId(); String getStartUserId();
...@@ -128,5 +126,5 @@ public interface ExecutionEntity extends DelegateExecution, Execution, ProcessIn ...@@ -128,5 +126,5 @@ public interface ExecutionEntity extends DelegateExecution, Execution, ProcessIn
Date getStartTime(); Date getStartTime();
void setStartTime(Date startTime); void setStartTime(Date startTime);
} }
/* Licensed under the Apache License, Version 2.0 (the "License"); /* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...@@ -31,21 +31,13 @@ import org.activiti.engine.impl.interceptor.CommandContext; ...@@ -31,21 +31,13 @@ import org.activiti.engine.impl.interceptor.CommandContext;
import org.activiti.engine.impl.persistence.CountingExecutionEntity; import org.activiti.engine.impl.persistence.CountingExecutionEntity;
import org.activiti.engine.impl.util.ProcessDefinitionUtil; import org.activiti.engine.impl.util.ProcessDefinitionUtil;
/**
*/
public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionEntity, CountingExecutionEntity { public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionEntity, CountingExecutionEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// current position ///////////////////////////////////////////////////////// // current position /////////////////////////////////////////////////////////
protected FlowElement currentFlowElement; protected FlowElement currentFlowElement;
protected ActivitiListener currentActivitiListener; // Only set when executing an execution listener protected ActivitiListener currentActivitiListener; // Only set when executing an execution listener
/** /**
...@@ -75,7 +67,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -75,7 +67,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
protected Date lockTime; protected Date lockTime;
// state/type of execution ////////////////////////////////////////////////// // state/type of execution //////////////////////////////////////////////////
protected boolean isActive = true; protected boolean isActive = true;
protected boolean isScope = true; protected boolean isScope = true;
protected boolean isConcurrent; protected boolean isConcurrent;
...@@ -85,7 +77,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -85,7 +77,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
protected boolean isCountEnabled; protected boolean isCountEnabled;
// events /////////////////////////////////////////////////////////////////// // events ///////////////////////////////////////////////////////////////////
// TODO: still needed in v6? // TODO: still needed in v6?
protected String eventName; protected String eventName;
...@@ -102,13 +94,13 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -102,13 +94,13 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
// cascade deletion //////////////////////////////////////////////////////// // cascade deletion ////////////////////////////////////////////////////////
protected String deleteReason; protected String deleteReason;
protected int suspensionState = SuspensionState.ACTIVE.getStateCode(); protected int suspensionState = SuspensionState.ACTIVE.getStateCode();
protected String startUserId; protected String startUserId;
protected Date startTime; protected Date startTime;
// CountingExecutionEntity // CountingExecutionEntity
protected int eventSubscriptionCount; protected int eventSubscriptionCount;
protected int taskCount; protected int taskCount;
protected int jobCount; protected int jobCount;
...@@ -120,7 +112,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -120,7 +112,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
/** /**
* persisted reference to the processDefinition. * persisted reference to the processDefinition.
* *
* @see #processDefinition * @see #processDefinition
* @see #setProcessDefinition(ProcessDefinitionImpl) * @see #setProcessDefinition(ProcessDefinitionImpl)
* @see #getProcessDefinition() * @see #getProcessDefinition()
...@@ -149,7 +141,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -149,7 +141,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
/** /**
* persisted reference to the current position in the diagram within the {@link #processDefinition}. * persisted reference to the current position in the diagram within the {@link #processDefinition}.
* *
* @see #activity * @see #activity
* @see #setActivity(ActivityImpl) * @see #setActivity(ActivityImpl)
* @see #getActivity() * @see #getActivity()
...@@ -163,7 +155,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -163,7 +155,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
/** /**
* persisted reference to the process instance. * persisted reference to the process instance.
* *
* @see #getProcessInstance() * @see #getProcessInstance()
*/ */
protected String processInstanceId; protected String processInstanceId;
...@@ -175,7 +167,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -175,7 +167,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
/** /**
* persisted reference to the parent of this execution. * persisted reference to the parent of this execution.
* *
* @see #getParent() * @see #getParent()
* @see #setParentId(String) * @see #setParentId(String)
*/ */
...@@ -183,27 +175,29 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -183,27 +175,29 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
/** /**
* persisted reference to the super execution of this execution * persisted reference to the super execution of this execution
* *
* @See {@link #getSuperExecution()} * @See {@link #getSuperExecution()}
* @see #setSuperExecution(ExecutionEntityImpl) * @see #setSuperExecution(ExecutionEntityImpl)
*/ */
protected String superExecutionId; protected String superExecutionId;
protected String rootProcessInstanceId; protected String rootProcessInstanceId;
protected ExecutionEntityImpl rootProcessInstance; protected ExecutionEntityImpl rootProcessInstance;
protected boolean forcedUpdate; protected boolean forcedUpdate;
protected List<VariableInstanceEntity> queryVariables; protected List<VariableInstanceEntity> queryVariables;
protected boolean isDeleted; // TODO: should be in entity superclass probably protected boolean isDeleted; // TODO: should be in entity superclass probably
protected String parentProcessInstanceId; protected String parentProcessInstanceId;
public ExecutionEntityImpl() { private Integer appVersion;
public ExecutionEntityImpl() {
} }
/** /**
* Static factory method: to be used when a new execution is created for the very first time/ * Static factory method: to be used when a new execution is created for the very first time/
* Calling this will make sure no extra db fetches are needed later on, as all collections * Calling this will make sure no extra db fetches are needed later on, as all collections
...@@ -221,8 +215,8 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -221,8 +215,8 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
execution.identityLinks = new ArrayList<IdentityLinkEntity>(1); execution.identityLinks = new ArrayList<IdentityLinkEntity>(1);
return execution; return execution;
} }
//persistent state ///////////////////////////////////////////////////////// //persistent state /////////////////////////////////////////////////////////
public Object getPersistentState() { public Object getPersistentState() {
...@@ -255,7 +249,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -255,7 +249,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
persistentState.put("identityLinkCount", identityLinkCount); persistentState.put("identityLinkCount", identityLinkCount);
return persistentState; return persistentState;
} }
// The current flow element, will be filled during operation execution // The current flow element, will be filled during operation execution
public FlowElement getCurrentFlowElement() { public FlowElement getCurrentFlowElement() {
...@@ -277,7 +271,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -277,7 +271,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
this.activityId = null; this.activityId = null;
} }
} }
public ActivitiListener getCurrentActivitiListener() { public ActivitiListener getCurrentActivitiListener() {
return currentActivitiListener; return currentActivitiListener;
} }
...@@ -293,7 +287,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -293,7 +287,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
ensureExecutionsInitialized(); ensureExecutionsInitialized();
return executions; return executions;
} }
@Override @Override
public void addChildExecution(ExecutionEntity executionEntity) { public void addChildExecution(ExecutionEntity executionEntity) {
ensureExecutionsInitialized(); ensureExecutionsInitialized();
...@@ -421,7 +415,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -421,7 +415,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
public void setParentProcessInstanceId(String parentProcessInstanceId) { public void setParentProcessInstanceId(String parentProcessInstanceId) {
this.parentProcessInstanceId = parentProcessInstanceId; this.parentProcessInstanceId = parentProcessInstanceId;
} }
// super- and subprocess executions ///////////////////////////////////////// // super- and subprocess executions /////////////////////////////////////////
public String getSuperExecutionId() { public String getSuperExecutionId() {
...@@ -441,7 +435,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -441,7 +435,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
if (superExecution != null) { if (superExecution != null) {
this.superExecutionId = ((ExecutionEntityImpl) superExecution).getId(); this.superExecutionId = ((ExecutionEntityImpl) superExecution).getId();
this.parentProcessInstanceId = superExecution.getProcessInstanceId(); this.parentProcessInstanceId = superExecution.getProcessInstanceId();
} else { } else {
this.superExecutionId = null; this.superExecutionId = null;
this.parentProcessInstanceId = null; this.parentProcessInstanceId = null;
...@@ -468,18 +462,18 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -468,18 +462,18 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
subProcessInstance = (ExecutionEntityImpl) Context.getCommandContext().getExecutionEntityManager().findSubProcessInstanceBySuperExecutionId(id); subProcessInstance = (ExecutionEntityImpl) Context.getCommandContext().getExecutionEntityManager().findSubProcessInstanceBySuperExecutionId(id);
} }
} }
public ExecutionEntity getRootProcessInstance() { public ExecutionEntity getRootProcessInstance() {
ensureRootProcessInstanceInitialized(); ensureRootProcessInstanceInitialized();
return rootProcessInstance; return rootProcessInstance;
} }
protected void ensureRootProcessInstanceInitialized() { protected void ensureRootProcessInstanceInitialized() {
if (rootProcessInstanceId == null) { if (rootProcessInstanceId == null) {
rootProcessInstance = (ExecutionEntityImpl) Context.getCommandContext().getExecutionEntityManager().findById(rootProcessInstanceId); rootProcessInstance = (ExecutionEntityImpl) Context.getCommandContext().getExecutionEntityManager().findById(rootProcessInstanceId);
} }
} }
public void setRootProcessInstance(ExecutionEntity rootProcessInstance) { public void setRootProcessInstance(ExecutionEntity rootProcessInstance) {
this.rootProcessInstance = (ExecutionEntityImpl) rootProcessInstance; this.rootProcessInstance = (ExecutionEntityImpl) rootProcessInstance;
...@@ -489,11 +483,11 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -489,11 +483,11 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
this.rootProcessInstanceId = null; this.rootProcessInstanceId = null;
} }
} }
public String getRootProcessInstanceId() { public String getRootProcessInstanceId() {
return rootProcessInstanceId; return rootProcessInstanceId;
} }
public void setRootProcessInstanceId(String rootProcessInstanceId) { public void setRootProcessInstanceId(String rootProcessInstanceId) {
this.rootProcessInstanceId = rootProcessInstanceId; this.rootProcessInstanceId = rootProcessInstanceId;
} }
...@@ -511,11 +505,11 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -511,11 +505,11 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
public void forceUpdate() { public void forceUpdate() {
this.forcedUpdate = true; this.forcedUpdate = true;
} }
// VariableScopeImpl methods ////////////////////////////////////////////////////////////////// // VariableScopeImpl methods //////////////////////////////////////////////////////////////////
// TODO: this should ideally move to another place // TODO: this should ideally move to another place
@Override @Override
protected void initializeVariableInstanceBackPointer(VariableInstanceEntity variableInstance) { protected void initializeVariableInstanceBackPointer(VariableInstanceEntity variableInstance) {
if (processInstanceId != null) { if (processInstanceId != null) {
...@@ -558,7 +552,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -558,7 +552,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
} }
return result; return result;
} }
@Override @Override
protected void updateVariableInstance(VariableInstanceEntity variableInstance, Object value, ExecutionEntity sourceActivityExecution) { protected void updateVariableInstance(VariableInstanceEntity variableInstance, Object value, ExecutionEntity sourceActivityExecution) {
super.updateVariableInstance(variableInstance, value, sourceActivityExecution); super.updateVariableInstance(variableInstance, value, sourceActivityExecution);
...@@ -614,18 +608,18 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -614,18 +608,18 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
ensureJobsInitialized(); ensureJobsInitialized();
return jobs; return jobs;
} }
protected void ensureJobsInitialized() { protected void ensureJobsInitialized() {
if (jobs == null) { if (jobs == null) {
jobs = Context.getCommandContext().getJobEntityManager().findJobsByExecutionId(id); jobs = Context.getCommandContext().getJobEntityManager().findJobsByExecutionId(id);
} }
} }
public List<TimerJobEntity> getTimerJobs() { public List<TimerJobEntity> getTimerJobs() {
ensureTimerJobsInitialized(); ensureTimerJobsInitialized();
return timerJobs; return timerJobs;
} }
protected void ensureTimerJobsInitialized() { protected void ensureTimerJobsInitialized() {
if (timerJobs == null) { if (timerJobs == null) {
timerJobs = Context.getCommandContext().getTimerJobEntityManager().findJobsByExecutionId(id); timerJobs = Context.getCommandContext().getTimerJobEntityManager().findJobsByExecutionId(id);
...@@ -695,7 +689,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -695,7 +689,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
public void setActive(boolean isActive) { public void setActive(boolean isActive) {
this.isActive = isActive; this.isActive = isActive;
} }
public void inactivate() { public void inactivate() {
this.isActive = false; this.isActive = false;
} }
...@@ -703,7 +697,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -703,7 +697,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
public boolean isEnded() { public boolean isEnded() {
return isEnded; return isEnded;
} }
public void setEnded(boolean isEnded) { public void setEnded(boolean isEnded) {
this.isEnded = isEnded; this.isEnded = isEnded;
} }
...@@ -743,17 +737,17 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -743,17 +737,17 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
public void setEventScope(boolean isEventScope) { public void setEventScope(boolean isEventScope) {
this.isEventScope = isEventScope; this.isEventScope = isEventScope;
} }
@Override @Override
public boolean isMultiInstanceRoot() { public boolean isMultiInstanceRoot() {
return isMultiInstanceRoot; return isMultiInstanceRoot;
} }
@Override @Override
public void setMultiInstanceRoot(boolean isMultiInstanceRoot) { public void setMultiInstanceRoot(boolean isMultiInstanceRoot) {
this.isMultiInstanceRoot = isMultiInstanceRoot; this.isMultiInstanceRoot = isMultiInstanceRoot;
} }
@Override @Override
public boolean isCountEnabled() { public boolean isCountEnabled() {
return isCountEnabled; return isCountEnabled;
...@@ -788,23 +782,23 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -788,23 +782,23 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
return description; return description;
} }
} }
public void setDescription(String description) { public void setDescription(String description) {
this.description = description; this.description = description;
} }
public String getLocalizedName() { public String getLocalizedName() {
return localizedName; return localizedName;
} }
public void setLocalizedName(String localizedName) { public void setLocalizedName(String localizedName) {
this.localizedName = localizedName; this.localizedName = localizedName;
} }
public String getLocalizedDescription() { public String getLocalizedDescription() {
return localizedDescription; return localizedDescription;
} }
public void setLocalizedDescription(String localizedDescription) { public void setLocalizedDescription(String localizedDescription) {
this.localizedDescription = localizedDescription; this.localizedDescription = localizedDescription;
} }
...@@ -855,7 +849,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -855,7 +849,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
public void setDeleted(boolean isDeleted) { public void setDeleted(boolean isDeleted) {
this.isDeleted = isDeleted; this.isDeleted = isDeleted;
} }
public String getActivityName() { public String getActivityName() {
return activityName; return activityName;
} }
...@@ -875,7 +869,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -875,7 +869,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
public void setStartTime(Date startTime) { public void setStartTime(Date startTime) {
this.startTime = startTime; this.startTime = startTime;
} }
public int getEventSubscriptionCount() { public int getEventSubscriptionCount() {
return eventSubscriptionCount; return eventSubscriptionCount;
} }
...@@ -899,7 +893,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -899,7 +893,7 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
public void setJobCount(int jobCount) { public void setJobCount(int jobCount) {
this.jobCount = jobCount; this.jobCount = jobCount;
} }
public int getTimerJobCount() { public int getTimerJobCount() {
return timerJobCount; return timerJobCount;
} }
...@@ -931,15 +925,24 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE ...@@ -931,15 +925,24 @@ public class ExecutionEntityImpl extends VariableScopeImpl implements ExecutionE
public void setVariableCount(int variableCount) { public void setVariableCount(int variableCount) {
this.variableCount = variableCount; this.variableCount = variableCount;
} }
public int getIdentityLinkCount() { public int getIdentityLinkCount() {
return identityLinkCount; return identityLinkCount;
} }
public void setIdentityLinkCount(int identityLinkCount) { public void setIdentityLinkCount(int identityLinkCount) {
this.identityLinkCount = identityLinkCount; this.identityLinkCount = identityLinkCount;
} }
@Override
public void setAppVersion(Integer appVersion) {
this.appVersion = appVersion;
}
@Override
public Integer getAppVersion() {
return appVersion;
}
//toString ///////////////////////////////////////////////////////////////// //toString /////////////////////////////////////////////////////////////////
......
...@@ -18,10 +18,6 @@ import org.activiti.engine.api.internal.Internal; ...@@ -18,10 +18,6 @@ import org.activiti.engine.api.internal.Internal;
import org.activiti.engine.impl.db.HasRevision; import org.activiti.engine.impl.db.HasRevision;
import org.activiti.engine.repository.ProcessDefinition; import org.activiti.engine.repository.ProcessDefinition;
/**
*/
@Internal @Internal
public interface ProcessDefinitionEntity extends ProcessDefinition, Entity, HasRevision { public interface ProcessDefinitionEntity extends ProcessDefinition, Entity, HasRevision {
......
...@@ -22,10 +22,6 @@ import org.activiti.engine.ProcessEngineConfiguration; ...@@ -22,10 +22,6 @@ import org.activiti.engine.ProcessEngineConfiguration;
import org.activiti.engine.impl.bpmn.data.IOSpecification; import org.activiti.engine.impl.bpmn.data.IOSpecification;
import org.activiti.engine.impl.context.Context; import org.activiti.engine.impl.context.Context;
/**
*/
public class ProcessDefinitionEntityImpl extends AbstractEntity implements ProcessDefinitionEntity, Serializable { public class ProcessDefinitionEntityImpl extends AbstractEntity implements ProcessDefinitionEntity, Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -47,6 +43,7 @@ public class ProcessDefinitionEntityImpl extends AbstractEntity implements Proce ...@@ -47,6 +43,7 @@ public class ProcessDefinitionEntityImpl extends AbstractEntity implements Proce
protected boolean isIdentityLinksInitialized; protected boolean isIdentityLinksInitialized;
protected List<IdentityLinkEntity> definitionIdentityLinkEntities = new ArrayList<IdentityLinkEntity>(); protected List<IdentityLinkEntity> definitionIdentityLinkEntities = new ArrayList<IdentityLinkEntity>();
protected IOSpecification ioSpecification; protected IOSpecification ioSpecification;
protected Integer appVersion;
// Backwards compatibility // Backwards compatibility
protected String engineVersion; protected String engineVersion;
...@@ -218,4 +215,12 @@ public class ProcessDefinitionEntityImpl extends AbstractEntity implements Proce ...@@ -218,4 +215,12 @@ public class ProcessDefinitionEntityImpl extends AbstractEntity implements Proce
return "ProcessDefinitionEntity[" + id + "]"; return "ProcessDefinitionEntity[" + id + "]";
} }
public void setAppVersion(Integer appVersion){
this.appVersion = appVersion;
}
public Integer getAppVersion(){
return this.appVersion;
}
} }
...@@ -92,6 +92,8 @@ public class TaskEntityImpl extends VariableScopeImpl implements TaskEntity, Ser ...@@ -92,6 +92,8 @@ public class TaskEntityImpl extends VariableScopeImpl implements TaskEntity, Ser
protected Date claimTime; protected Date claimTime;
protected Integer appVersion;
public TaskEntityImpl() { public TaskEntityImpl() {
} }
...@@ -600,6 +602,14 @@ public class TaskEntityImpl extends VariableScopeImpl implements TaskEntity, Ser ...@@ -600,6 +602,14 @@ public class TaskEntityImpl extends VariableScopeImpl implements TaskEntity, Ser
this.claimTime = claimTime; this.claimTime = claimTime;
} }
public Integer getAppVersion(){
return this.appVersion;
}
public void setAppVersion (Integer appVersion){
this.appVersion = appVersion;
}
public String toString() { public String toString() {
return "Task[id=" + id + ", name=" + name + "]"; return "Task[id=" + id + ", name=" + name + "]";
} }
......
...@@ -80,6 +80,7 @@ public class TaskEntityManagerImpl extends AbstractEntityManager<TaskEntity> imp ...@@ -80,6 +80,7 @@ public class TaskEntityManagerImpl extends AbstractEntityManager<TaskEntity> imp
taskEntity.setExecutionId(execution.getId()); taskEntity.setExecutionId(execution.getId());
taskEntity.setProcessInstanceId(execution.getProcessInstanceId()); taskEntity.setProcessInstanceId(execution.getProcessInstanceId());
taskEntity.setProcessDefinitionId(execution.getProcessDefinitionId()); taskEntity.setProcessDefinitionId(execution.getProcessDefinitionId());
taskEntity.setAppVersion(execution.getAppVersion());
getHistoryManager().recordTaskExecutionIdChange(taskEntity.getId(), taskEntity.getExecutionId()); getHistoryManager().recordTaskExecutionIdChange(taskEntity.getId(), taskEntity.getExecutionId());
} }
......
...@@ -132,9 +132,9 @@ public class ProcessInstanceHelper { ...@@ -132,9 +132,9 @@ public class ProcessInstanceHelper {
// Map message payload variables before creating process instance // Map message payload variables before creating process instance
Map<String, Object> processVariables = commandContext.getProcessEngineConfiguration() Map<String, Object> processVariables = commandContext.getProcessEngineConfiguration()
.getEventSubscriptionPayloadMappingProvider() .getEventSubscriptionPayloadMappingProvider()
.apply(messageVariables, .apply(messageVariables,
eventSubscription); eventSubscription);
// Create process instance with executions but defer to start process after dispatching ACTIVITY_MESSAGE_RECEIVED // Create process instance with executions but defer to start process after dispatching ACTIVITY_MESSAGE_RECEIVED
ExecutionEntity processInstance = createProcessInstanceWithInitialFlowElement(processDefinition, ExecutionEntity processInstance = createProcessInstanceWithInitialFlowElement(processDefinition,
businessKey, businessKey,
...@@ -145,13 +145,13 @@ public class ProcessInstanceHelper { ...@@ -145,13 +145,13 @@ public class ProcessInstanceHelper {
transientVariables); transientVariables);
// Dispatch message received event // Dispatch message received event
dispatchStartMessageReceivedEvent(processInstance, messageName, messageVariables); dispatchStartMessageReceivedEvent(processInstance, messageName, messageVariables);
// Finally start the process // Finally start the process
startProcessInstance(processInstance, commandContext, processVariables); startProcessInstance(processInstance, commandContext, processVariables);
return processInstance; return processInstance;
} }
public ProcessInstance createAndStartProcessInstanceWithInitialFlowElement(ProcessDefinition processDefinition, public ProcessInstance createAndStartProcessInstanceWithInitialFlowElement(ProcessDefinition processDefinition,
String businessKey, String processInstanceName, FlowElement initialFlowElement, String businessKey, String processInstanceName, FlowElement initialFlowElement,
Process process, Map<String, Object> variables, Map<String, Object> transientVariables, boolean startProcessInstance) { Process process, Map<String, Object> variables, Map<String, Object> transientVariables, boolean startProcessInstance) {
...@@ -164,8 +164,8 @@ public class ProcessInstanceHelper { ...@@ -164,8 +164,8 @@ public class ProcessInstanceHelper {
variables, variables,
transientVariables); transientVariables);
if (startProcessInstance) { if (startProcessInstance) {
CommandContext commandContext = Context.getCommandContext(); CommandContext commandContext = Context.getCommandContext();
startProcessInstance(processInstance, commandContext, variables); startProcessInstance(processInstance, commandContext, variables);
} }
...@@ -196,19 +196,19 @@ public class ProcessInstanceHelper { ...@@ -196,19 +196,19 @@ public class ProcessInstanceHelper {
ExecutionEntity messageExecution = commandContext.getExecutionEntityManager().createChildExecution(processInstance); ExecutionEntity messageExecution = commandContext.getExecutionEntityManager().createChildExecution(processInstance);
messageExecution.setCurrentFlowElement(startEvent); messageExecution.setCurrentFlowElement(startEvent);
messageExecution.setEventScope(true); messageExecution.setEventScope(true);
String messageName = getMessageName(commandContext, String messageName = getMessageName(commandContext,
messageEventDefinition, messageEventDefinition,
messageExecution); messageExecution);
MessageEventSubscriptionEntity subscription = commandContext.getEventSubscriptionEntityManager() MessageEventSubscriptionEntity subscription = commandContext.getEventSubscriptionEntityManager()
.insertMessageEvent(messageName, .insertMessageEvent(messageName,
messageExecution); messageExecution);
Optional<String> correlationKey = getCorrelationKey(commandContext, Optional<String> correlationKey = getCorrelationKey(commandContext,
messageEventDefinition, messageEventDefinition,
messageExecution); messageExecution);
correlationKey.ifPresent(subscription::setConfiguration); correlationKey.ifPresent(subscription::setConfiguration);
messageEventSubscriptions.add(subscription); messageEventSubscriptions.add(subscription);
} }
} }
...@@ -216,14 +216,17 @@ public class ProcessInstanceHelper { ...@@ -216,14 +216,17 @@ public class ProcessInstanceHelper {
} }
} }
} }
ExecutionEntity execution = processInstance.getExecutions().get(0); // There will always be one child execution created ExecutionEntity execution = processInstance.getExecutions().get(0); // There will always be one child execution created
execution.setAppVersion(processInstance.getAppVersion());
commandContext.getAgenda().planContinueProcessOperation(execution); commandContext.getAgenda().planContinueProcessOperation(execution);
if (Context.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) { if (Context.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) {
ActivitiEventDispatcher eventDispatcher = Context.getProcessEngineConfiguration().getEventDispatcher(); ActivitiEventDispatcher eventDispatcher = Context.getProcessEngineConfiguration().getEventDispatcher();
eventDispatcher.dispatchEvent(ActivitiEventBuilder.createProcessStartedEvent(execution, variables, false)); eventDispatcher.dispatchEvent(ActivitiEventBuilder.createProcessStartedEvent(execution, variables, false));
for (MessageEventSubscriptionEntity messageEventSubscription : messageEventSubscriptions) { for (MessageEventSubscriptionEntity messageEventSubscription : messageEventSubscriptions) {
commandContext.getProcessEngineConfiguration().getEventDispatcher() commandContext.getProcessEngineConfiguration().getEventDispatcher()
.dispatchEvent(ActivitiEventBuilder.createMessageWaitingEvent(messageEventSubscription.getExecution(), .dispatchEvent(ActivitiEventBuilder.createMessageWaitingEvent(messageEventSubscription.getExecution(),
...@@ -243,39 +246,39 @@ public class ProcessInstanceHelper { ...@@ -243,39 +246,39 @@ public class ProcessInstanceHelper {
} }
return variablesMap; return variablesMap;
} }
protected Optional<String> getCorrelationKey(CommandContext commandContext, protected Optional<String> getCorrelationKey(CommandContext commandContext,
MessageEventDefinition messageEventDefinition, MessageEventDefinition messageEventDefinition,
DelegateExecution execution) { DelegateExecution execution) {
ExpressionManager expressionManager = commandContext.getProcessEngineConfiguration() ExpressionManager expressionManager = commandContext.getProcessEngineConfiguration()
.getExpressionManager(); .getExpressionManager();
return Optional.ofNullable(messageEventDefinition.getCorrelationKey()) return Optional.ofNullable(messageEventDefinition.getCorrelationKey())
.map(correlationKey -> { .map(correlationKey -> {
Expression expression = expressionManager.createExpression(messageEventDefinition.getCorrelationKey()); Expression expression = expressionManager.createExpression(messageEventDefinition.getCorrelationKey());
return expression.getValue(execution) return expression.getValue(execution)
.toString(); .toString();
}); });
} }
protected String getMessageName(CommandContext commandContext, protected String getMessageName(CommandContext commandContext,
MessageEventDefinition messageEventDefinition, MessageEventDefinition messageEventDefinition,
DelegateExecution execution) { DelegateExecution execution) {
ExpressionManager expressionManager = commandContext.getProcessEngineConfiguration() ExpressionManager expressionManager = commandContext.getProcessEngineConfiguration()
.getExpressionManager(); .getExpressionManager();
String messageName = Optional.ofNullable(messageEventDefinition.getMessageRef()) String messageName = Optional.ofNullable(messageEventDefinition.getMessageRef())
.orElse(messageEventDefinition.getMessageExpression()); .orElse(messageEventDefinition.getMessageExpression());
Expression expression = expressionManager.createExpression(messageName); Expression expression = expressionManager.createExpression(messageName);
return expression.getValue(execution) return expression.getValue(execution)
.toString(); .toString();
} }
public ExecutionEntity createProcessInstanceWithInitialFlowElement(ProcessDefinition processDefinition, public ExecutionEntity createProcessInstanceWithInitialFlowElement(ProcessDefinition processDefinition,
String businessKey, String businessKey,
...@@ -345,19 +348,19 @@ public class ProcessInstanceHelper { ...@@ -345,19 +348,19 @@ public class ProcessInstanceHelper {
Map<String, Object> variables) { Map<String, Object> variables) {
// Dispatch message received event // Dispatch message received event
if (Context.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) { if (Context.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) {
// There will always be one child execution created // There will always be one child execution created
DelegateExecution execution = processInstance.getExecutions() DelegateExecution execution = processInstance.getExecutions()
.get(0); .get(0);
ActivitiEventDispatcher eventDispatcher = Context.getProcessEngineConfiguration() ActivitiEventDispatcher eventDispatcher = Context.getProcessEngineConfiguration()
.getEventDispatcher(); .getEventDispatcher();
eventDispatcher.dispatchEvent(ActivitiEventBuilder.createMessageReceivedEvent(execution, eventDispatcher.dispatchEvent(ActivitiEventBuilder.createMessageReceivedEvent(execution,
messageName, messageName,
null, null,
variables)); variables));
} }
} }
} }
...@@ -78,4 +78,8 @@ public interface ProcessDefinition { ...@@ -78,4 +78,8 @@ public interface ProcessDefinition {
/** The engine version for this process definition (5 or 6) */ /** The engine version for this process definition (5 or 6) */
String getEngineVersion(); String getEngineVersion();
void setAppVersion(Integer appVersion);
Integer getAppVersion();
} }
...@@ -99,4 +99,8 @@ public interface ProcessInstance extends Execution { ...@@ -99,4 +99,8 @@ public interface ProcessInstance extends Execution {
* Returns the user id of this process instance. * Returns the user id of this process instance.
*/ */
String getStartUserId(); String getStartUserId();
void setAppVersion(Integer appVersion);
Integer getAppVersion();
} }
...@@ -79,4 +79,8 @@ public interface Task extends TaskInfo { ...@@ -79,4 +79,8 @@ public interface Task extends TaskInfo {
/** Indicates whether this task is suspended or not. */ /** Indicates whether this task is suspended or not. */
boolean isSuspended(); boolean isSuspended();
Integer getAppVersion();
void setAppVersion(Integer appVersion);
} }
...@@ -6,10 +6,10 @@ create table ACT_GE_PROPERTY ( ...@@ -6,10 +6,10 @@ create table ACT_GE_PROPERTY (
); );
insert into ACT_GE_PROPERTY insert into ACT_GE_PROPERTY
values ('schema.version', '7.0.0.0', 1); values ('schema.version', '7.1.0-M6', 1);
insert into ACT_GE_PROPERTY insert into ACT_GE_PROPERTY
values ('schema.history', 'create(7.0.0.0)', 1); values ('schema.history', 'create(7.1.0-M6)', 1);
insert into ACT_GE_PROPERTY insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1); values ('next.dbid', '1', 1);
...@@ -32,7 +32,7 @@ create table ACT_RE_DEPLOYMENT ( ...@@ -32,7 +32,7 @@ create table ACT_RE_DEPLOYMENT (
TENANT_ID_ varchar(255) default '', TENANT_ID_ varchar(255) default '',
DEPLOY_TIME_ timestamp, DEPLOY_TIME_ timestamp,
ENGINE_VERSION_ varchar(255), ENGINE_VERSION_ varchar(255),
VERSION_ integer, VERSION_ integer default 1,
PROJECT_RELEASE_VERSION_ varchar(255), PROJECT_RELEASE_VERSION_ varchar(255),
primary key (ID_) primary key (ID_)
); );
...@@ -77,14 +77,15 @@ create table ACT_RU_EXECUTION ( ...@@ -77,14 +77,15 @@ create table ACT_RU_EXECUTION (
START_USER_ID_ varchar(255), START_USER_ID_ varchar(255),
LOCK_TIME_ timestamp, LOCK_TIME_ timestamp,
IS_COUNT_ENABLED_ smallint check(IS_COUNT_ENABLED_ in (1,0)), IS_COUNT_ENABLED_ smallint check(IS_COUNT_ENABLED_ in (1,0)),
EVT_SUBSCR_COUNT_ integer, EVT_SUBSCR_COUNT_ integer,
TASK_COUNT_ integer, TASK_COUNT_ integer,
JOB_COUNT_ integer, JOB_COUNT_ integer,
TIMER_JOB_COUNT_ integer, TIMER_JOB_COUNT_ integer,
SUSP_JOB_COUNT_ integer, SUSP_JOB_COUNT_ integer,
DEADLETTER_JOB_COUNT_ integer, DEADLETTER_JOB_COUNT_ integer,
VAR_COUNT_ integer, VAR_COUNT_ integer,
ID_LINK_COUNT_ integer, ID_LINK_COUNT_ integer,
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
); );
...@@ -183,6 +184,7 @@ create table ACT_RE_PROCDEF ( ...@@ -183,6 +184,7 @@ create table ACT_RE_PROCDEF (
SUSPENSION_STATE_ integer, SUSPENSION_STATE_ integer,
TENANT_ID_ varchar(255) not null default '', TENANT_ID_ varchar(255) not null default '',
ENGINE_VERSION_ varchar(255), ENGINE_VERSION_ varchar(255),
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
); );
...@@ -207,6 +209,7 @@ create table ACT_RU_TASK ( ...@@ -207,6 +209,7 @@ create table ACT_RU_TASK (
TENANT_ID_ varchar(255) default '', TENANT_ID_ varchar(255) default '',
FORM_KEY_ varchar(255), FORM_KEY_ varchar(255),
CLAIM_TIME_ timestamp, CLAIM_TIME_ timestamp,
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
); );
...@@ -328,67 +331,67 @@ create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID on ACT_RU_DEADLETTER_JOB( ...@@ -328,67 +331,67 @@ create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID on ACT_RU_DEADLETTER_JOB(
create index ACT_IDX_INFO_PROCDEF on ACT_PROCDEF_INFO(PROC_DEF_ID_); create index ACT_IDX_INFO_PROCDEF on ACT_PROCDEF_INFO(PROC_DEF_ID_);
alter table ACT_GE_BYTEARRAY alter table ACT_GE_BYTEARRAY
add constraint ACT_FK_BYTEARR_DEPL add constraint ACT_FK_BYTEARR_DEPL
foreign key (DEPLOYMENT_ID_) foreign key (DEPLOYMENT_ID_)
references ACT_RE_DEPLOYMENT (ID_); references ACT_RE_DEPLOYMENT (ID_);
alter table ACT_RE_PROCDEF alter table ACT_RE_PROCDEF
add constraint ACT_UNIQ_PROCDEF add constraint ACT_UNIQ_PROCDEF
unique (KEY_,VERSION_, TENANT_ID_); unique (KEY_,VERSION_, TENANT_ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PROCINST add constraint ACT_FK_EXE_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PARENT add constraint ACT_FK_EXE_PARENT
foreign key (PARENT_ID_) foreign key (PARENT_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_SUPER add constraint ACT_FK_EXE_SUPER
foreign key (SUPER_EXEC_) foreign key (SUPER_EXEC_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PROCDEF add constraint ACT_FK_EXE_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_TSKASS_TASK add constraint ACT_FK_TSKASS_TASK
foreign key (TASK_ID_) foreign key (TASK_ID_)
references ACT_RU_TASK (ID_); references ACT_RU_TASK (ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_ATHRZ_PROCEDEF add constraint ACT_FK_ATHRZ_PROCEDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_IDL_PROCINST add constraint ACT_FK_IDL_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_EXE add constraint ACT_FK_TASK_EXE
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_PROCINST add constraint ACT_FK_TASK_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_PROCDEF add constraint ACT_FK_TASK_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_VARIABLE alter table ACT_RU_VARIABLE
add constraint ACT_FK_VAR_EXE add constraint ACT_FK_VAR_EXE
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_VARIABLE alter table ACT_RU_VARIABLE
...@@ -396,121 +399,121 @@ alter table ACT_RU_VARIABLE ...@@ -396,121 +399,121 @@ alter table ACT_RU_VARIABLE
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION(ID_); references ACT_RU_EXECUTION(ID_);
alter table ACT_RU_VARIABLE alter table ACT_RU_VARIABLE
add constraint ACT_FK_VAR_BYTEARRAY add constraint ACT_FK_VAR_BYTEARRAY
foreign key (BYTEARRAY_ID_) foreign key (BYTEARRAY_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_EXECUTION add constraint ACT_FK_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_PROCESS_INSTANCE add constraint ACT_FK_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_PROC_DEF add constraint ACT_FK_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_EXCEPTION add constraint ACT_FK_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_EXECUTION add constraint ACT_FK_TIMER_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_PROCESS_INSTANCE add constraint ACT_FK_TIMER_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_PROC_DEF add constraint ACT_FK_TIMER_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_EXCEPTION add constraint ACT_FK_TIMER_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_EXECUTION add constraint ACT_FK_SUSPENDED_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE add constraint ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_PROC_DEF add constraint ACT_FK_SUSPENDED_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_EXECUTION add constraint ACT_FK_DEADLETTER_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE add constraint ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_PROC_DEF add constraint ACT_FK_DEADLETTER_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_EVENT_SUBSCR alter table ACT_RU_EVENT_SUBSCR
add constraint ACT_FK_EVENT_EXEC add constraint ACT_FK_EVENT_EXEC
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION(ID_); references ACT_RU_EXECUTION(ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_SOURCE add constraint ACT_FK_MODEL_SOURCE
foreign key (EDITOR_SOURCE_VALUE_ID_) foreign key (EDITOR_SOURCE_VALUE_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_SOURCE_EXTRA add constraint ACT_FK_MODEL_SOURCE_EXTRA
foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_) foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_DEPLOYMENT add constraint ACT_FK_MODEL_DEPLOYMENT
foreign key (DEPLOYMENT_ID_) foreign key (DEPLOYMENT_ID_)
references ACT_RE_DEPLOYMENT (ID_); references ACT_RE_DEPLOYMENT (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_FK_INFO_JSON_BA add constraint ACT_FK_INFO_JSON_BA
foreign key (INFO_JSON_ID_) foreign key (INFO_JSON_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_FK_INFO_PROCDEF add constraint ACT_FK_INFO_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_UNIQ_INFO_PROCDEF add constraint ACT_UNIQ_INFO_PROCDEF
unique (PROC_DEF_ID_); unique (PROC_DEF_ID_);
......
...@@ -6,10 +6,10 @@ create table ACT_GE_PROPERTY ( ...@@ -6,10 +6,10 @@ create table ACT_GE_PROPERTY (
); );
insert into ACT_GE_PROPERTY insert into ACT_GE_PROPERTY
values ('schema.version', '7.1.0.0', 1); values ('schema.version', '7.1.0-M6', 1);
insert into ACT_GE_PROPERTY insert into ACT_GE_PROPERTY
values ('schema.history', 'create(7.1.0.0)', 1); values ('schema.history', 'create(7.1.0-M6)', 1);
insert into ACT_GE_PROPERTY insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1); values ('next.dbid', '1', 1);
...@@ -32,7 +32,7 @@ create table ACT_RE_DEPLOYMENT ( ...@@ -32,7 +32,7 @@ create table ACT_RE_DEPLOYMENT (
TENANT_ID_ varchar(255) default '', TENANT_ID_ varchar(255) default '',
DEPLOY_TIME_ timestamp, DEPLOY_TIME_ timestamp,
ENGINE_VERSION_ varchar(255), ENGINE_VERSION_ varchar(255),
VERSION_ integer, VERSION_ integer default 1,
PROJECT_RELEASE_VERSION_ varchar(255), PROJECT_RELEASE_VERSION_ varchar(255),
primary key (ID_) primary key (ID_)
); );
...@@ -77,14 +77,15 @@ create table ACT_RU_EXECUTION ( ...@@ -77,14 +77,15 @@ create table ACT_RU_EXECUTION (
START_USER_ID_ varchar(255), START_USER_ID_ varchar(255),
LOCK_TIME_ timestamp, LOCK_TIME_ timestamp,
IS_COUNT_ENABLED_ bit, IS_COUNT_ENABLED_ bit,
EVT_SUBSCR_COUNT_ integer, EVT_SUBSCR_COUNT_ integer,
TASK_COUNT_ integer, TASK_COUNT_ integer,
JOB_COUNT_ integer, JOB_COUNT_ integer,
TIMER_JOB_COUNT_ integer, TIMER_JOB_COUNT_ integer,
SUSP_JOB_COUNT_ integer, SUSP_JOB_COUNT_ integer,
DEADLETTER_JOB_COUNT_ integer, DEADLETTER_JOB_COUNT_ integer,
VAR_COUNT_ integer, VAR_COUNT_ integer,
ID_LINK_COUNT_ integer, ID_LINK_COUNT_ integer,
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
); );
...@@ -183,6 +184,7 @@ create table ACT_RE_PROCDEF ( ...@@ -183,6 +184,7 @@ create table ACT_RE_PROCDEF (
SUSPENSION_STATE_ integer, SUSPENSION_STATE_ integer,
TENANT_ID_ varchar(255) default '', TENANT_ID_ varchar(255) default '',
ENGINE_VERSION_ varchar(255), ENGINE_VERSION_ varchar(255),
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
); );
...@@ -207,6 +209,7 @@ create table ACT_RU_TASK ( ...@@ -207,6 +209,7 @@ create table ACT_RU_TASK (
TENANT_ID_ varchar(255) default '', TENANT_ID_ varchar(255) default '',
FORM_KEY_ varchar(255), FORM_KEY_ varchar(255),
CLAIM_TIME_ timestamp, CLAIM_TIME_ timestamp,
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
); );
...@@ -304,7 +307,7 @@ alter table ACT_GE_BYTEARRAY ...@@ -304,7 +307,7 @@ alter table ACT_GE_BYTEARRAY
alter table ACT_RE_PROCDEF alter table ACT_RE_PROCDEF
add constraint ACT_UNIQ_PROCDEF add constraint ACT_UNIQ_PROCDEF
unique (KEY_,VERSION_, TENANT_ID_); unique (KEY_,VERSION_, TENANT_ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PROCINST add constraint ACT_FK_EXE_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
...@@ -314,17 +317,17 @@ alter table ACT_RU_EXECUTION ...@@ -314,17 +317,17 @@ alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PARENT add constraint ACT_FK_EXE_PARENT
foreign key (PARENT_ID_) foreign key (PARENT_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_SUPER add constraint ACT_FK_EXE_SUPER
foreign key (SUPER_EXEC_) foreign key (SUPER_EXEC_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PROCDEF add constraint ACT_FK_EXE_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_TSKASS_TASK add constraint ACT_FK_TSKASS_TASK
foreign key (TASK_ID_) foreign key (TASK_ID_)
...@@ -334,11 +337,11 @@ alter table ACT_RU_IDENTITYLINK ...@@ -334,11 +337,11 @@ alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_ATHRZ_PROCEDEF add constraint ACT_FK_ATHRZ_PROCEDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF; references ACT_RE_PROCDEF;
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_IDL_PROCINST add constraint ACT_FK_IDL_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_EXE add constraint ACT_FK_TASK_EXE
...@@ -369,42 +372,42 @@ alter table ACT_RU_VARIABLE ...@@ -369,42 +372,42 @@ alter table ACT_RU_VARIABLE
add constraint ACT_FK_VAR_BYTEARRAY add constraint ACT_FK_VAR_BYTEARRAY
foreign key (BYTEARRAY_ID_) foreign key (BYTEARRAY_ID_)
references ACT_GE_BYTEARRAY; references ACT_GE_BYTEARRAY;
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_EXECUTION add constraint ACT_FK_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_PROCESS_INSTANCE add constraint ACT_FK_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_PROC_DEF add constraint ACT_FK_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF; references ACT_RE_PROCDEF;
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_EXCEPTION add constraint ACT_FK_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY; references ACT_GE_BYTEARRAY;
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_EXECUTION add constraint ACT_FK_TIMER_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_PROCESS_INSTANCE add constraint ACT_FK_TIMER_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_PROC_DEF add constraint ACT_FK_TIMER_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF; references ACT_RE_PROCDEF;
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_EXCEPTION add constraint ACT_FK_TIMER_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
...@@ -414,17 +417,17 @@ alter table ACT_RU_SUSPENDED_JOB ...@@ -414,17 +417,17 @@ alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_EXECUTION add constraint ACT_FK_SUSPENDED_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE add constraint ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_PROC_DEF add constraint ACT_FK_SUSPENDED_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF; references ACT_RE_PROCDEF;
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
...@@ -434,12 +437,12 @@ alter table ACT_RU_DEADLETTER_JOB ...@@ -434,12 +437,12 @@ alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_EXECUTION add constraint ACT_FK_DEADLETTER_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE add constraint ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_PROC_DEF add constraint ACT_FK_DEADLETTER_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
...@@ -455,31 +458,31 @@ alter table ACT_RU_EVENT_SUBSCR ...@@ -455,31 +458,31 @@ alter table ACT_RU_EVENT_SUBSCR
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_SOURCE add constraint ACT_FK_MODEL_SOURCE
foreign key (EDITOR_SOURCE_VALUE_ID_) foreign key (EDITOR_SOURCE_VALUE_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_SOURCE_EXTRA add constraint ACT_FK_MODEL_SOURCE_EXTRA
foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_) foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_DEPLOYMENT add constraint ACT_FK_MODEL_DEPLOYMENT
foreign key (DEPLOYMENT_ID_) foreign key (DEPLOYMENT_ID_)
references ACT_RE_DEPLOYMENT (ID_); references ACT_RE_DEPLOYMENT (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_FK_INFO_JSON_BA add constraint ACT_FK_INFO_JSON_BA
foreign key (INFO_JSON_ID_) foreign key (INFO_JSON_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_FK_INFO_PROCDEF add constraint ACT_FK_INFO_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_UNIQ_INFO_PROCDEF add constraint ACT_UNIQ_INFO_PROCDEF
unique (PROC_DEF_ID_); unique (PROC_DEF_ID_);
......
...@@ -6,10 +6,10 @@ create table ACT_GE_PROPERTY ( ...@@ -6,10 +6,10 @@ create table ACT_GE_PROPERTY (
); );
insert into ACT_GE_PROPERTY insert into ACT_GE_PROPERTY
values ('schema.version', '7.0.0.0', 1); values ('schema.version', '7.1.0-M6', 1);
insert into ACT_GE_PROPERTY insert into ACT_GE_PROPERTY
values ('schema.history', 'create(7.0.0.0)', 1); values ('schema.history', 'create(7.1.0-M6)', 1);
insert into ACT_GE_PROPERTY insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1); values ('next.dbid', '1', 1);
...@@ -32,7 +32,7 @@ create table ACT_RE_DEPLOYMENT ( ...@@ -32,7 +32,7 @@ create table ACT_RE_DEPLOYMENT (
TENANT_ID_ varchar(255) default '', TENANT_ID_ varchar(255) default '',
DEPLOY_TIME_ timestamp, DEPLOY_TIME_ timestamp,
ENGINE_VERSION_ varchar(255), ENGINE_VERSION_ varchar(255),
VERSION_ integer, VERSION_ integer DEFAULT 1,
PROJECT_RELEASE_VERSION_ varchar(255), PROJECT_RELEASE_VERSION_ varchar(255),
primary key (ID_) primary key (ID_)
); );
...@@ -77,14 +77,15 @@ create table ACT_RU_EXECUTION ( ...@@ -77,14 +77,15 @@ create table ACT_RU_EXECUTION (
START_USER_ID_ varchar(255), START_USER_ID_ varchar(255),
LOCK_TIME_ timestamp, LOCK_TIME_ timestamp,
IS_COUNT_ENABLED_ bit, IS_COUNT_ENABLED_ bit,
EVT_SUBSCR_COUNT_ integer, EVT_SUBSCR_COUNT_ integer,
TASK_COUNT_ integer, TASK_COUNT_ integer,
JOB_COUNT_ integer, JOB_COUNT_ integer,
TIMER_JOB_COUNT_ integer, TIMER_JOB_COUNT_ integer,
SUSP_JOB_COUNT_ integer, SUSP_JOB_COUNT_ integer,
DEADLETTER_JOB_COUNT_ integer, DEADLETTER_JOB_COUNT_ integer,
VAR_COUNT_ integer, VAR_COUNT_ integer,
ID_LINK_COUNT_ integer, ID_LINK_COUNT_ integer,
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
); );
...@@ -183,6 +184,7 @@ create table ACT_RE_PROCDEF ( ...@@ -183,6 +184,7 @@ create table ACT_RE_PROCDEF (
SUSPENSION_STATE_ integer, SUSPENSION_STATE_ integer,
TENANT_ID_ varchar(255) default '', TENANT_ID_ varchar(255) default '',
ENGINE_VERSION_ varchar(255), ENGINE_VERSION_ varchar(255),
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
); );
...@@ -207,6 +209,7 @@ create table ACT_RU_TASK ( ...@@ -207,6 +209,7 @@ create table ACT_RU_TASK (
TENANT_ID_ varchar(255) default '', TENANT_ID_ varchar(255) default '',
FORM_KEY_ varchar(255), FORM_KEY_ varchar(255),
CLAIM_TIME_ timestamp, CLAIM_TIME_ timestamp,
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
); );
...@@ -304,7 +307,7 @@ alter table ACT_GE_BYTEARRAY ...@@ -304,7 +307,7 @@ alter table ACT_GE_BYTEARRAY
alter table ACT_RE_PROCDEF alter table ACT_RE_PROCDEF
add constraint ACT_UNIQ_PROCDEF add constraint ACT_UNIQ_PROCDEF
unique (KEY_,VERSION_, TENANT_ID_); unique (KEY_,VERSION_, TENANT_ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PROCINST add constraint ACT_FK_EXE_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
...@@ -314,17 +317,17 @@ alter table ACT_RU_EXECUTION ...@@ -314,17 +317,17 @@ alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PARENT add constraint ACT_FK_EXE_PARENT
foreign key (PARENT_ID_) foreign key (PARENT_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_SUPER add constraint ACT_FK_EXE_SUPER
foreign key (SUPER_EXEC_) foreign key (SUPER_EXEC_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PROCDEF add constraint ACT_FK_EXE_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_TSKASS_TASK add constraint ACT_FK_TSKASS_TASK
foreign key (TASK_ID_) foreign key (TASK_ID_)
...@@ -334,11 +337,11 @@ alter table ACT_RU_IDENTITYLINK ...@@ -334,11 +337,11 @@ alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_ATHRZ_PROCEDEF add constraint ACT_FK_ATHRZ_PROCEDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF; references ACT_RE_PROCDEF;
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_IDL_PROCINST add constraint ACT_FK_IDL_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_EXE add constraint ACT_FK_TASK_EXE
...@@ -369,42 +372,42 @@ alter table ACT_RU_VARIABLE ...@@ -369,42 +372,42 @@ alter table ACT_RU_VARIABLE
add constraint ACT_FK_VAR_BYTEARRAY add constraint ACT_FK_VAR_BYTEARRAY
foreign key (BYTEARRAY_ID_) foreign key (BYTEARRAY_ID_)
references ACT_GE_BYTEARRAY; references ACT_GE_BYTEARRAY;
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_EXECUTION add constraint ACT_FK_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_PROCESS_INSTANCE add constraint ACT_FK_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_PROC_DEF add constraint ACT_FK_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF; references ACT_RE_PROCDEF;
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_EXCEPTION add constraint ACT_FK_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY; references ACT_GE_BYTEARRAY;
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_EXECUTION add constraint ACT_FK_TIMER_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_PROCESS_INSTANCE add constraint ACT_FK_TIMER_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_PROC_DEF add constraint ACT_FK_TIMER_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF; references ACT_RE_PROCDEF;
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_EXCEPTION add constraint ACT_FK_TIMER_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
...@@ -414,17 +417,17 @@ alter table ACT_RU_SUSPENDED_JOB ...@@ -414,17 +417,17 @@ alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_EXECUTION add constraint ACT_FK_SUSPENDED_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE add constraint ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_PROC_DEF add constraint ACT_FK_SUSPENDED_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF; references ACT_RE_PROCDEF;
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
...@@ -434,12 +437,12 @@ alter table ACT_RU_DEADLETTER_JOB ...@@ -434,12 +437,12 @@ alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_EXECUTION add constraint ACT_FK_DEADLETTER_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE add constraint ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_PROC_DEF add constraint ACT_FK_DEADLETTER_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
...@@ -455,31 +458,31 @@ alter table ACT_RU_EVENT_SUBSCR ...@@ -455,31 +458,31 @@ alter table ACT_RU_EVENT_SUBSCR
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION; references ACT_RU_EXECUTION;
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_SOURCE add constraint ACT_FK_MODEL_SOURCE
foreign key (EDITOR_SOURCE_VALUE_ID_) foreign key (EDITOR_SOURCE_VALUE_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_SOURCE_EXTRA add constraint ACT_FK_MODEL_SOURCE_EXTRA
foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_) foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_DEPLOYMENT add constraint ACT_FK_MODEL_DEPLOYMENT
foreign key (DEPLOYMENT_ID_) foreign key (DEPLOYMENT_ID_)
references ACT_RE_DEPLOYMENT (ID_); references ACT_RE_DEPLOYMENT (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_FK_INFO_JSON_BA add constraint ACT_FK_INFO_JSON_BA
foreign key (INFO_JSON_ID_) foreign key (INFO_JSON_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_FK_INFO_PROCDEF add constraint ACT_FK_INFO_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_UNIQ_INFO_PROCDEF add constraint ACT_UNIQ_INFO_PROCDEF
unique (PROC_DEF_ID_); unique (PROC_DEF_ID_);
......
...@@ -77,14 +77,15 @@ create table ACT_RU_EXECUTION ( ...@@ -77,14 +77,15 @@ create table ACT_RU_EXECUTION (
START_USER_ID_ nvarchar(255), START_USER_ID_ nvarchar(255),
LOCK_TIME_ datetime, LOCK_TIME_ datetime,
IS_COUNT_ENABLED_ tinyint, IS_COUNT_ENABLED_ tinyint,
EVT_SUBSCR_COUNT_ int, EVT_SUBSCR_COUNT_ int,
TASK_COUNT_ int, TASK_COUNT_ int,
JOB_COUNT_ int, JOB_COUNT_ int,
TIMER_JOB_COUNT_ int, TIMER_JOB_COUNT_ int,
SUSP_JOB_COUNT_ int, SUSP_JOB_COUNT_ int,
DEADLETTER_JOB_COUNT_ int, DEADLETTER_JOB_COUNT_ int,
VAR_COUNT_ int, VAR_COUNT_ int,
ID_LINK_COUNT_ int, ID_LINK_COUNT_ int,
APP_VERSION_ int,
primary key (ID_) primary key (ID_)
); );
...@@ -183,6 +184,7 @@ create table ACT_RE_PROCDEF ( ...@@ -183,6 +184,7 @@ create table ACT_RE_PROCDEF (
SUSPENSION_STATE_ tinyint, SUSPENSION_STATE_ tinyint,
TENANT_ID_ nvarchar(255) default '', TENANT_ID_ nvarchar(255) default '',
ENGINE_VERSION_ nvarchar(255), ENGINE_VERSION_ nvarchar(255),
APP_VERSION_ int,
primary key (ID_) primary key (ID_)
); );
...@@ -207,6 +209,7 @@ create table ACT_RU_TASK ( ...@@ -207,6 +209,7 @@ create table ACT_RU_TASK (
TENANT_ID_ nvarchar(255) default '', TENANT_ID_ nvarchar(255) default '',
FORM_KEY_ nvarchar(255), FORM_KEY_ nvarchar(255),
CLAIM_TIME_ datetime, CLAIM_TIME_ datetime,
APP_VERSION_ int,
primary key (ID_) primary key (ID_)
); );
...@@ -328,62 +331,62 @@ create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID on ACT_RU_DEADLETTER_JOB( ...@@ -328,62 +331,62 @@ create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID on ACT_RU_DEADLETTER_JOB(
create index ACT_IDX_INFO_PROCDEF on ACT_PROCDEF_INFO(PROC_DEF_ID_); create index ACT_IDX_INFO_PROCDEF on ACT_PROCDEF_INFO(PROC_DEF_ID_);
alter table ACT_GE_BYTEARRAY alter table ACT_GE_BYTEARRAY
add constraint ACT_FK_BYTEARR_DEPL add constraint ACT_FK_BYTEARR_DEPL
foreign key (DEPLOYMENT_ID_) foreign key (DEPLOYMENT_ID_)
references ACT_RE_DEPLOYMENT (ID_); references ACT_RE_DEPLOYMENT (ID_);
alter table ACT_RE_PROCDEF alter table ACT_RE_PROCDEF
add constraint ACT_UNIQ_PROCDEF add constraint ACT_UNIQ_PROCDEF
unique (KEY_,VERSION_, TENANT_ID_); unique (KEY_,VERSION_, TENANT_ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PARENT add constraint ACT_FK_EXE_PARENT
foreign key (PARENT_ID_) foreign key (PARENT_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_SUPER add constraint ACT_FK_EXE_SUPER
foreign key (SUPER_EXEC_) foreign key (SUPER_EXEC_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PROCDEF add constraint ACT_FK_EXE_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_TSKASS_TASK add constraint ACT_FK_TSKASS_TASK
foreign key (TASK_ID_) foreign key (TASK_ID_)
references ACT_RU_TASK (ID_); references ACT_RU_TASK (ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_ATHRZ_PROCEDEF add constraint ACT_FK_ATHRZ_PROCEDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_IDL_PROCINST add constraint ACT_FK_IDL_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_EXE add constraint ACT_FK_TASK_EXE
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_PROCINST add constraint ACT_FK_TASK_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_PROCDEF add constraint ACT_FK_TASK_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_VARIABLE alter table ACT_RU_VARIABLE
add constraint ACT_FK_VAR_EXE add constraint ACT_FK_VAR_EXE
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_VARIABLE alter table ACT_RU_VARIABLE
...@@ -391,121 +394,121 @@ alter table ACT_RU_VARIABLE ...@@ -391,121 +394,121 @@ alter table ACT_RU_VARIABLE
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION(ID_); references ACT_RU_EXECUTION(ID_);
alter table ACT_RU_VARIABLE alter table ACT_RU_VARIABLE
add constraint ACT_FK_VAR_BYTEARRAY add constraint ACT_FK_VAR_BYTEARRAY
foreign key (BYTEARRAY_ID_) foreign key (BYTEARRAY_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_EXECUTION add constraint ACT_FK_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_PROCESS_INSTANCE add constraint ACT_FK_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_PROC_DEF add constraint ACT_FK_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_EXCEPTION add constraint ACT_FK_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_EXECUTION add constraint ACT_FK_TIMER_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_PROCESS_INSTANCE add constraint ACT_FK_TIMER_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_PROC_DEF add constraint ACT_FK_TIMER_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_EXCEPTION add constraint ACT_FK_TIMER_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_EXECUTION add constraint ACT_FK_SUSPENDED_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE add constraint ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_PROC_DEF add constraint ACT_FK_SUSPENDED_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_EXECUTION add constraint ACT_FK_DEADLETTER_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE add constraint ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_PROC_DEF add constraint ACT_FK_DEADLETTER_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_EVENT_SUBSCR alter table ACT_RU_EVENT_SUBSCR
add constraint ACT_FK_EVENT_EXEC add constraint ACT_FK_EVENT_EXEC
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION(ID_); references ACT_RU_EXECUTION(ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_SOURCE add constraint ACT_FK_MODEL_SOURCE
foreign key (EDITOR_SOURCE_VALUE_ID_) foreign key (EDITOR_SOURCE_VALUE_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_SOURCE_EXTRA add constraint ACT_FK_MODEL_SOURCE_EXTRA
foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_) foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_DEPLOYMENT add constraint ACT_FK_MODEL_DEPLOYMENT
foreign key (DEPLOYMENT_ID_) foreign key (DEPLOYMENT_ID_)
references ACT_RE_DEPLOYMENT (ID_); references ACT_RE_DEPLOYMENT (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_FK_INFO_JSON_BA add constraint ACT_FK_INFO_JSON_BA
foreign key (INFO_JSON_ID_) foreign key (INFO_JSON_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_FK_INFO_PROCDEF add constraint ACT_FK_INFO_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_UNIQ_INFO_PROCDEF add constraint ACT_UNIQ_INFO_PROCDEF
unique (PROC_DEF_ID_); unique (PROC_DEF_ID_);
......
...@@ -6,10 +6,10 @@ create table ACT_GE_PROPERTY ( ...@@ -6,10 +6,10 @@ create table ACT_GE_PROPERTY (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
insert into ACT_GE_PROPERTY insert into ACT_GE_PROPERTY
values ('schema.version', '7.0.0.0', 1); values ('schema.version', '7.1.0-M6', 1);
insert into ACT_GE_PROPERTY insert into ACT_GE_PROPERTY
values ('schema.history', 'create(7.0.0.0)', 1); values ('schema.history', 'create(7.1.0-M6)', 1);
insert into ACT_GE_PROPERTY insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1); values ('next.dbid', '1', 1);
...@@ -32,7 +32,7 @@ create table ACT_RE_DEPLOYMENT ( ...@@ -32,7 +32,7 @@ create table ACT_RE_DEPLOYMENT (
TENANT_ID_ varchar(255) default '', TENANT_ID_ varchar(255) default '',
DEPLOY_TIME_ timestamp(3) NULL, DEPLOY_TIME_ timestamp(3) NULL,
ENGINE_VERSION_ varchar(255), ENGINE_VERSION_ varchar(255),
VERSION_ integer, VERSION_ integer default 1,
PROJECT_RELEASE_VERSION_ varchar(255), PROJECT_RELEASE_VERSION_ varchar(255),
primary key (ID_) primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
...@@ -77,14 +77,15 @@ create table ACT_RU_EXECUTION ( ...@@ -77,14 +77,15 @@ create table ACT_RU_EXECUTION (
START_USER_ID_ varchar(255), START_USER_ID_ varchar(255),
LOCK_TIME_ timestamp(3) NULL, LOCK_TIME_ timestamp(3) NULL,
IS_COUNT_ENABLED_ TINYINT, IS_COUNT_ENABLED_ TINYINT,
EVT_SUBSCR_COUNT_ integer, EVT_SUBSCR_COUNT_ integer,
TASK_COUNT_ integer, TASK_COUNT_ integer,
JOB_COUNT_ integer, JOB_COUNT_ integer,
TIMER_JOB_COUNT_ integer, TIMER_JOB_COUNT_ integer,
SUSP_JOB_COUNT_ integer, SUSP_JOB_COUNT_ integer,
DEADLETTER_JOB_COUNT_ integer, DEADLETTER_JOB_COUNT_ integer,
VAR_COUNT_ integer, VAR_COUNT_ integer,
ID_LINK_COUNT_ integer, ID_LINK_COUNT_ integer,
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
...@@ -183,6 +184,7 @@ create table ACT_RE_PROCDEF ( ...@@ -183,6 +184,7 @@ create table ACT_RE_PROCDEF (
SUSPENSION_STATE_ integer, SUSPENSION_STATE_ integer,
TENANT_ID_ varchar(255) default '', TENANT_ID_ varchar(255) default '',
ENGINE_VERSION_ varchar(255), ENGINE_VERSION_ varchar(255),
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
...@@ -207,6 +209,7 @@ create table ACT_RU_TASK ( ...@@ -207,6 +209,7 @@ create table ACT_RU_TASK (
TENANT_ID_ varchar(255) default '', TENANT_ID_ varchar(255) default '',
FORM_KEY_ varchar(255), FORM_KEY_ varchar(255),
CLAIM_TIME_ datetime(3), CLAIM_TIME_ datetime(3),
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
...@@ -218,7 +221,7 @@ create table ACT_RU_IDENTITYLINK ( ...@@ -218,7 +221,7 @@ create table ACT_RU_IDENTITYLINK (
USER_ID_ varchar(255), USER_ID_ varchar(255),
TASK_ID_ varchar(64), TASK_ID_ varchar(64),
PROC_INST_ID_ varchar(64), PROC_INST_ID_ varchar(64),
PROC_DEF_ID_ varchar(64), PROC_DEF_ID_ varchar(64),
primary key (ID_) primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
...@@ -298,67 +301,67 @@ create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_); ...@@ -298,67 +301,67 @@ create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_);
create index ACT_IDX_INFO_PROCDEF on ACT_PROCDEF_INFO(PROC_DEF_ID_); create index ACT_IDX_INFO_PROCDEF on ACT_PROCDEF_INFO(PROC_DEF_ID_);
alter table ACT_GE_BYTEARRAY alter table ACT_GE_BYTEARRAY
add constraint ACT_FK_BYTEARR_DEPL add constraint ACT_FK_BYTEARR_DEPL
foreign key (DEPLOYMENT_ID_) foreign key (DEPLOYMENT_ID_)
references ACT_RE_DEPLOYMENT (ID_); references ACT_RE_DEPLOYMENT (ID_);
alter table ACT_RE_PROCDEF alter table ACT_RE_PROCDEF
add constraint ACT_UNIQ_PROCDEF add constraint ACT_UNIQ_PROCDEF
unique (KEY_,VERSION_, TENANT_ID_); unique (KEY_,VERSION_, TENANT_ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PROCINST add constraint ACT_FK_EXE_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_) on delete cascade on update cascade; references ACT_RU_EXECUTION (ID_) on delete cascade on update cascade;
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PARENT add constraint ACT_FK_EXE_PARENT
foreign key (PARENT_ID_) foreign key (PARENT_ID_)
references ACT_RU_EXECUTION (ID_) on delete cascade; references ACT_RU_EXECUTION (ID_) on delete cascade;
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_SUPER add constraint ACT_FK_EXE_SUPER
foreign key (SUPER_EXEC_) foreign key (SUPER_EXEC_)
references ACT_RU_EXECUTION (ID_) on delete cascade; references ACT_RU_EXECUTION (ID_) on delete cascade;
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PROCDEF add constraint ACT_FK_EXE_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_TSKASS_TASK add constraint ACT_FK_TSKASS_TASK
foreign key (TASK_ID_) foreign key (TASK_ID_)
references ACT_RU_TASK (ID_); references ACT_RU_TASK (ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_ATHRZ_PROCEDEF add constraint ACT_FK_ATHRZ_PROCEDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF(ID_); references ACT_RE_PROCDEF(ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_IDL_PROCINST add constraint ACT_FK_IDL_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_EXE add constraint ACT_FK_TASK_EXE
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_PROCINST add constraint ACT_FK_TASK_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_PROCDEF add constraint ACT_FK_TASK_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_VARIABLE alter table ACT_RU_VARIABLE
add constraint ACT_FK_VAR_EXE add constraint ACT_FK_VAR_EXE
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_VARIABLE alter table ACT_RU_VARIABLE
...@@ -366,121 +369,121 @@ alter table ACT_RU_VARIABLE ...@@ -366,121 +369,121 @@ alter table ACT_RU_VARIABLE
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION(ID_); references ACT_RU_EXECUTION(ID_);
alter table ACT_RU_VARIABLE alter table ACT_RU_VARIABLE
add constraint ACT_FK_VAR_BYTEARRAY add constraint ACT_FK_VAR_BYTEARRAY
foreign key (BYTEARRAY_ID_) foreign key (BYTEARRAY_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_EXECUTION add constraint ACT_FK_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_PROCESS_INSTANCE add constraint ACT_FK_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_PROC_DEF add constraint ACT_FK_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_EXCEPTION add constraint ACT_FK_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_EXECUTION add constraint ACT_FK_TIMER_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_PROCESS_INSTANCE add constraint ACT_FK_TIMER_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_PROC_DEF add constraint ACT_FK_TIMER_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_EXCEPTION add constraint ACT_FK_TIMER_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_EXECUTION add constraint ACT_FK_SUSPENDED_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE add constraint ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_PROC_DEF add constraint ACT_FK_SUSPENDED_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_EXECUTION add constraint ACT_FK_DEADLETTER_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE add constraint ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_PROC_DEF add constraint ACT_FK_DEADLETTER_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_EVENT_SUBSCR alter table ACT_RU_EVENT_SUBSCR
add constraint ACT_FK_EVENT_EXEC add constraint ACT_FK_EVENT_EXEC
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION(ID_); references ACT_RU_EXECUTION(ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_SOURCE add constraint ACT_FK_MODEL_SOURCE
foreign key (EDITOR_SOURCE_VALUE_ID_) foreign key (EDITOR_SOURCE_VALUE_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_SOURCE_EXTRA add constraint ACT_FK_MODEL_SOURCE_EXTRA
foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_) foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_DEPLOYMENT add constraint ACT_FK_MODEL_DEPLOYMENT
foreign key (DEPLOYMENT_ID_) foreign key (DEPLOYMENT_ID_)
references ACT_RE_DEPLOYMENT (ID_); references ACT_RE_DEPLOYMENT (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_FK_INFO_JSON_BA add constraint ACT_FK_INFO_JSON_BA
foreign key (INFO_JSON_ID_) foreign key (INFO_JSON_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_FK_INFO_PROCDEF add constraint ACT_FK_INFO_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_UNIQ_INFO_PROCDEF add constraint ACT_UNIQ_INFO_PROCDEF
unique (PROC_DEF_ID_); unique (PROC_DEF_ID_);
......
...@@ -32,7 +32,7 @@ create table ACT_RE_DEPLOYMENT ( ...@@ -32,7 +32,7 @@ create table ACT_RE_DEPLOYMENT (
TENANT_ID_ varchar(255) default '', TENANT_ID_ varchar(255) default '',
DEPLOY_TIME_ timestamp NULL, DEPLOY_TIME_ timestamp NULL,
ENGINE_VERSION_ varchar(255), ENGINE_VERSION_ varchar(255),
VERSION_ integer, VERSION_ integer default 1,
PROJECT_RELEASE_VERSION_ varchar(255), PROJECT_RELEASE_VERSION_ varchar(255),
primary key (ID_) primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
...@@ -77,14 +77,15 @@ create table ACT_RU_EXECUTION ( ...@@ -77,14 +77,15 @@ create table ACT_RU_EXECUTION (
START_USER_ID_ varchar(255), START_USER_ID_ varchar(255),
LOCK_TIME_ timestamp NULL, LOCK_TIME_ timestamp NULL,
IS_COUNT_ENABLED_ TINYINT, IS_COUNT_ENABLED_ TINYINT,
EVT_SUBSCR_COUNT_ integer, EVT_SUBSCR_COUNT_ integer,
TASK_COUNT_ integer, TASK_COUNT_ integer,
JOB_COUNT_ integer, JOB_COUNT_ integer,
TIMER_JOB_COUNT_ integer, TIMER_JOB_COUNT_ integer,
SUSP_JOB_COUNT_ integer, SUSP_JOB_COUNT_ integer,
DEADLETTER_JOB_COUNT_ integer, DEADLETTER_JOB_COUNT_ integer,
VAR_COUNT_ integer, VAR_COUNT_ integer,
ID_LINK_COUNT_ integer, ID_LINK_COUNT_ integer,
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
...@@ -183,6 +184,7 @@ create table ACT_RE_PROCDEF ( ...@@ -183,6 +184,7 @@ create table ACT_RE_PROCDEF (
SUSPENSION_STATE_ integer, SUSPENSION_STATE_ integer,
TENANT_ID_ varchar(255) default '', TENANT_ID_ varchar(255) default '',
ENGINE_VERSION_ varchar(255), ENGINE_VERSION_ varchar(255),
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
...@@ -207,6 +209,7 @@ create table ACT_RU_TASK ( ...@@ -207,6 +209,7 @@ create table ACT_RU_TASK (
TENANT_ID_ varchar(255) default '', TENANT_ID_ varchar(255) default '',
FORM_KEY_ varchar(255), FORM_KEY_ varchar(255),
CLAIM_TIME_ datetime, CLAIM_TIME_ datetime,
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
...@@ -218,7 +221,7 @@ create table ACT_RU_IDENTITYLINK ( ...@@ -218,7 +221,7 @@ create table ACT_RU_IDENTITYLINK (
USER_ID_ varchar(255), USER_ID_ varchar(255),
TASK_ID_ varchar(64), TASK_ID_ varchar(64),
PROC_INST_ID_ varchar(64), PROC_INST_ID_ varchar(64),
PROC_DEF_ID_ varchar(64), PROC_DEF_ID_ varchar(64),
primary key (ID_) primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
...@@ -298,67 +301,67 @@ create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_); ...@@ -298,67 +301,67 @@ create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_);
create index ACT_IDX_INFO_PROCDEF on ACT_PROCDEF_INFO(PROC_DEF_ID_); create index ACT_IDX_INFO_PROCDEF on ACT_PROCDEF_INFO(PROC_DEF_ID_);
alter table ACT_GE_BYTEARRAY alter table ACT_GE_BYTEARRAY
add constraint ACT_FK_BYTEARR_DEPL add constraint ACT_FK_BYTEARR_DEPL
foreign key (DEPLOYMENT_ID_) foreign key (DEPLOYMENT_ID_)
references ACT_RE_DEPLOYMENT (ID_); references ACT_RE_DEPLOYMENT (ID_);
alter table ACT_RE_PROCDEF alter table ACT_RE_PROCDEF
add constraint ACT_UNIQ_PROCDEF add constraint ACT_UNIQ_PROCDEF
unique (KEY_,VERSION_, TENANT_ID_); unique (KEY_,VERSION_, TENANT_ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PROCINST add constraint ACT_FK_EXE_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_) on delete cascade on update cascade; references ACT_RU_EXECUTION (ID_) on delete cascade on update cascade;
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PARENT add constraint ACT_FK_EXE_PARENT
foreign key (PARENT_ID_) foreign key (PARENT_ID_)
references ACT_RU_EXECUTION (ID_) on delete cascade; references ACT_RU_EXECUTION (ID_) on delete cascade;
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_SUPER add constraint ACT_FK_EXE_SUPER
foreign key (SUPER_EXEC_) foreign key (SUPER_EXEC_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PROCDEF add constraint ACT_FK_EXE_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_TSKASS_TASK add constraint ACT_FK_TSKASS_TASK
foreign key (TASK_ID_) foreign key (TASK_ID_)
references ACT_RU_TASK (ID_); references ACT_RU_TASK (ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_ATHRZ_PROCEDEF add constraint ACT_FK_ATHRZ_PROCEDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF(ID_); references ACT_RE_PROCDEF(ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_IDL_PROCINST add constraint ACT_FK_IDL_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_EXE add constraint ACT_FK_TASK_EXE
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_PROCINST add constraint ACT_FK_TASK_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_PROCDEF add constraint ACT_FK_TASK_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_VARIABLE alter table ACT_RU_VARIABLE
add constraint ACT_FK_VAR_EXE add constraint ACT_FK_VAR_EXE
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_VARIABLE alter table ACT_RU_VARIABLE
...@@ -366,121 +369,121 @@ alter table ACT_RU_VARIABLE ...@@ -366,121 +369,121 @@ alter table ACT_RU_VARIABLE
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION(ID_); references ACT_RU_EXECUTION(ID_);
alter table ACT_RU_VARIABLE alter table ACT_RU_VARIABLE
add constraint ACT_FK_VAR_BYTEARRAY add constraint ACT_FK_VAR_BYTEARRAY
foreign key (BYTEARRAY_ID_) foreign key (BYTEARRAY_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_EXECUTION add constraint ACT_FK_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_PROCESS_INSTANCE add constraint ACT_FK_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_PROC_DEF add constraint ACT_FK_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_EXCEPTION add constraint ACT_FK_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_EXECUTION add constraint ACT_FK_TIMER_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_PROCESS_INSTANCE add constraint ACT_FK_TIMER_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_PROC_DEF add constraint ACT_FK_TIMER_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_EXCEPTION add constraint ACT_FK_TIMER_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_EXECUTION add constraint ACT_FK_SUSPENDED_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE add constraint ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_PROC_DEF add constraint ACT_FK_SUSPENDED_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_EXECUTION add constraint ACT_FK_DEADLETTER_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE add constraint ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_PROC_DEF add constraint ACT_FK_DEADLETTER_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_EVENT_SUBSCR alter table ACT_RU_EVENT_SUBSCR
add constraint ACT_FK_EVENT_EXEC add constraint ACT_FK_EVENT_EXEC
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION(ID_); references ACT_RU_EXECUTION(ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_SOURCE add constraint ACT_FK_MODEL_SOURCE
foreign key (EDITOR_SOURCE_VALUE_ID_) foreign key (EDITOR_SOURCE_VALUE_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_SOURCE_EXTRA add constraint ACT_FK_MODEL_SOURCE_EXTRA
foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_) foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_DEPLOYMENT add constraint ACT_FK_MODEL_DEPLOYMENT
foreign key (DEPLOYMENT_ID_) foreign key (DEPLOYMENT_ID_)
references ACT_RE_DEPLOYMENT (ID_); references ACT_RE_DEPLOYMENT (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_FK_INFO_JSON_BA add constraint ACT_FK_INFO_JSON_BA
foreign key (INFO_JSON_ID_) foreign key (INFO_JSON_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_FK_INFO_PROCDEF add constraint ACT_FK_INFO_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_UNIQ_INFO_PROCDEF add constraint ACT_UNIQ_INFO_PROCDEF
unique (PROC_DEF_ID_); unique (PROC_DEF_ID_);
......
...@@ -32,7 +32,7 @@ create table ACT_RE_DEPLOYMENT ( ...@@ -32,7 +32,7 @@ create table ACT_RE_DEPLOYMENT (
TENANT_ID_ NVARCHAR2(255) DEFAULT '', TENANT_ID_ NVARCHAR2(255) DEFAULT '',
DEPLOY_TIME_ TIMESTAMP(6), DEPLOY_TIME_ TIMESTAMP(6),
ENGINE_VERSION_ NVARCHAR2(255), ENGINE_VERSION_ NVARCHAR2(255),
VERSION_ INTEGER, VERSION_ INTEGER DEFAULT 1,
PROJECT_RELEASE_VERSION_ NVARCHAR2(255), PROJECT_RELEASE_VERSION_ NVARCHAR2(255),
primary key (ID_) primary key (ID_)
); );
...@@ -77,14 +77,15 @@ create table ACT_RU_EXECUTION ( ...@@ -77,14 +77,15 @@ create table ACT_RU_EXECUTION (
START_USER_ID_ NVARCHAR2(255), START_USER_ID_ NVARCHAR2(255),
LOCK_TIME_ TIMESTAMP(6), LOCK_TIME_ TIMESTAMP(6),
IS_COUNT_ENABLED_ NUMBER(1,0) CHECK (IS_COUNT_ENABLED_ IN (1,0)), IS_COUNT_ENABLED_ NUMBER(1,0) CHECK (IS_COUNT_ENABLED_ IN (1,0)),
EVT_SUBSCR_COUNT_ INTEGER, EVT_SUBSCR_COUNT_ INTEGER,
TASK_COUNT_ INTEGER, TASK_COUNT_ INTEGER,
JOB_COUNT_ INTEGER, JOB_COUNT_ INTEGER,
TIMER_JOB_COUNT_ INTEGER, TIMER_JOB_COUNT_ INTEGER,
SUSP_JOB_COUNT_ INTEGER, SUSP_JOB_COUNT_ INTEGER,
DEADLETTER_JOB_COUNT_ INTEGER, DEADLETTER_JOB_COUNT_ INTEGER,
VAR_COUNT_ INTEGER, VAR_COUNT_ INTEGER,
ID_LINK_COUNT_ INTEGER, ID_LINK_COUNT_ INTEGER,
APP_VERSION_ INTEGER,
primary key (ID_) primary key (ID_)
); );
...@@ -183,6 +184,7 @@ create table ACT_RE_PROCDEF ( ...@@ -183,6 +184,7 @@ create table ACT_RE_PROCDEF (
SUSPENSION_STATE_ INTEGER, SUSPENSION_STATE_ INTEGER,
TENANT_ID_ NVARCHAR2(255) DEFAULT '', TENANT_ID_ NVARCHAR2(255) DEFAULT '',
ENGINE_VERSION_ NVARCHAR2(255), ENGINE_VERSION_ NVARCHAR2(255),
APP_VERSION_ INTEGER,
primary key (ID_) primary key (ID_)
); );
...@@ -207,6 +209,7 @@ create table ACT_RU_TASK ( ...@@ -207,6 +209,7 @@ create table ACT_RU_TASK (
TENANT_ID_ NVARCHAR2(255) DEFAULT '', TENANT_ID_ NVARCHAR2(255) DEFAULT '',
FORM_KEY_ NVARCHAR2(255), FORM_KEY_ NVARCHAR2(255),
CLAIM_TIME_ TIMESTAMP(6), CLAIM_TIME_ TIMESTAMP(6),
APP_VERSION_ INTEGER,
primary key (ID_) primary key (ID_)
); );
...@@ -300,77 +303,77 @@ create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_); ...@@ -300,77 +303,77 @@ create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_);
create index ACT_IDX_BYTEAR_DEPL on ACT_GE_BYTEARRAY(DEPLOYMENT_ID_); create index ACT_IDX_BYTEAR_DEPL on ACT_GE_BYTEARRAY(DEPLOYMENT_ID_);
alter table ACT_GE_BYTEARRAY alter table ACT_GE_BYTEARRAY
add constraint ACT_FK_BYTEARR_DEPL add constraint ACT_FK_BYTEARR_DEPL
foreign key (DEPLOYMENT_ID_) foreign key (DEPLOYMENT_ID_)
references ACT_RE_DEPLOYMENT (ID_); references ACT_RE_DEPLOYMENT (ID_);
alter table ACT_RE_PROCDEF alter table ACT_RE_PROCDEF
add constraint ACT_UNIQ_PROCDEF add constraint ACT_UNIQ_PROCDEF
unique (KEY_,VERSION_, TENANT_ID_); unique (KEY_,VERSION_, TENANT_ID_);
create index ACT_IDX_EXE_PROCINST on ACT_RU_EXECUTION(PROC_INST_ID_); create index ACT_IDX_EXE_PROCINST on ACT_RU_EXECUTION(PROC_INST_ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PROCINST add constraint ACT_FK_EXE_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_EXE_PARENT on ACT_RU_EXECUTION(PARENT_ID_); create index ACT_IDX_EXE_PARENT on ACT_RU_EXECUTION(PARENT_ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PARENT add constraint ACT_FK_EXE_PARENT
foreign key (PARENT_ID_) foreign key (PARENT_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_EXE_SUPER on ACT_RU_EXECUTION(SUPER_EXEC_); create index ACT_IDX_EXE_SUPER on ACT_RU_EXECUTION(SUPER_EXEC_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_SUPER add constraint ACT_FK_EXE_SUPER
foreign key (SUPER_EXEC_) foreign key (SUPER_EXEC_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_EXE_PROCDEF on ACT_RU_EXECUTION(PROC_DEF_ID_); create index ACT_IDX_EXE_PROCDEF on ACT_RU_EXECUTION(PROC_DEF_ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PROCDEF add constraint ACT_FK_EXE_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
create index ACT_IDX_TSKASS_TASK on ACT_RU_IDENTITYLINK(TASK_ID_); create index ACT_IDX_TSKASS_TASK on ACT_RU_IDENTITYLINK(TASK_ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_TSKASS_TASK add constraint ACT_FK_TSKASS_TASK
foreign key (TASK_ID_) foreign key (TASK_ID_)
references ACT_RU_TASK (ID_); references ACT_RU_TASK (ID_);
create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_); create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_ATHRZ_PROCEDEF add constraint ACT_FK_ATHRZ_PROCEDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
create index ACT_IDX_IDL_PROCINST on ACT_RU_IDENTITYLINK(PROC_INST_ID_); create index ACT_IDX_IDL_PROCINST on ACT_RU_IDENTITYLINK(PROC_INST_ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_IDL_PROCINST add constraint ACT_FK_IDL_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_TASK_EXEC on ACT_RU_TASK(EXECUTION_ID_); create index ACT_IDX_TASK_EXEC on ACT_RU_TASK(EXECUTION_ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_EXE add constraint ACT_FK_TASK_EXE
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_TASK_PROCINST on ACT_RU_TASK(PROC_INST_ID_); create index ACT_IDX_TASK_PROCINST on ACT_RU_TASK(PROC_INST_ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_PROCINST add constraint ACT_FK_TASK_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_TASK_PROCDEF on ACT_RU_TASK(PROC_DEF_ID_); create index ACT_IDX_TASK_PROCDEF on ACT_RU_TASK(PROC_DEF_ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_PROCDEF add constraint ACT_FK_TASK_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
create index ACT_IDX_VAR_EXE on ACT_RU_VARIABLE(EXECUTION_ID_); create index ACT_IDX_VAR_EXE on ACT_RU_VARIABLE(EXECUTION_ID_);
alter table ACT_RU_VARIABLE alter table ACT_RU_VARIABLE
add constraint ACT_FK_VAR_EXE add constraint ACT_FK_VAR_EXE
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_VAR_PROCINST on ACT_RU_VARIABLE(PROC_INST_ID_); create index ACT_IDX_VAR_PROCINST on ACT_RU_VARIABLE(PROC_INST_ID_);
...@@ -380,107 +383,107 @@ alter table ACT_RU_VARIABLE ...@@ -380,107 +383,107 @@ alter table ACT_RU_VARIABLE
references ACT_RU_EXECUTION(ID_); references ACT_RU_EXECUTION(ID_);
create index ACT_IDX_VAR_BYTEARRAY on ACT_RU_VARIABLE(BYTEARRAY_ID_); create index ACT_IDX_VAR_BYTEARRAY on ACT_RU_VARIABLE(BYTEARRAY_ID_);
alter table ACT_RU_VARIABLE alter table ACT_RU_VARIABLE
add constraint ACT_FK_VAR_BYTEARRAY add constraint ACT_FK_VAR_BYTEARRAY
foreign key (BYTEARRAY_ID_) foreign key (BYTEARRAY_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
create index ACT_IDX_JOB_EXECUTION_ID on ACT_RU_JOB(EXECUTION_ID_); create index ACT_IDX_JOB_EXECUTION_ID on ACT_RU_JOB(EXECUTION_ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_EXECUTION add constraint ACT_FK_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_JOB_PROC_INST_ID on ACT_RU_JOB(PROCESS_INSTANCE_ID_); create index ACT_IDX_JOB_PROC_INST_ID on ACT_RU_JOB(PROCESS_INSTANCE_ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_PROCESS_INSTANCE add constraint ACT_FK_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_JOB_PROC_DEF_ID on ACT_RU_JOB(PROC_DEF_ID_); create index ACT_IDX_JOB_PROC_DEF_ID on ACT_RU_JOB(PROC_DEF_ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_PROC_DEF add constraint ACT_FK_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
create index ACT_IDX_JOB_EXCEPTION on ACT_RU_JOB(EXCEPTION_STACK_ID_); create index ACT_IDX_JOB_EXCEPTION on ACT_RU_JOB(EXCEPTION_STACK_ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_EXCEPTION add constraint ACT_FK_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
create index ACT_IDX_TJOB_EXECUTION_ID on ACT_RU_TIMER_JOB(EXECUTION_ID_); create index ACT_IDX_TJOB_EXECUTION_ID on ACT_RU_TIMER_JOB(EXECUTION_ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TJOB_EXECUTION add constraint ACT_FK_TJOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_TJOB_PROC_INST_ID on ACT_RU_TIMER_JOB(PROCESS_INSTANCE_ID_); create index ACT_IDX_TJOB_PROC_INST_ID on ACT_RU_TIMER_JOB(PROCESS_INSTANCE_ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TJOB_PROCESS_INSTANCE add constraint ACT_FK_TJOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_TJOB_PROC_DEF_ID on ACT_RU_TIMER_JOB(PROC_DEF_ID_); create index ACT_IDX_TJOB_PROC_DEF_ID on ACT_RU_TIMER_JOB(PROC_DEF_ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TJOB_PROC_DEF add constraint ACT_FK_TJOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
create index ACT_IDX_TJOB_EXCEPTION on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_); create index ACT_IDX_TJOB_EXCEPTION on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TJOB_EXCEPTION add constraint ACT_FK_TJOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
create index ACT_IDX_SJOB_EXECUTION_ID on ACT_RU_SUSPENDED_JOB(EXECUTION_ID_); create index ACT_IDX_SJOB_EXECUTION_ID on ACT_RU_SUSPENDED_JOB(EXECUTION_ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SJOB_EXECUTION add constraint ACT_FK_SJOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_SJOB_PROC_INST_ID on ACT_RU_SUSPENDED_JOB(PROCESS_INSTANCE_ID_); create index ACT_IDX_SJOB_PROC_INST_ID on ACT_RU_SUSPENDED_JOB(PROCESS_INSTANCE_ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SJOB_PROCESS_INSTANCE add constraint ACT_FK_SJOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_SJOB_PROC_DEF_ID on ACT_RU_SUSPENDED_JOB(PROC_DEF_ID_); create index ACT_IDX_SJOB_PROC_DEF_ID on ACT_RU_SUSPENDED_JOB(PROC_DEF_ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SJOB_PROC_DEF add constraint ACT_FK_SJOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
create index ACT_IDX_SJOB_EXCEPTION on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_); create index ACT_IDX_SJOB_EXCEPTION on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SJOB_EXCEPTION add constraint ACT_FK_SJOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
create index ACT_IDX_DJOB_EXECUTION_ID on ACT_RU_DEADLETTER_JOB(EXECUTION_ID_); create index ACT_IDX_DJOB_EXECUTION_ID on ACT_RU_DEADLETTER_JOB(EXECUTION_ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DJOB_EXECUTION add constraint ACT_FK_DJOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_DJOB_PROC_INST_ID on ACT_RU_DEADLETTER_JOB(PROCESS_INSTANCE_ID_); create index ACT_IDX_DJOB_PROC_INST_ID on ACT_RU_DEADLETTER_JOB(PROCESS_INSTANCE_ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DJOB_PROCESS_INSTANCE add constraint ACT_FK_DJOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_DJOB_PROC_DEF_ID on ACT_RU_DEADLETTER_JOB(PROC_DEF_ID_); create index ACT_IDX_DJOB_PROC_DEF_ID on ACT_RU_DEADLETTER_JOB(PROC_DEF_ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DJOB_PROC_DEF add constraint ACT_FK_DJOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
create index ACT_IDX_DJOB_EXCEPTION on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_); create index ACT_IDX_DJOB_EXCEPTION on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DJOB_EXCEPTION add constraint ACT_FK_DJOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
create index ACT_IDX_EVENT_SUBSCR on ACT_RU_EVENT_SUBSCR(EXECUTION_ID_); create index ACT_IDX_EVENT_SUBSCR on ACT_RU_EVENT_SUBSCR(EXECUTION_ID_);
alter table ACT_RU_EVENT_SUBSCR alter table ACT_RU_EVENT_SUBSCR
add constraint ACT_FK_EVENT_EXEC add constraint ACT_FK_EVENT_EXEC
...@@ -488,35 +491,35 @@ alter table ACT_RU_EVENT_SUBSCR ...@@ -488,35 +491,35 @@ alter table ACT_RU_EVENT_SUBSCR
references ACT_RU_EXECUTION(ID_); references ACT_RU_EXECUTION(ID_);
create index ACT_IDX_MODEL_SOURCE on ACT_RE_MODEL(EDITOR_SOURCE_VALUE_ID_); create index ACT_IDX_MODEL_SOURCE on ACT_RE_MODEL(EDITOR_SOURCE_VALUE_ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_SOURCE add constraint ACT_FK_MODEL_SOURCE
foreign key (EDITOR_SOURCE_VALUE_ID_) foreign key (EDITOR_SOURCE_VALUE_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
create index ACT_IDX_MODEL_SOURCE_EXTRA on ACT_RE_MODEL(EDITOR_SOURCE_EXTRA_VALUE_ID_); create index ACT_IDX_MODEL_SOURCE_EXTRA on ACT_RE_MODEL(EDITOR_SOURCE_EXTRA_VALUE_ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_SOURCE_EXTRA add constraint ACT_FK_MODEL_SOURCE_EXTRA
foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_) foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
create index ACT_IDX_MODEL_DEPLOYMENT on ACT_RE_MODEL(DEPLOYMENT_ID_); create index ACT_IDX_MODEL_DEPLOYMENT on ACT_RE_MODEL(DEPLOYMENT_ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_DEPLOYMENT add constraint ACT_FK_MODEL_DEPLOYMENT
foreign key (DEPLOYMENT_ID_) foreign key (DEPLOYMENT_ID_)
references ACT_RE_DEPLOYMENT (ID_); references ACT_RE_DEPLOYMENT (ID_);
create index ACT_IDX_PROCDEF_INFO_JSON on ACT_PROCDEF_INFO(INFO_JSON_ID_); create index ACT_IDX_PROCDEF_INFO_JSON on ACT_PROCDEF_INFO(INFO_JSON_ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_FK_INFO_JSON_BA add constraint ACT_FK_INFO_JSON_BA
foreign key (INFO_JSON_ID_) foreign key (INFO_JSON_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
create index ACT_IDX_PROCDEF_INFO_PROC on ACT_PROCDEF_INFO(PROC_DEF_ID_); create index ACT_IDX_PROCDEF_INFO_PROC on ACT_PROCDEF_INFO(PROC_DEF_ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_FK_INFO_PROCDEF add constraint ACT_FK_INFO_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_UNIQ_INFO_PROCDEF add constraint ACT_UNIQ_INFO_PROCDEF
unique (PROC_DEF_ID_); unique (PROC_DEF_ID_);
......
...@@ -6,10 +6,10 @@ create table ACT_GE_PROPERTY ( ...@@ -6,10 +6,10 @@ create table ACT_GE_PROPERTY (
); );
insert into ACT_GE_PROPERTY insert into ACT_GE_PROPERTY
values ('schema.version', '7.0.0.0', 1); values ('schema.version', '7.1.0-M6', 1);
insert into ACT_GE_PROPERTY insert into ACT_GE_PROPERTY
values ('schema.history', 'create(7.0.0.0)', 1); values ('schema.history', 'create(7.1.0-M6)', 1);
insert into ACT_GE_PROPERTY insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1); values ('next.dbid', '1', 1);
...@@ -32,7 +32,7 @@ create table ACT_RE_DEPLOYMENT ( ...@@ -32,7 +32,7 @@ create table ACT_RE_DEPLOYMENT (
TENANT_ID_ varchar(255) default '', TENANT_ID_ varchar(255) default '',
DEPLOY_TIME_ timestamp, DEPLOY_TIME_ timestamp,
ENGINE_VERSION_ varchar(255), ENGINE_VERSION_ varchar(255),
VERSION_ integer, VERSION_ integer default 1,
PROJECT_RELEASE_VERSION_ varchar(255), PROJECT_RELEASE_VERSION_ varchar(255),
primary key (ID_) primary key (ID_)
); );
...@@ -77,14 +77,15 @@ create table ACT_RU_EXECUTION ( ...@@ -77,14 +77,15 @@ create table ACT_RU_EXECUTION (
START_USER_ID_ varchar(255), START_USER_ID_ varchar(255),
LOCK_TIME_ timestamp, LOCK_TIME_ timestamp,
IS_COUNT_ENABLED_ boolean, IS_COUNT_ENABLED_ boolean,
EVT_SUBSCR_COUNT_ integer, EVT_SUBSCR_COUNT_ integer,
TASK_COUNT_ integer, TASK_COUNT_ integer,
JOB_COUNT_ integer, JOB_COUNT_ integer,
TIMER_JOB_COUNT_ integer, TIMER_JOB_COUNT_ integer,
SUSP_JOB_COUNT_ integer, SUSP_JOB_COUNT_ integer,
DEADLETTER_JOB_COUNT_ integer, DEADLETTER_JOB_COUNT_ integer,
VAR_COUNT_ integer, VAR_COUNT_ integer,
ID_LINK_COUNT_ integer, ID_LINK_COUNT_ integer,
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
); );
...@@ -183,6 +184,7 @@ create table ACT_RE_PROCDEF ( ...@@ -183,6 +184,7 @@ create table ACT_RE_PROCDEF (
SUSPENSION_STATE_ integer, SUSPENSION_STATE_ integer,
TENANT_ID_ varchar(255) default '', TENANT_ID_ varchar(255) default '',
ENGINE_VERSION_ varchar(255), ENGINE_VERSION_ varchar(255),
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
); );
...@@ -207,6 +209,7 @@ create table ACT_RU_TASK ( ...@@ -207,6 +209,7 @@ create table ACT_RU_TASK (
TENANT_ID_ varchar(255) default '', TENANT_ID_ varchar(255) default '',
FORM_KEY_ varchar(255), FORM_KEY_ varchar(255),
CLAIM_TIME_ timestamp, CLAIM_TIME_ timestamp,
APP_VERSION_ integer,
primary key (ID_) primary key (ID_)
); );
...@@ -297,79 +300,79 @@ create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_); ...@@ -297,79 +300,79 @@ create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_);
create index ACT_IDX_BYTEAR_DEPL on ACT_GE_BYTEARRAY(DEPLOYMENT_ID_); create index ACT_IDX_BYTEAR_DEPL on ACT_GE_BYTEARRAY(DEPLOYMENT_ID_);
alter table ACT_GE_BYTEARRAY alter table ACT_GE_BYTEARRAY
add constraint ACT_FK_BYTEARR_DEPL add constraint ACT_FK_BYTEARR_DEPL
foreign key (DEPLOYMENT_ID_) foreign key (DEPLOYMENT_ID_)
references ACT_RE_DEPLOYMENT (ID_); references ACT_RE_DEPLOYMENT (ID_);
alter table ACT_RE_PROCDEF alter table ACT_RE_PROCDEF
add constraint ACT_UNIQ_PROCDEF add constraint ACT_UNIQ_PROCDEF
unique (KEY_,VERSION_, TENANT_ID_); unique (KEY_,VERSION_, TENANT_ID_);
create index ACT_IDX_EXE_PROCINST on ACT_RU_EXECUTION(PROC_INST_ID_); create index ACT_IDX_EXE_PROCINST on ACT_RU_EXECUTION(PROC_INST_ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PROCINST add constraint ACT_FK_EXE_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_EXE_PARENT on ACT_RU_EXECUTION(PARENT_ID_); create index ACT_IDX_EXE_PARENT on ACT_RU_EXECUTION(PARENT_ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PARENT add constraint ACT_FK_EXE_PARENT
foreign key (PARENT_ID_) foreign key (PARENT_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_EXE_SUPER on ACT_RU_EXECUTION(SUPER_EXEC_); create index ACT_IDX_EXE_SUPER on ACT_RU_EXECUTION(SUPER_EXEC_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_SUPER add constraint ACT_FK_EXE_SUPER
foreign key (SUPER_EXEC_) foreign key (SUPER_EXEC_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_EXE_PROCDEF on ACT_RU_EXECUTION(PROC_DEF_ID_);
create index ACT_IDX_EXE_PROCDEF on ACT_RU_EXECUTION(PROC_DEF_ID_);
alter table ACT_RU_EXECUTION alter table ACT_RU_EXECUTION
add constraint ACT_FK_EXE_PROCDEF add constraint ACT_FK_EXE_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
create index ACT_IDX_TSKASS_TASK on ACT_RU_IDENTITYLINK(TASK_ID_); create index ACT_IDX_TSKASS_TASK on ACT_RU_IDENTITYLINK(TASK_ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_TSKASS_TASK add constraint ACT_FK_TSKASS_TASK
foreign key (TASK_ID_) foreign key (TASK_ID_)
references ACT_RU_TASK (ID_); references ACT_RU_TASK (ID_);
create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_); create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_ATHRZ_PROCEDEF add constraint ACT_FK_ATHRZ_PROCEDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
create index ACT_IDX_IDL_PROCINST on ACT_RU_IDENTITYLINK(PROC_INST_ID_); create index ACT_IDX_IDL_PROCINST on ACT_RU_IDENTITYLINK(PROC_INST_ID_);
alter table ACT_RU_IDENTITYLINK alter table ACT_RU_IDENTITYLINK
add constraint ACT_FK_IDL_PROCINST add constraint ACT_FK_IDL_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_TASK_EXEC on ACT_RU_TASK(EXECUTION_ID_); create index ACT_IDX_TASK_EXEC on ACT_RU_TASK(EXECUTION_ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_EXE add constraint ACT_FK_TASK_EXE
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_TASK_PROCINST on ACT_RU_TASK(PROC_INST_ID_); create index ACT_IDX_TASK_PROCINST on ACT_RU_TASK(PROC_INST_ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_PROCINST add constraint ACT_FK_TASK_PROCINST
foreign key (PROC_INST_ID_) foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_TASK_PROCDEF on ACT_RU_TASK(PROC_DEF_ID_); create index ACT_IDX_TASK_PROCDEF on ACT_RU_TASK(PROC_DEF_ID_);
alter table ACT_RU_TASK alter table ACT_RU_TASK
add constraint ACT_FK_TASK_PROCDEF add constraint ACT_FK_TASK_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
create index ACT_IDX_VAR_EXE on ACT_RU_VARIABLE(EXECUTION_ID_); create index ACT_IDX_VAR_EXE on ACT_RU_VARIABLE(EXECUTION_ID_);
alter table ACT_RU_VARIABLE alter table ACT_RU_VARIABLE
add constraint ACT_FK_VAR_EXE add constraint ACT_FK_VAR_EXE
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_VAR_PROCINST on ACT_RU_VARIABLE(PROC_INST_ID_); create index ACT_IDX_VAR_PROCINST on ACT_RU_VARIABLE(PROC_INST_ID_);
...@@ -379,105 +382,105 @@ alter table ACT_RU_VARIABLE ...@@ -379,105 +382,105 @@ alter table ACT_RU_VARIABLE
references ACT_RU_EXECUTION(ID_); references ACT_RU_EXECUTION(ID_);
create index ACT_IDX_VAR_BYTEARRAY on ACT_RU_VARIABLE(BYTEARRAY_ID_); create index ACT_IDX_VAR_BYTEARRAY on ACT_RU_VARIABLE(BYTEARRAY_ID_);
alter table ACT_RU_VARIABLE alter table ACT_RU_VARIABLE
add constraint ACT_FK_VAR_BYTEARRAY add constraint ACT_FK_VAR_BYTEARRAY
foreign key (BYTEARRAY_ID_) foreign key (BYTEARRAY_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
create index ACT_IDX_JOB_EXECUTION_ID on ACT_RU_JOB(EXECUTION_ID_); create index ACT_IDX_JOB_EXECUTION_ID on ACT_RU_JOB(EXECUTION_ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_EXECUTION add constraint ACT_FK_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_JOB_PROCESS_INSTANCE_ID on ACT_RU_JOB(PROCESS_INSTANCE_ID_); create index ACT_IDX_JOB_PROCESS_INSTANCE_ID on ACT_RU_JOB(PROCESS_INSTANCE_ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_PROCESS_INSTANCE add constraint ACT_FK_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_JOB_PROC_DEF_ID on ACT_RU_JOB(PROC_DEF_ID_); create index ACT_IDX_JOB_PROC_DEF_ID on ACT_RU_JOB(PROC_DEF_ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_PROC_DEF add constraint ACT_FK_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
create index ACT_IDX_JOB_EXCEPTION on ACT_RU_JOB(EXCEPTION_STACK_ID_); create index ACT_IDX_JOB_EXCEPTION on ACT_RU_JOB(EXCEPTION_STACK_ID_);
alter table ACT_RU_JOB alter table ACT_RU_JOB
add constraint ACT_FK_JOB_EXCEPTION add constraint ACT_FK_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
create index ACT_IDX_TIMER_JOB_EXECUTION_ID on ACT_RU_TIMER_JOB(EXECUTION_ID_); create index ACT_IDX_TIMER_JOB_EXECUTION_ID on ACT_RU_TIMER_JOB(EXECUTION_ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_EXECUTION add constraint ACT_FK_TIMER_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_TIMER_JOB_PROCESS_INSTANCE_ID on ACT_RU_TIMER_JOB(PROCESS_INSTANCE_ID_); create index ACT_IDX_TIMER_JOB_PROCESS_INSTANCE_ID on ACT_RU_TIMER_JOB(PROCESS_INSTANCE_ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_PROCESS_INSTANCE add constraint ACT_FK_TIMER_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_TIMER_JOB_PROC_DEF_ID on ACT_RU_TIMER_JOB(PROC_DEF_ID_); create index ACT_IDX_TIMER_JOB_PROC_DEF_ID on ACT_RU_TIMER_JOB(PROC_DEF_ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_PROC_DEF add constraint ACT_FK_TIMER_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
create index ACT_IDX_TIMER_JOB_EXCEPTION on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_); create index ACT_IDX_TIMER_JOB_EXCEPTION on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
alter table ACT_RU_TIMER_JOB alter table ACT_RU_TIMER_JOB
add constraint ACT_FK_TIMER_JOB_EXCEPTION add constraint ACT_FK_TIMER_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
create index ACT_IDX_SUSPENDED_JOB_EXECUTION_ID on ACT_RU_SUSPENDED_JOB(EXECUTION_ID_); create index ACT_IDX_SUSPENDED_JOB_EXECUTION_ID on ACT_RU_SUSPENDED_JOB(EXECUTION_ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_EXECUTION add constraint ACT_FK_SUSPENDED_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_SUSPENDED_JOB_PROCESS_INSTANCE_ID on ACT_RU_SUSPENDED_JOB(PROCESS_INSTANCE_ID_); create index ACT_IDX_SUSPENDED_JOB_PROCESS_INSTANCE_ID on ACT_RU_SUSPENDED_JOB(PROCESS_INSTANCE_ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE add constraint ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_SUSPENDED_JOB_PROC_DEF_ID on ACT_RU_SUSPENDED_JOB(PROC_DEF_ID_); create index ACT_IDX_SUSPENDED_JOB_PROC_DEF_ID on ACT_RU_SUSPENDED_JOB(PROC_DEF_ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_PROC_DEF add constraint ACT_FK_SUSPENDED_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
create index ACT_IDX_SUSPENDED_JOB_EXCEPTION on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_); create index ACT_IDX_SUSPENDED_JOB_EXCEPTION on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
alter table ACT_RU_SUSPENDED_JOB alter table ACT_RU_SUSPENDED_JOB
add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
create index ACT_IDX_DEADLETTER_JOB_EXECUTION_ID on ACT_RU_DEADLETTER_JOB(EXECUTION_ID_); create index ACT_IDX_DEADLETTER_JOB_EXECUTION_ID on ACT_RU_DEADLETTER_JOB(EXECUTION_ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_EXECUTION add constraint ACT_FK_DEADLETTER_JOB_EXECUTION
foreign key (EXECUTION_ID_) foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_DEADLETTER_JOB_PROCESS_INSTANCE_ID on ACT_RU_DEADLETTER_JOB(PROCESS_INSTANCE_ID_); create index ACT_IDX_DEADLETTER_JOB_PROCESS_INSTANCE_ID on ACT_RU_DEADLETTER_JOB(PROCESS_INSTANCE_ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE add constraint ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE
foreign key (PROCESS_INSTANCE_ID_) foreign key (PROCESS_INSTANCE_ID_)
references ACT_RU_EXECUTION (ID_); references ACT_RU_EXECUTION (ID_);
create index ACT_IDX_DEADLETTER_JOB_PROC_DEF_ID on ACT_RU_DEADLETTER_JOB(PROC_DEF_ID_); create index ACT_IDX_DEADLETTER_JOB_PROC_DEF_ID on ACT_RU_DEADLETTER_JOB(PROC_DEF_ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_PROC_DEF add constraint ACT_FK_DEADLETTER_JOB_PROC_DEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
create index ACT_IDX_DEADLETTER_JOB_EXCEPTION on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_); create index ACT_IDX_DEADLETTER_JOB_EXCEPTION on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
alter table ACT_RU_DEADLETTER_JOB alter table ACT_RU_DEADLETTER_JOB
add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION
foreign key (EXCEPTION_STACK_ID_) foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
create index ACT_IDX_EVENT_SUBSCR on ACT_RU_EVENT_SUBSCR(EXECUTION_ID_); create index ACT_IDX_EVENT_SUBSCR on ACT_RU_EVENT_SUBSCR(EXECUTION_ID_);
...@@ -487,35 +490,35 @@ alter table ACT_RU_EVENT_SUBSCR ...@@ -487,35 +490,35 @@ alter table ACT_RU_EVENT_SUBSCR
references ACT_RU_EXECUTION(ID_); references ACT_RU_EXECUTION(ID_);
create index ACT_IDX_MODEL_SOURCE on ACT_RE_MODEL(EDITOR_SOURCE_VALUE_ID_); create index ACT_IDX_MODEL_SOURCE on ACT_RE_MODEL(EDITOR_SOURCE_VALUE_ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_SOURCE add constraint ACT_FK_MODEL_SOURCE
foreign key (EDITOR_SOURCE_VALUE_ID_) foreign key (EDITOR_SOURCE_VALUE_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
create index ACT_IDX_MODEL_SOURCE_EXTRA on ACT_RE_MODEL(EDITOR_SOURCE_EXTRA_VALUE_ID_); create index ACT_IDX_MODEL_SOURCE_EXTRA on ACT_RE_MODEL(EDITOR_SOURCE_EXTRA_VALUE_ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_SOURCE_EXTRA add constraint ACT_FK_MODEL_SOURCE_EXTRA
foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_) foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
create index ACT_IDX_MODEL_DEPLOYMENT on ACT_RE_MODEL(DEPLOYMENT_ID_); create index ACT_IDX_MODEL_DEPLOYMENT on ACT_RE_MODEL(DEPLOYMENT_ID_);
alter table ACT_RE_MODEL alter table ACT_RE_MODEL
add constraint ACT_FK_MODEL_DEPLOYMENT add constraint ACT_FK_MODEL_DEPLOYMENT
foreign key (DEPLOYMENT_ID_) foreign key (DEPLOYMENT_ID_)
references ACT_RE_DEPLOYMENT (ID_); references ACT_RE_DEPLOYMENT (ID_);
create index ACT_IDX_PROCDEF_INFO_JSON on ACT_PROCDEF_INFO(INFO_JSON_ID_); create index ACT_IDX_PROCDEF_INFO_JSON on ACT_PROCDEF_INFO(INFO_JSON_ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_FK_INFO_JSON_BA add constraint ACT_FK_INFO_JSON_BA
foreign key (INFO_JSON_ID_) foreign key (INFO_JSON_ID_)
references ACT_GE_BYTEARRAY (ID_); references ACT_GE_BYTEARRAY (ID_);
create index ACT_IDX_PROCDEF_INFO_PROC on ACT_PROCDEF_INFO(PROC_DEF_ID_); create index ACT_IDX_PROCDEF_INFO_PROC on ACT_PROCDEF_INFO(PROC_DEF_ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_FK_INFO_PROCDEF add constraint ACT_FK_INFO_PROCDEF
foreign key (PROC_DEF_ID_) foreign key (PROC_DEF_ID_)
references ACT_RE_PROCDEF (ID_); references ACT_RE_PROCDEF (ID_);
alter table ACT_PROCDEF_INFO alter table ACT_PROCDEF_INFO
add constraint ACT_UNIQ_INFO_PROCDEF add constraint ACT_UNIQ_INFO_PROCDEF
unique (PROC_DEF_ID_); unique (PROC_DEF_ID_);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<!-- PROCESSDEFINITION INSERT --> <!-- PROCESSDEFINITION INSERT -->
<insert id="insertProcessDefinition" parameterType="org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntityImpl"> <insert id="insertProcessDefinition" parameterType="org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntityImpl">
insert into ${prefix}ACT_RE_PROCDEF(ID_, REV_, CATEGORY_, NAME_, KEY_, VERSION_, DEPLOYMENT_ID_, RESOURCE_NAME_, DGRM_RESOURCE_NAME_, DESCRIPTION_, HAS_START_FORM_KEY_, HAS_GRAPHICAL_NOTATION_ , SUSPENSION_STATE_, TENANT_ID_, ENGINE_VERSION_) insert into ${prefix}ACT_RE_PROCDEF(ID_, REV_, CATEGORY_, NAME_, KEY_, VERSION_, DEPLOYMENT_ID_, RESOURCE_NAME_, DGRM_RESOURCE_NAME_, DESCRIPTION_, HAS_START_FORM_KEY_, HAS_GRAPHICAL_NOTATION_ , SUSPENSION_STATE_, TENANT_ID_, ENGINE_VERSION_, APP_VERSION_)
values (#{id, jdbcType=VARCHAR}, values (#{id, jdbcType=VARCHAR},
1, 1,
#{category, jdbcType=VARCHAR}, #{category, jdbcType=VARCHAR},
...@@ -22,11 +22,12 @@ ...@@ -22,11 +22,12 @@
#{isGraphicalNotationDefined, jdbcType=BOOLEAN}, #{isGraphicalNotationDefined, jdbcType=BOOLEAN},
#{suspensionState, jdbcType=INTEGER}, #{suspensionState, jdbcType=INTEGER},
#{tenantId, jdbcType=VARCHAR}, #{tenantId, jdbcType=VARCHAR},
#{engineVersion, jdbcType=VARCHAR}) #{engineVersion, jdbcType=VARCHAR},
#{appVersion, jdbcType=INTEGER})
</insert> </insert>
<insert id="bulkInsertProcessDefinition" parameterType="java.util.List"> <insert id="bulkInsertProcessDefinition" parameterType="java.util.List">
INSERT INTO ${prefix}ACT_RE_PROCDEF(ID_, REV_, CATEGORY_, NAME_, KEY_, VERSION_, DEPLOYMENT_ID_, RESOURCE_NAME_, DGRM_RESOURCE_NAME_, DESCRIPTION_, HAS_START_FORM_KEY_, HAS_GRAPHICAL_NOTATION_ , SUSPENSION_STATE_, TENANT_ID_, ENGINE_VERSION_) INSERT INTO ${prefix}ACT_RE_PROCDEF(ID_, REV_, CATEGORY_, NAME_, KEY_, VERSION_, DEPLOYMENT_ID_, RESOURCE_NAME_, DGRM_RESOURCE_NAME_, DESCRIPTION_, HAS_START_FORM_KEY_, HAS_GRAPHICAL_NOTATION_ , SUSPENSION_STATE_, TENANT_ID_, ENGINE_VERSION_, APP_VERSION_)
VALUES VALUES
<foreach collection="list" item="processDefinition" index="index" separator=","> <foreach collection="list" item="processDefinition" index="index" separator=",">
(#{processDefinition.id, jdbcType=VARCHAR}, (#{processDefinition.id, jdbcType=VARCHAR},
...@@ -43,7 +44,8 @@ ...@@ -43,7 +44,8 @@
#{processDefinition.isGraphicalNotationDefined, jdbcType=BOOLEAN}, #{processDefinition.isGraphicalNotationDefined, jdbcType=BOOLEAN},
#{processDefinition.suspensionState, jdbcType=INTEGER}, #{processDefinition.suspensionState, jdbcType=INTEGER},
#{processDefinition.tenantId, jdbcType=VARCHAR}, #{processDefinition.tenantId, jdbcType=VARCHAR},
#{processDefinition.engineVersion, jdbcType=VARCHAR}) #{processDefinition.engineVersion, jdbcType=VARCHAR},
#{processDefinition.appVersion, jdbcType=INTEGER})
</foreach> </foreach>
</insert> </insert>
...@@ -117,6 +119,7 @@ ...@@ -117,6 +119,7 @@
<result property="isGraphicalNotationDefined" column="HAS_GRAPHICAL_NOTATION_" jdbcType="BOOLEAN" /> <result property="isGraphicalNotationDefined" column="HAS_GRAPHICAL_NOTATION_" jdbcType="BOOLEAN" />
<result property="suspensionState" column="SUSPENSION_STATE_" jdbcType="INTEGER"/> <result property="suspensionState" column="SUSPENSION_STATE_" jdbcType="INTEGER"/>
<result property="engineVersion" column="ENGINE_VERSION_" jdbcType="VARCHAR" /> <result property="engineVersion" column="ENGINE_VERSION_" jdbcType="VARCHAR" />
<result property="appVersion" column="APP_VERSION_" jdbcType="INTEGER" />
</resultMap> </resultMap>
<!-- PROCESSDEFINITION SELECT --> <!-- PROCESSDEFINITION SELECT -->
......
update ACT_GE_PROPERTY set VALUE_ = '7.1.0.0' where NAME_ = 'schema.version'; update ACT_GE_PROPERTY set VALUE_ = '7.1.0.0' where NAME_ = 'schema.version';
alter table ACT_RE_DEPLOYMENT add column VERSION_ integer set default 1;
alter table ACT_RE_DEPLOYMENT add column PROJECT_RELEASE_VERSION_ varchar(255);
update ACT_GE_PROPERTY set VALUE_ = '7.1.0-M6' where NAME_ = 'schema.version';
alter table ACT_RE_PROCDEF add column APP_VERSION_ integer;
alter table ACT_RU_TASK add column APP_VERSION_ integer;
alter table ACT_RU_EXECUTION add column APP_VERSION_ integer;
update ACT_GE_PROPERTY set VALUE_ = '7.1.0.0' where NAME_ = 'schema.version'; update ACT_GE_PROPERTY set VALUE_ = '7.1.0.0' where NAME_ = 'schema.version';
alter table ACT_RE_DEPLOYMENT add column VERSION_ integer; alter table ACT_RE_DEPLOYMENT add column VERSION_ integer set default 1;
alter table ACT_RE_DEPLOYMENT add column PROJECT_RELEASE_VERSION_ varchar(255); alter table ACT_RE_DEPLOYMENT add column PROJECT_RELEASE_VERSION_ varchar(255);
......
update ACT_GE_PROPERTY set VALUE_ = '7.1.0-M6' where NAME_ = 'schema.version';
alter table ACT_RE_PROCDEF add column APP_VERSION_ integer;
alter table ACT_RU_TASK add column APP_VERSION_ integer;
alter table ACT_RU_EXECUTION add column APP_VERSION_ integer;
/* Licensed under the Apache License, Version 2.0 (the "License"); /* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...@@ -21,7 +21,7 @@ import org.activiti.engine.management.TableMetaData; ...@@ -21,7 +21,7 @@ import org.activiti.engine.management.TableMetaData;
/** /**
* Test case for the various operations of the {@link ManagementService} * Test case for the various operations of the {@link ManagementService}
* *
*/ */
...@@ -44,10 +44,10 @@ public class ManagementServiceTest extends PluggableActivitiTestCase { ...@@ -44,10 +44,10 @@ public class ManagementServiceTest extends PluggableActivitiTestCase {
public void testGetTableMetaData() { public void testGetTableMetaData() {
String tablePrefix = processEngineConfiguration.getDatabaseTablePrefix(); String tablePrefix = processEngineConfiguration.getDatabaseTablePrefix();
TableMetaData tableMetaData = managementService.getTableMetaData(tablePrefix+"ACT_RU_TASK"); TableMetaData tableMetaData = managementService.getTableMetaData(tablePrefix+"ACT_RU_TASK");
assertEquals(tableMetaData.getColumnNames().size(), tableMetaData.getColumnTypes().size()); assertEquals(tableMetaData.getColumnNames().size(), tableMetaData.getColumnTypes().size());
assertEquals(20, tableMetaData.getColumnNames().size()); assertEquals(21, tableMetaData.getColumnNames().size());
int assigneeIndex = tableMetaData.getColumnNames().indexOf("ASSIGNEE_"); int assigneeIndex = tableMetaData.getColumnNames().indexOf("ASSIGNEE_");
int createTimeIndex = tableMetaData.getColumnNames().indexOf("CREATE_TIME_"); int createTimeIndex = tableMetaData.getColumnNames().indexOf("CREATE_TIME_");
......
package org.activiti.spring.boot.process; package org.activiti.spring.boot.process;
import java.util.List;
import java.util.stream.Collectors;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.catchThrowable; import static org.assertj.core.api.Assertions.catchThrowable;
import static org.mockito.Mockito.spy; import static org.mockito.Mockito.spy;
...@@ -44,10 +47,10 @@ public class ProcessRuntimeIT { ...@@ -44,10 +47,10 @@ public class ProcessRuntimeIT {
private static final String CATEGORIZE_PROCESS = "categorizeProcess"; private static final String CATEGORIZE_PROCESS = "categorizeProcess";
private static final String CATEGORIZE_HUMAN_PROCESS = "categorizeHumanProcess"; private static final String CATEGORIZE_HUMAN_PROCESS = "categorizeHumanProcess";
private static final String ONE_STEP_PROCESS = "OneStepProcess"; private static final String ONE_STEP_PROCESS = "OneStepProcess";
private static final String SUB_PROCESS = "subProcess"; private static final String SUB_PROCESS = "subProcess";
private static final String SUPER_PROCESS = "superProcess"; private static final String SUPER_PROCESS = "superProcess";
@Autowired @Autowired
private ProcessRuntime processRuntime; private ProcessRuntime processRuntime;
...@@ -74,20 +77,20 @@ public class ProcessRuntimeIT { ...@@ -74,20 +77,20 @@ public class ProcessRuntimeIT {
@Autowired @Autowired
private APIVariableInstanceConverter variableInstanceConverter; private APIVariableInstanceConverter variableInstanceConverter;
@Autowired @Autowired
ProcessVariablesPayloadValidator processVariablesValidator; ProcessVariablesPayloadValidator processVariablesValidator;
@Autowired @Autowired
private ProcessRuntimeConfiguration configuration; private ProcessRuntimeConfiguration configuration;
@Autowired @Autowired
private ApplicationEventPublisher applicationEventPublisher; private ApplicationEventPublisher applicationEventPublisher;
private ApplicationEventPublisher eventPublisher; private ApplicationEventPublisher eventPublisher;
private ProcessRuntime processRuntimeMock; private ProcessRuntime processRuntimeMock;
private ProcessAdminRuntime processAdminRuntimeMock; private ProcessAdminRuntime processAdminRuntimeMock;
@Autowired @Autowired
...@@ -101,7 +104,7 @@ public class ProcessRuntimeIT { ...@@ -101,7 +104,7 @@ public class ProcessRuntimeIT {
@Before @Before
public void init() { public void init() {
eventPublisher = spy(applicationEventPublisher); eventPublisher = spy(applicationEventPublisher);
processRuntimeMock = spy(new ProcessRuntimeImpl(repositoryService, processRuntimeMock = spy(new ProcessRuntimeImpl(repositoryService,
processDefinitionConverter, processDefinitionConverter,
runtimeService, runtimeService,
...@@ -563,7 +566,7 @@ public class ProcessRuntimeIT { ...@@ -563,7 +566,7 @@ public class ProcessRuntimeIT {
assertThat(deletedProcessInstance.getStatus()).isEqualTo(ProcessInstance.ProcessInstanceStatus.DELETED); assertThat(deletedProcessInstance.getStatus()).isEqualTo(ProcessInstance.ProcessInstanceStatus.DELETED);
} }
@Test @Test
public void getSubprocesses() { public void getSubprocesses() {
...@@ -571,7 +574,7 @@ public class ProcessRuntimeIT { ...@@ -571,7 +574,7 @@ public class ProcessRuntimeIT {
Page<ProcessInstance> processInstancePage; Page<ProcessInstance> processInstancePage;
ProcessInstance parentProcess,subProcess; ProcessInstance parentProcess,subProcess;
//given //given
// start a process with a business key to check filters // start a process with a business key to check filters
parentProcess=processRuntime.start(ProcessPayloadBuilder.start() parentProcess=processRuntime.start(ProcessPayloadBuilder.start()
...@@ -592,29 +595,29 @@ public class ProcessRuntimeIT { ...@@ -592,29 +595,29 @@ public class ProcessRuntimeIT {
assertThat( processInstancePage.getContent().get(0).getProcessDefinitionKey()).isEqualTo(SUPER_PROCESS); assertThat( processInstancePage.getContent().get(0).getProcessDefinitionKey()).isEqualTo(SUPER_PROCESS);
assertThat( processInstancePage.getContent().get(1).getProcessDefinitionKey()).isEqualTo(SUB_PROCESS); assertThat( processInstancePage.getContent().get(1).getProcessDefinitionKey()).isEqualTo(SUB_PROCESS);
//Check that parentProcess has 1 subprocess //Check that parentProcess has 1 subprocess
processInstancePage = processRuntime.processInstances(Pageable.of(0, processInstancePage = processRuntime.processInstances(Pageable.of(0,
50), 50),
ProcessPayloadBuilder ProcessPayloadBuilder
.subprocesses(parentProcess.getId())); .subprocesses(parentProcess.getId()));
assertThat(processInstancePage).isNotNull(); assertThat(processInstancePage).isNotNull();
assertThat(processInstancePage.getContent()).hasSize(1); assertThat(processInstancePage.getContent()).hasSize(1);
subProcess=processInstancePage.getContent().get(0); subProcess=processInstancePage.getContent().get(0);
assertThat(subProcess.getProcessDefinitionKey()).isEqualTo(SUB_PROCESS); assertThat(subProcess.getProcessDefinitionKey()).isEqualTo(SUB_PROCESS);
assertThat(subProcess.getParentId()).isEqualTo(parentProcess.getId()); assertThat(subProcess.getParentId()).isEqualTo(parentProcess.getId());
assertThat(subProcess.getProcessDefinitionVersion()).isEqualTo(1); assertThat(subProcess.getProcessDefinitionVersion()).isEqualTo(1);
processRuntime.delete(ProcessPayloadBuilder.delete(subProcess)); processRuntime.delete(ProcessPayloadBuilder.delete(subProcess));
processRuntime.delete(ProcessPayloadBuilder.delete(parentProcess)); processRuntime.delete(ProcessPayloadBuilder.delete(parentProcess));
} }
...@@ -634,9 +637,9 @@ public class ProcessRuntimeIT { ...@@ -634,9 +637,9 @@ public class ProcessRuntimeIT {
assertThat(processInstancePage).isNotNull(); assertThat(processInstancePage).isNotNull();
assertThat(processInstancePage.getContent()).hasSize(1); assertThat(processInstancePage.getContent()).hasSize(1);
assertThat(processInstancePage.getContent().get(0).getProcessDefinitionKey()).isEqualTo("processWithSignalStart1"); assertThat(processInstancePage.getContent().get(0).getProcessDefinitionKey()).isEqualTo("processWithSignalStart1");
verify(eventPublisher).publishEvent(signalPayload); verify(eventPublisher).publishEvent(signalPayload);
processRuntimeMock.delete(ProcessPayloadBuilder.delete(processInstancePage.getContent().get(0).getId())); processRuntimeMock.delete(ProcessPayloadBuilder.delete(processInstancePage.getContent().get(0).getId()));
} }
...@@ -659,4 +662,33 @@ public class ProcessRuntimeIT { ...@@ -659,4 +662,33 @@ public class ProcessRuntimeIT {
processAdminRuntimeMock.delete(ProcessPayloadBuilder.delete(processInstancePage.getContent().get(0).getId())); processAdminRuntimeMock.delete(ProcessPayloadBuilder.delete(processInstancePage.getContent().get(0).getId()));
} }
@Test
public void should_processInstanceAlwaysHaveAppVersion(){
securityUtil.logInAs("user");
ProcessInstance processInstance = processRuntime.start(ProcessPayloadBuilder.start()
.withProcessDefinitionKey(SUPER_PROCESS)
.build());
assertThat(processInstance.getAppVersion()).isEqualTo("1");
}
@Test
public void should_processDefinitionAlwaysHaveAppVersion(){
securityUtil.logInAs("user");
Page<ProcessDefinition> processDefinitionPage = processRuntime.processDefinitions(Pageable.of(0,
50));
assertThat(processDefinitionPage.getContent()).isNotEmpty();
List<ProcessDefinition> processDefinitions = processDefinitionPage.getContent().stream()
.filter(c -> c.getKey().equals(SUPER_PROCESS))
.collect(Collectors.toList());
assertThat(processDefinitions).hasSize(1);
ProcessDefinition result = processDefinitions.get(0);
assertThat(result.getAppVersion()).isEqualTo("1");
}
} }
package org.activiti.spring.boot.process;
import org.activiti.api.process.model.ProcessInstance;
import org.activiti.api.process.model.builders.ProcessPayloadBuilder;
import org.activiti.api.process.runtime.ProcessRuntime;
import org.activiti.api.runtime.shared.query.Page;
import org.activiti.api.runtime.shared.query.Pageable;
import org.activiti.api.task.model.Task;
import org.activiti.api.task.model.builders.TaskPayloadBuilder;
import org.activiti.api.task.runtime.TaskRuntime;
import org.activiti.spring.boot.security.util.SecurityUtil;
import org.activiti.spring.boot.test.util.ProcessCleanUpUtil;
import org.activiti.spring.boot.test.util.TaskCleanUpUtil;
import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import static org.assertj.core.api.Assertions.assertThat;
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE)
public class ProcessRuntimeTasksIT {
private static final String SINGLE_TASK_PROCESS = "SingleTaskProcess";
@Autowired
private ProcessRuntime processRuntime;
@Autowired
private TaskRuntime taskRuntime;
@Autowired
private SecurityUtil securityUtil;
@Autowired
private ProcessCleanUpUtil processCleanUpUtil;
@Autowired
private TaskCleanUpUtil taskCleanUpUtil;
@After
public void cleanUp() {
processCleanUpUtil.cleanUpWithAdmin();
taskCleanUpUtil.cleanUpWithAdmin();
}
@Test
public void should_taskAlwaysHaveAppVersion() {
securityUtil.logInAs("garth");
ProcessInstance processInstance = processRuntime.start(ProcessPayloadBuilder.start()
.withProcessDefinitionKey(SINGLE_TASK_PROCESS)
.build());
Page<Task> tasks = taskRuntime.tasks(Pageable.of(0, 50),
TaskPayloadBuilder
.tasks()
.withProcessInstanceId(processInstance.getId())
.build());
assertThat(tasks.getContent()).hasSize(1);
Task result = tasks.getContent().get(0);
assertThat(result.getName()).isEqualTo("my-task");
assertThat(result.getAppVersion()).isEqualTo("1");
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册