diff --git a/fixflow-test/.classpath b/fixflow-test/.classpath
index 0d84e3fe..0c0f6f2a 100644
--- a/fixflow-test/.classpath
+++ b/fixflow-test/.classpath
@@ -7,5 +7,14 @@
+
+
+
+
+
+
+
+
+
diff --git a/modules/fixflow-common-servlet/src/main/java/com/founder/fix/fixflow/service/FlowIdentityService.java b/modules/fixflow-common-servlet/src/main/java/com/founder/fix/fixflow/service/FlowIdentityService.java
index 02b19a43..3a083dc1 100644
--- a/modules/fixflow-common-servlet/src/main/java/com/founder/fix/fixflow/service/FlowIdentityService.java
+++ b/modules/fixflow-common-servlet/src/main/java/com/founder/fix/fixflow/service/FlowIdentityService.java
@@ -17,7 +17,6 @@
*/
package com.founder.fix.fixflow.service;
-import java.sql.Connection;
import java.sql.SQLException;
import java.util.Map;
diff --git a/modules/fixflow-common-servlet/src/main/java/com/founder/fix/fixflow/service/impl/FlowCenterServiceImpl.java b/modules/fixflow-common-servlet/src/main/java/com/founder/fix/fixflow/service/impl/FlowCenterServiceImpl.java
index 9d41356f..67d1f91d 100644
--- a/modules/fixflow-common-servlet/src/main/java/com/founder/fix/fixflow/service/impl/FlowCenterServiceImpl.java
+++ b/modules/fixflow-common-servlet/src/main/java/com/founder/fix/fixflow/service/impl/FlowCenterServiceImpl.java
@@ -22,7 +22,6 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;
@@ -45,7 +44,6 @@
import com.founder.fix.fixflow.core.impl.bpmn.behavior.TaskCommandInst;
import com.founder.fix.fixflow.core.impl.bpmn.behavior.UserTaskBehavior;
import com.founder.fix.fixflow.core.impl.command.ExpandTaskCommand;
-import com.founder.fix.fixflow.core.impl.identity.GroupDefinition;
import com.founder.fix.fixflow.core.impl.identity.GroupTo;
import com.founder.fix.fixflow.core.impl.identity.UserTo;
import com.founder.fix.fixflow.core.impl.task.QueryExpandTo;
@@ -54,7 +52,6 @@
import com.founder.fix.fixflow.core.runtime.ProcessInstance;
import com.founder.fix.fixflow.core.runtime.ProcessInstanceQuery;
import com.founder.fix.fixflow.core.runtime.ProcessInstanceType;
-import com.founder.fix.fixflow.core.task.IdentityLink;
import com.founder.fix.fixflow.core.task.TaskInstance;
import com.founder.fix.fixflow.core.task.TaskQuery;
import com.founder.fix.fixflow.service.FlowCenterService;
diff --git a/modules/fixflow-converter/src/main/java/com/founder/fix/fixflow/editor/language/json/converter/BpmnJsonConverter.java b/modules/fixflow-converter/src/main/java/com/founder/fix/fixflow/editor/language/json/converter/BpmnJsonConverter.java
index d2d80fd7..05e4f6d5 100644
--- a/modules/fixflow-converter/src/main/java/com/founder/fix/fixflow/editor/language/json/converter/BpmnJsonConverter.java
+++ b/modules/fixflow-converter/src/main/java/com/founder/fix/fixflow/editor/language/json/converter/BpmnJsonConverter.java
@@ -234,6 +234,11 @@ public ObjectNode convertToJson(Definitions model) {
propertiesNode.put(PROPERTY_NAME, mainProcess.getName());
}
+ String dbid = StringUtil.getString(mainProcess.eGet(FixFlowPackage.Literals.DOCUMENT_ROOT__DBID));
+ if(dbid != null){
+ propertiesNode.put(PROPERTY_PROCESS_DBID, dbid);
+ }
+
//fixflow扩展流程属性
String category = mainProcess.getCategory();
if(category != null){
@@ -439,6 +444,12 @@ public Definitions convertToBpmnModel(JsonNode modelNode) {
BpmnModelUtil.addExtensionElement(process, FixFlowPackage.Literals.DOCUMENT_ROOT__TASK_SUBJECT, taskSubject);
}
+ //流程分类
+ JsonNode process_dbid = JsonConverterUtil.getProperty(PROPERTY_PROCESS_DBID, modelNode);
+ if(process_dbid != null &&!"null".equals(process_dbid.asText()) && StringUtil.isNotEmpty(process_dbid.asText())){
+ BpmnModelUtil.addExtensionAttribute(process, FixFlowPackage.Literals.DOCUMENT_ROOT__DBID, process_dbid.asText());
+ }
+
//流程分类
JsonNode processCategory = JsonConverterUtil.getProperty(PROPERTY_PROCESS_CATEGORY, modelNode);
if(processCategory != null &&!"null".equals(processCategory.asText()) && StringUtil.isNotEmpty(processCategory.asText())){
diff --git a/modules/fixflow-core/src/main/java/com/founder/fix/fixflow/core/impl/persistence/definition/ProcessDefinitionPersistence.java b/modules/fixflow-core/src/main/java/com/founder/fix/fixflow/core/impl/persistence/definition/ProcessDefinitionPersistence.java
index 6315f861..efdb801e 100644
--- a/modules/fixflow-core/src/main/java/com/founder/fix/fixflow/core/impl/persistence/definition/ProcessDefinitionPersistence.java
+++ b/modules/fixflow-core/src/main/java/com/founder/fix/fixflow/core/impl/persistence/definition/ProcessDefinitionPersistence.java
@@ -1,540 +1,541 @@
-/**
- * Copyright 1996-2013 Founder International Co.,Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * @author kenshin
- */
-package com.founder.fix.fixflow.core.impl.persistence.definition;
-
-import java.io.ByteArrayInputStream;
-import java.net.URL;
-import java.sql.Connection;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.bpmn2.Activity;
-import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.FlowElement;
-import org.eclipse.bpmn2.FlowNode;
-import org.eclipse.bpmn2.RootElement;
-import org.eclipse.bpmn2.SubProcess;
-import org.eclipse.bpmn2.di.BpmnDiPackage;
-import org.eclipse.bpmn2.impl.BaseElementImpl;
-import org.eclipse.bpmn2.util.Bpmn2ResourceFactoryImpl;
-import org.eclipse.dd.dc.DcPackage;
-import org.eclipse.dd.di.DiPackage;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-
-import com.founder.fix.bpmn2extensions.fixflow.ConnectorInstance;
-import com.founder.fix.bpmn2extensions.fixflow.ConnectorParameterInputs;
-import com.founder.fix.bpmn2extensions.fixflow.ConnectorParameterOutputs;
-import com.founder.fix.bpmn2extensions.fixflow.DataVariable;
-import com.founder.fix.bpmn2extensions.fixflow.FixFlowPackage;
-import com.founder.fix.fixflow.core.ProcessEngineManagement;
-import com.founder.fix.fixflow.core.db.pagination.Pagination;
-import com.founder.fix.fixflow.core.exception.FixFlowClassLoadingException;
-import com.founder.fix.fixflow.core.exception.FixFlowException;
-import com.founder.fix.fixflow.core.impl.Context;
-import com.founder.fix.fixflow.core.impl.Page;
-import com.founder.fix.fixflow.core.impl.ProcessDefinitionQueryImpl;
-import com.founder.fix.fixflow.core.impl.bpmn.behavior.DataVariableBehavior;
-import com.founder.fix.fixflow.core.impl.bpmn.behavior.DefinitionsBehavior;
-import com.founder.fix.fixflow.core.impl.bpmn.behavior.ProcessDefinitionBehavior;
-import com.founder.fix.fixflow.core.impl.connector.ConnectorInstanceBehavior;
-import com.founder.fix.fixflow.core.impl.datavariable.DataVariableMgmtDefinition;
-import com.founder.fix.fixflow.core.impl.db.PersistentObject;
-import com.founder.fix.fixflow.core.impl.db.SqlCommand;
-import com.founder.fix.fixflow.core.impl.event.BaseElementEventImpl;
-import com.founder.fix.fixflow.core.impl.persistence.deployer.DeploymentCache;
-import com.founder.fix.fixflow.core.impl.util.EMFExtensionUtil;
-import com.founder.fix.fixflow.core.impl.util.QueryTableUtil;
-import com.founder.fix.fixflow.core.impl.util.ReflectUtil;
-import com.founder.fix.fixflow.core.impl.util.StringUtil;
-import com.founder.fix.fixflow.core.internationalization.ExceptionCode;
-
-public class ProcessDefinitionPersistence {
-
- public Connection connection;
- protected SqlCommand sqlCommand;
- Pagination pagination = Context.getProcessEngineConfiguration().getDbConfig().getPagination();
-
- public ProcessDefinitionPersistence(Connection connection) {
- this.connection = connection;
- // 初始化数据库操作类
- sqlCommand = new SqlCommand(connection);
- }
-
- public void insertProcessDefinition(PersistentObject persistentObject) {
- Map resourceMap = persistentObject.getPersistentState();
- // 构建查询参数
- Map objectParam = new HashMap();
- objectParam.put("PROCESS_ID", resourceMap.get("processDefinitionId"));
- objectParam.put("PROCESS_NAME", resourceMap.get("processDefinitionName"));
- objectParam.put("PROCESS_KEY", resourceMap.get("processDefinitionKey"));
- objectParam.put("CATEGORY", resourceMap.get("category"));
- objectParam.put("VERSION", resourceMap.get("version"));
- objectParam.put("RESOURCE_NAME", resourceMap.get("resourceName"));
- objectParam.put("DEPLOYMENT_ID", resourceMap.get("deploymentId"));
- objectParam.put("DIAGRAM_RESOURCE_NAME", resourceMap.get("diagramResourceName"));
- objectParam.put("RESOURCE_ID", resourceMap.get("resourceId"));
- // 执行插入语句
- sqlCommand.insert("FIXFLOW_DEF_PROCESSDEFINITION", objectParam);
- }
-
- public ProcessDefinitionBehavior selectLatestProcessDefinitionByKey(String processDefinitionKey) {
- String sqlText = "select * " + "from FIXFLOW_DEF_PROCESSDEFINITION " + "where PROCESS_KEY = ? and "
- + "VERSION = (select max(VERSION) from FIXFLOW_DEF_PROCESSDEFINITION where PROCESS_KEY = ?)";
- // 构建查询参数
- List