瀏覽代碼

重构工作流(02)

zhouhao 6 年之前
父節點
當前提交
50dcba1982
共有 59 個文件被更改,包括 465 次插入891 次删除
  1. 0 45
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-api/pom.xml
  2. 0 11
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-api/src/main/java/org/hswebframework/web/dao/workflow/ActDefDao.java
  3. 0 11
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-api/src/main/java/org/hswebframework/web/dao/workflow/ProcDefFormDao.java
  4. 0 44
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-mybatis/pom.xml
  5. 0 36
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/pom.xml
  6. 0 40
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/pom.xml
  7. 0 46
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/src/main/java/org/hswebframework/web/entity/workflow/ActDefEntity.java
  8. 0 29
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/src/main/java/org/hswebframework/web/entity/workflow/ProcDefFormEntity.java
  9. 0 55
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/src/main/java/org/hswebframework/web/entity/workflow/SimpleActDefEntity.java
  10. 0 33
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/src/main/java/org/hswebframework/web/entity/workflow/SimpleProcDefFormEntity.java
  11. 0 15
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/entity/SimpleActivityImp.java
  12. 0 175
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/entity/SimpleProcessDefinition.java
  13. 0 63
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/service/imp/BpmUtilsServiceImp.java
  14. 9 14
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/pom.xml
  15. 13 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/dimension/CandidateDimension.java
  16. 10 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/dimension/CandidateDimensionParser.java
  17. 12 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/dimension/PermissionDimensionParser.java
  18. 1 1
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/src/main/java/org/hswebframework/web/entity/workflow/ActivityConfigEntity.java
  19. 1 1
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/src/main/java/org/hswebframework/web/entity/workflow/ProcessDefineConfigEntity.java
  20. 67 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/entity/SimpleProcessDefinition.java
  21. 0 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/flowable/FlowableAutoConfiguration.java
  22. 0 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/flowable/utils/ActivitiUserUtil.java
  23. 0 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/flowable/utils/CustomGroupEntityManager.java
  24. 0 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/flowable/utils/CustomGroupEntityManagerFactory.java
  25. 0 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/flowable/utils/CustomUserEntityManager.java
  26. 0 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/flowable/utils/CustomUserEntityManagerFactory.java
  27. 0 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/flowable/utils/JumpTaskCmd.java
  28. 1 1
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/service/BpmActivityService.java
  29. 3 3
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/service/BpmProcessService.java
  30. 3 3
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/service/BpmTaskService.java
  31. 2 3
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/service/BpmUtilsService.java
  32. 2 2
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/utils/FlowableAbstract.java
  33. 3 4
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/service/imp/BpmActivityServiceImp.java
  34. 5 6
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/service/imp/BpmProcessServiceImp.java
  35. 11 26
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/service/imp/BpmTaskServiceImp.java
  36. 62 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/service/imp/BpmUtilsServiceImp.java
  37. 51 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/service/request/CompleteTaskRequest.java
  38. 68 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/service/request/StartProcessRequest.java
  39. 8 14
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/controller/FlowableCoreController.java
  40. 7 10
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/controller/FlowableDeploymentController.java
  41. 2 2
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/controller/FlowableModelManagerController.java
  42. 8 14
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/controller/FlowableUtilsController.java
  43. 4 1
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/entity/ModelCreateRequest.java
  44. 1 1
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/resources/META-INF/spring.factories
  45. 0 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/workflow/ActDefMapper.xml
  46. 0 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/workflow/ProcDefFormMapper.xml
  47. 0 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/resources/processes/README.md
  48. 57 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/java/org/hswebframework/web/workflow/flowable/ControllerTest.java
  49. 25 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/java/org/hswebframework/web/workflow/flowable/TestApplication.java
  50. 6 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/resources/application-dev.yml
  51. 21 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/resources/application.yml
  52. 0 0
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/resources/processes/README.md
  53. 0 43
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/hsweb-system-workflow-service-api/pom.xml
  54. 0 11
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/hsweb-system-workflow-service-api/src/main/java/org/hswebframework/web/service/workflow/ActDefService.java
  55. 0 48
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/hsweb-system-workflow-service-simple/pom.xml
  56. 0 31
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/hsweb-system-workflow-service-simple/src/main/java/org/hswebframework/web/service/workflow/simple/SimpleActDefService.java
  57. 0 34
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/pom.xml
  58. 1 11
      hsweb-system/hsweb-system-workflow/hsweb-system-workflow-starter/pom.xml
  59. 1 4
      hsweb-system/hsweb-system-workflow/pom.xml

+ 0 - 45
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-api/pom.xml

@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 
-  ~   Copyright 2016 http://www.hswebframework.org
-  ~  
-  ~   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.
-  ~  
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-system-workflow-dao</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-workflow-dao-api</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-workflow-entity</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-commons-dao-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-</project>

+ 0 - 11
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-api/src/main/java/org/hswebframework/web/dao/workflow/ActDefDao.java

@@ -1,11 +0,0 @@
-package org.hswebframework.web.dao.workflow;
-
-import org.hswebframework.web.dao.CrudDao;
-import org.hswebframework.web.entity.workflow.ActDefEntity;
-
-/**
- * @Author wangwei
- * @Date 2017/9/5.
- */
-public interface ActDefDao extends CrudDao<ActDefEntity,String> {
-}

+ 0 - 11
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-api/src/main/java/org/hswebframework/web/dao/workflow/ProcDefFormDao.java

@@ -1,11 +0,0 @@
-package org.hswebframework.web.dao.workflow;
-
-import org.hswebframework.web.dao.CrudDao;
-import org.hswebframework.web.entity.workflow.ActDefEntity;
-
-/**
- * @Author wangwei
- * @Date 2017/9/5.
- */
-public interface ProcDefFormDao extends CrudDao<ActDefEntity,String> {
-}

+ 0 - 44
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-mybatis/pom.xml

@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 
-  ~   Copyright 2016 http://www.hswebframework.org
-  ~  
-  ~   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.
-  ~  
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-system-workflow-dao</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-workflow-dao-mybatis</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-workflow-dao-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-commons-dao-mybatis</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-</project>

+ 0 - 36
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/pom.xml

@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 
-  ~   Copyright 2016 http://www.hswebframework.org
-  ~  
-  ~   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.
-  ~  
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-system-workflow</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-workflow-dao</artifactId>
-    <packaging>pom</packaging>
-    <modules>
-        <module>hsweb-system-workflow-dao-api</module>
-        <module>hsweb-system-workflow-dao-mybatis</module>
-    </modules>
-</project>

+ 0 - 40
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/pom.xml

@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 
-  ~   Copyright 2016 http://www.hswebframework.org
-  ~  
-  ~   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.
-  ~  
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-system-workflow</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-workflow-entity</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-commons-entity</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-</project>

+ 0 - 46
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/src/main/java/org/hswebframework/web/entity/workflow/ActDefEntity.java

@@ -1,46 +0,0 @@
-package org.hswebframework.web.entity.workflow;
-
-import org.hswebframework.web.commons.entity.GenericEntity;
-
-/**
- * @Author wangwei
- * @Date 2017/9/5.
- */
-public interface ActDefEntity extends GenericEntity<String> {
- /*-------------------------------------------
-    |               属性名常量               |
-    ===========================================*/
-    /**
-     * 节点ID
-     */
-    String actId = "actId";
-    /**
-     * 表单ID
-     */
-    String formId = "formId";
-    /**
-     * 关系ID
-     */
-    String defId = "defId";
-
-    /**
-     * 关系类型
-     */
-    String type = "type";
-
-    String getActId();
-
-    void setActId(String actId);
-
-    String getFormId();
-
-    void setFormId(String formId);
-
-    String getDefId();
-
-    void setDefId(String defId);
-
-    String getType();
-
-    void setType(String type);
-}

+ 0 - 29
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/src/main/java/org/hswebframework/web/entity/workflow/ProcDefFormEntity.java

@@ -1,29 +0,0 @@
-package org.hswebframework.web.entity.workflow;
-
-import org.hswebframework.web.commons.entity.GenericEntity;
-
-/**
- * @Author wangwei
- * @Date 2017/9/5.
- */
-public interface ProcDefFormEntity extends GenericEntity<String>{
- /*-------------------------------------------
-    |               属性名常量               |
-    ===========================================*/
-    /**
-     * 流程定义Key
-     */
-    String defKey = "defKey";
-    /**
-     * 动态表单ID
-     */
-    String formId = "formId";
-
-    String getDefKey();
-
-    void setDefKey(String defKey);
-
-    String getFormId();
-
-    void setFormId(String formId);
-}

+ 0 - 55
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/src/main/java/org/hswebframework/web/entity/workflow/SimpleActDefEntity.java

@@ -1,55 +0,0 @@
-package org.hswebframework.web.entity.workflow;
-
-import org.hswebframework.web.commons.entity.SimpleGenericEntity;
-
-/**
- * @Author wangwei
- * @Date 2017/9/5.
- */
-public class SimpleActDefEntity extends SimpleGenericEntity<String> implements ActDefEntity {
-
-    private String actId;
-    private String formId;
-    private String defId;
-    private String type;
-
-    @Override
-    public String getActId() {
-        return actId;
-    }
-
-    @Override
-    public void setActId(String actId) {
-        this.actId = actId;
-    }
-
-    @Override
-    public String getFormId() {
-        return formId;
-    }
-
-    @Override
-    public void setFormId(String formId) {
-        this.formId = formId;
-    }
-
-    @Override
-    public String getDefId() {
-        return defId;
-    }
-
-    @Override
-    public void setDefId(String defId) {
-        this.defId = defId;
-    }
-
-    @Override
-    public String getType() {
-        return type;
-    }
-
-    @Override
-    public void setType(String type) {
-        this.type = type;
-    }
-}

+ 0 - 33
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/src/main/java/org/hswebframework/web/entity/workflow/SimpleProcDefFormEntity.java

@@ -1,33 +0,0 @@
-package org.hswebframework.web.entity.workflow;
-
-import org.hswebframework.web.commons.entity.SimpleGenericEntity;
-
-/**
- * @Author wangwei
- * @Date 2017/9/5.
- */
-public class SimpleProcDefFormEntity extends SimpleGenericEntity<String> implements ProcDefFormEntity {
-
-    String defKey;
-    String formId;
-
-    @Override
-    public String getDefKey() {
-        return defKey;
-    }
-
-    @Override
-    public void setDefKey(String defKey) {
-        this.defKey = defKey;
-    }
-
-    @Override
-    public String getFormId() {
-        return formId;
-    }
-
-    @Override
-    public void setFormId(String formId) {
-        this.formId = formId;
-    }
-}

+ 0 - 15
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/entity/SimpleActivityImp.java

@@ -1,15 +0,0 @@
-package org.hswebframework.web.workflow.flowable.entity;
-
-import org.activiti.engine.impl.pvm.process.ActivityImpl;
-import org.activiti.engine.impl.pvm.process.ProcessDefinitionImpl;
-
-/**
- * @Author wangwei
- * @Date 2017/9/4.
- */
-public class SimpleActivityImp extends ActivityImpl {
-
-    public SimpleActivityImp(String id, ProcessDefinitionImpl processDefinition) {
-        super(id, processDefinition);
-    }
-}

+ 0 - 175
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/entity/SimpleProcessDefinition.java

@@ -1,175 +0,0 @@
-package org.hswebframework.web.workflow.flowable.entity;
-
-import org.activiti.engine.repository.ProcessDefinition;
-
-/**
- * TODO 完成注释
- *
- * @author zhouhao
- */
-public class SimpleProcessDefinition implements ProcessDefinition {
-
-    private String id;
-
-    private String  category;
-    private String  name;
-    private String  key;
-    private String  description;
-    private int     version;
-    private String  resourceName;
-    private String  deploymentId;
-    private String  diagramResourceName;
-    private boolean suspended;
-
-    private boolean hasStartFormKey;
-    private boolean hasGraphicalNotation;
-    private String  tenantId;
-
-    public SimpleProcessDefinition() {
-    }
-
-    public SimpleProcessDefinition(ProcessDefinition definition) {
-        id = definition.getId();
-        category = definition.getCategory();
-        name = definition.getName();
-        key = definition.getKey();
-        description = definition.getDescription();
-        version = definition.getVersion();
-
-        resourceName = definition.getResourceName();
-        deploymentId = definition.getDeploymentId();
-        diagramResourceName = definition.getResourceName();
-
-        suspended = definition.isSuspended();
-
-        hasGraphicalNotation = definition.hasGraphicalNotation();
-        hasStartFormKey = definition.hasStartFormKey();
-        tenantId = definition.getTenantId();
-
-    }
-
-    public void setSuspended(boolean suspended) {
-        this.suspended = suspended;
-    }
-
-    @Override
-    public boolean isSuspended() {
-        return suspended;
-    }
-
-    @Override
-    public boolean hasGraphicalNotation() {
-        return hasGraphicalNotation;
-    }
-
-    @Override
-    public boolean hasStartFormKey() {
-        return hasStartFormKey;
-    }
-
-    @Override
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    @Override
-    public String getCategory() {
-        return category;
-    }
-
-    public void setCategory(String category) {
-        this.category = category;
-    }
-
-    @Override
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    @Override
-    public String getKey() {
-        return key;
-    }
-
-    public void setKey(String key) {
-        this.key = key;
-    }
-
-    @Override
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    @Override
-    public int getVersion() {
-        return version;
-    }
-
-    public void setVersion(int version) {
-        this.version = version;
-    }
-
-    @Override
-    public String getResourceName() {
-        return resourceName;
-    }
-
-    public void setResourceName(String resourceName) {
-        this.resourceName = resourceName;
-    }
-
-    @Override
-    public String getDeploymentId() {
-        return deploymentId;
-    }
-
-    public void setDeploymentId(String deploymentId) {
-        this.deploymentId = deploymentId;
-    }
-
-    @Override
-    public String getDiagramResourceName() {
-        return diagramResourceName;
-    }
-
-    public void setDiagramResourceName(String diagramResourceName) {
-        this.diagramResourceName = diagramResourceName;
-    }
-
-    public boolean isHasStartFormKey() {
-        return hasStartFormKey;
-    }
-
-    public void setHasStartFormKey(boolean hasStartFormKey) {
-        this.hasStartFormKey = hasStartFormKey;
-    }
-
-    public boolean isHasGraphicalNotation() {
-        return hasGraphicalNotation;
-    }
-
-    public void setHasGraphicalNotation(boolean hasGraphicalNotation) {
-        this.hasGraphicalNotation = hasGraphicalNotation;
-    }
-
-    @Override
-    public String getTenantId() {
-        return tenantId;
-    }
-
-    public void setTenantId(String tenantId) {
-        this.tenantId = tenantId;
-    }
-}

+ 0 - 63
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/service/imp/BpmUtilsServiceImp.java

@@ -1,63 +0,0 @@
-package org.hswebframework.web.workflow.flowable.service.imp;
-
-import org.hswebframework.web.entity.organizational.PersonEntity;
-import org.hswebframework.web.entity.workflow.ActDefEntity;
-import org.hswebframework.web.organizational.authorization.relation.Relation;
-import org.hswebframework.web.service.organizational.PersonService;
-import org.hswebframework.web.service.organizational.RelationInfoService;
-import org.hswebframework.web.workflow.flowable.service.BpmUtilsService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.Assert;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @Author wangwei
- * @Date 2017/9/13.
- */
-@Service
-@Transactional(rollbackFor = Throwable.class)
-public class BpmUtilsServiceImp implements BpmUtilsService {
-
-    protected Logger logger = LoggerFactory.getLogger(this.getClass());
-
-    @Autowired(required = false)
-    PersonService personService;
-    @Autowired(required = false)
-    RelationInfoService relationInfoService;
-
-    public void assertOrgModuleReady(){
-        Assert.notNull(personService,"未引入组织架构模块依赖");
-        Assert.notNull(relationInfoService,"未引入组织架构模块依赖");
-
-    }
-
-    @Override
-    public List<String> selectUserIdsBy(String userId, ActDefEntity actDefEntity) {
-        assertOrgModuleReady();
-        List<String> list = new ArrayList<>();
-        // 根据配置类型  获取人员信息 设置待办人
-        if ("person".equals(actDefEntity.getType())) { // 矩阵
-            List<Relation> relations = relationInfoService.getRelations(actDefEntity.getType(), userId).findPos(actDefEntity.getDefId());
-            for (Relation relation : relations) {
-                list.add(relation.getTarget());
-            }
-        } else if ("position".equals(actDefEntity.getType())) { // 岗位
-            List<PersonEntity> personEntities = personService.selectByPositionId(actDefEntity.getDefId());
-            for(PersonEntity personEntity:personEntities){
-                list.add(personEntity.getUserId());
-            }
-        } else if ("role".equals(actDefEntity.getType())) {  // 角色
-            List<PersonEntity> personEntities = personService.selectByRoleId(actDefEntity.getDefId());
-            for(PersonEntity personEntity:personEntities){
-                list.add(personEntity.getUserId());
-            }
-        }
-        return list;
-    }
-}

+ 9 - 14
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/pom.xml

@@ -9,10 +9,16 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>hsweb-system-workflow-flowable</artifactId>
-
+    <artifactId>hsweb-system-workflow-local</artifactId>
 
     <dependencies>
+
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-commons-service-simple</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
         <dependency>
             <groupId>org.flowable</groupId>
             <artifactId>flowable-spring-boot-starter-basic</artifactId>
@@ -101,11 +107,6 @@
             <version>${project.version}</version>
         </dependency>
 
-        <!--<dependency>-->
-        <!--<groupId>org.hswebframework.web</groupId>-->
-        <!--<artifactId>hsweb-access-logging-aop</artifactId>-->
-        <!--<version>${project.version}</version>-->
-        <!--</dependency>-->
         <dependency>
             <groupId>org.hswebframework.web</groupId>
             <artifactId>hsweb-system-organizational-api</artifactId>
@@ -116,17 +117,11 @@
             <artifactId>hsweb-system-organizational-authorization</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-workflow-service-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
         <dependency>
             <groupId>org.hswebframework.web</groupId>
             <artifactId>hsweb-system-dynamic-form-api</artifactId>
             <version>${project.version}</version>
         </dependency>
-
-
     </dependencies>
+
 </project>

+ 13 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/dimension/CandidateDimension.java

@@ -0,0 +1,13 @@
+package org.hswebframework.web.workflow.dimension;
+
+import java.util.List;
+
+/**
+ * @author zhouhao
+ * @since 3.0.0-RC
+ */
+public interface CandidateDimension {
+
+    List<String> getCandidatUserIdList();
+
+}

+ 10 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/dimension/CandidateDimensionParser.java

@@ -0,0 +1,10 @@
+package org.hswebframework.web.workflow.dimension;
+
+/**
+ * @author zhouhao
+ * @see CandidateDimension
+ * @since 3.0.0-RC
+ */
+public interface CandidateDimensionParser {
+    CandidateDimension parse(String JSONConfig);
+}

+ 12 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/dimension/PermissionDimensionParser.java

@@ -0,0 +1,12 @@
+package org.hswebframework.web.workflow.dimension;
+
+import org.hswebframework.web.authorization.AuthenticationPredicate;
+
+/**
+ * @author zhouhao
+ * @see AuthenticationPredicate
+ * @since 3.0.0-RC
+ */
+public interface PermissionDimensionParser {
+    AuthenticationPredicate parse(String jsonConfig);
+}

+ 1 - 1
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/src/main/java/org/hswebframework/web/entity/workflow/ActivityConfigEntity.java

@@ -1,4 +1,4 @@
-package org.hswebframework.web.entity.workflow;
+package org.hswebframework.web.workflow.entity;
 
 import lombok.Getter;
 import lombok.Setter;

+ 1 - 1
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-entity/src/main/java/org/hswebframework/web/entity/workflow/ProcessDefineConfigEntity.java

@@ -1,4 +1,4 @@
-package org.hswebframework.web.entity.workflow;
+package org.hswebframework.web.workflow.entity;
 
 import lombok.Getter;
 import lombok.Setter;

+ 67 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/entity/SimpleProcessDefinition.java

@@ -0,0 +1,67 @@
+package org.hswebframework.web.workflow.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.activiti.engine.repository.ProcessDefinition;
+import org.hswebframework.web.commons.bean.Bean;
+
+/**
+ * @author zhouhao
+ */
+@Getter
+@Setter
+public class SimpleProcessDefinition implements ProcessDefinition, Bean {
+
+    private static final long serialVersionUID = -7246626050183062980L;
+
+    private String id;
+    private String  category;
+    private String  name;
+    private String  key;
+    private String  description;
+    private int     version;
+    private String  resourceName;
+    private String  deploymentId;
+    private String  diagramResourceName;
+    private boolean suspended;
+    private boolean hasStartFormKey;
+    private boolean hasGraphicalNotation;
+    private String  tenantId;
+
+    public SimpleProcessDefinition() {
+    }
+
+    public SimpleProcessDefinition(ProcessDefinition definition) {
+        id = definition.getId();
+        category = definition.getCategory();
+        name = definition.getName();
+        key = definition.getKey();
+        description = definition.getDescription();
+        version = definition.getVersion();
+
+        resourceName = definition.getResourceName();
+        deploymentId = definition.getDeploymentId();
+        diagramResourceName = definition.getResourceName();
+
+        suspended = definition.isSuspended();
+
+        hasGraphicalNotation = definition.hasGraphicalNotation();
+        hasStartFormKey = definition.hasStartFormKey();
+        tenantId = definition.getTenantId();
+    }
+
+    public void setSuspended(boolean suspended) {
+        this.suspended = suspended;
+    }
+
+
+    @Override
+    public boolean hasGraphicalNotation() {
+        return hasGraphicalNotation;
+    }
+
+    @Override
+    public boolean hasStartFormKey() {
+        return hasStartFormKey;
+    }
+}

hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/FlowableAutoConfiguration.java → hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/flowable/FlowableAutoConfiguration.java


hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/utils/ActivitiUserUtil.java → hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/flowable/utils/ActivitiUserUtil.java


hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/utils/CustomGroupEntityManager.java → hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/flowable/utils/CustomGroupEntityManager.java


hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/utils/CustomGroupEntityManagerFactory.java → hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/flowable/utils/CustomGroupEntityManagerFactory.java


hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/utils/CustomUserEntityManager.java → hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/flowable/utils/CustomUserEntityManager.java


hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/utils/CustomUserEntityManagerFactory.java → hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/flowable/utils/CustomUserEntityManagerFactory.java


hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/utils/JumpTaskCmd.java → hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/flowable/utils/JumpTaskCmd.java


+ 1 - 1
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/service/BpmActivityService.java

@@ -1,4 +1,4 @@
-package org.hswebframework.web.workflow.flowable.service;
+package org.hswebframework.web.workflow.service;
 
 import org.activiti.engine.impl.pvm.process.ActivityImpl;
 import org.activiti.engine.impl.task.TaskDefinition;

+ 3 - 3
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/service/BpmProcessService.java

@@ -1,4 +1,4 @@
-package org.hswebframework.web.workflow.flowable.service;
+package org.hswebframework.web.workflow.service;
 
 import org.activiti.engine.repository.ProcessDefinition;
 import org.activiti.engine.runtime.Job;
@@ -34,8 +34,8 @@ public interface BpmProcessService{
      * @throws Exception 异常信息
      */
     ProcessInstance startProcessInstance(String creator_id, String procDefKey, String activity, String next_claim,
-                                  String businessKey,
-                                  Map<String, Object> variables);
+                                         String businessKey,
+                                         Map<String, Object> variables);
 
     /**
      * 根据流程图key获取所有运行中流程分页

+ 3 - 3
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/service/BpmTaskService.java

@@ -1,4 +1,4 @@
-package org.hswebframework.web.workflow.flowable.service;
+package org.hswebframework.web.workflow.service;
 
 import org.activiti.engine.history.HistoricProcessInstance;
 import org.activiti.engine.impl.pvm.process.ActivityImpl;
@@ -149,7 +149,7 @@ public interface BpmTaskService{
      * @param taskId   当前环节ID
      * @param map   key-value
      */
-    void setVariables(String taskId,Map<String ,Object> map);
+    void setVariables(String taskId, Map<String, Object> map);
 
     /**
      * 删除流程变量
@@ -157,7 +157,7 @@ public interface BpmTaskService{
      * @param taskId   当前环节ID
      * @param var2   需要删除的 key
      */
-    void removeVariables(String taskId,Collection<String> var2);
+    void removeVariables(String taskId, Collection<String> var2);
 
     /**
      * 设置任务变量

+ 2 - 3
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/service/BpmUtilsService.java

@@ -1,6 +1,5 @@
-package org.hswebframework.web.workflow.flowable.service;
+package org.hswebframework.web.workflow.service;
 
-import org.hswebframework.web.entity.workflow.ActDefEntity;
 
 import java.util.List;
 
@@ -16,5 +15,5 @@ public interface BpmUtilsService {
      * @param actDefEntity
      * @return
      */
-    List<String> selectUserIdsBy(String userId, ActDefEntity actDefEntity);
+//    List<String> selectUserIdsBy(String userId, ActDefEntity actDefEntity);
 }

+ 2 - 2
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/utils/FlowableAbstract.java

@@ -1,4 +1,4 @@
-package org.hswebframework.web.workflow.flowable.utils;
+package org.hswebframework.web.workflow.service.imp;
 
 import org.activiti.engine.*;
 
@@ -8,7 +8,7 @@ import javax.annotation.Resource;
  * @author wangwei
  * @author zhouhao
  */
-public abstract class FlowableAbstract {
+public abstract class AbstractFlowableService {
     @Resource
     protected ProcessEngine processEngine;
     @Resource

+ 3 - 4
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/service/imp/BpmActivityServiceImp.java

@@ -1,4 +1,4 @@
-package org.hswebframework.web.workflow.flowable.service.imp;
+package org.hswebframework.web.workflow.service.imp;
 
 import org.activiti.engine.delegate.Expression;
 import org.activiti.engine.impl.RepositoryServiceImpl;
@@ -11,8 +11,7 @@ import org.activiti.engine.impl.pvm.process.ProcessElementImpl;
 import org.activiti.engine.impl.task.TaskDefinition;
 import org.activiti.engine.repository.ProcessDefinition;
 import org.activiti.engine.runtime.ProcessInstance;
-import org.hswebframework.web.workflow.flowable.service.BpmActivityService;
-import org.hswebframework.web.workflow.flowable.utils.FlowableAbstract;
+import org.hswebframework.web.workflow.service.BpmActivityService;
 import org.springframework.stereotype.Service;
 
 import java.util.*;
@@ -24,7 +23,7 @@ import java.util.stream.Collectors;
  * @Date 2017/8/7.
  */
 @Service
-public class BpmActivityServiceImp extends FlowableAbstract implements BpmActivityService {
+public class BpmActivityServiceImp extends AbstractFlowableService implements BpmActivityService {
 
     /**
      * 获取指定节点

+ 5 - 6
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/service/imp/BpmProcessServiceImp.java

@@ -1,13 +1,12 @@
-package org.hswebframework.web.workflow.flowable.service.imp;
+package org.hswebframework.web.workflow.service.imp;
 
 import org.activiti.engine.repository.ProcessDefinition;
 import org.activiti.engine.runtime.Job;
 import org.activiti.engine.runtime.ProcessInstance;
 import org.activiti.engine.task.Task;
 import org.hswebframework.utils.StringUtils;
-import org.hswebframework.web.workflow.flowable.service.BpmProcessService;
-import org.hswebframework.web.workflow.flowable.service.BpmTaskService;
-import org.hswebframework.web.workflow.flowable.utils.FlowableAbstract;
+import org.hswebframework.web.workflow.service.BpmProcessService;
+import org.hswebframework.web.workflow.service.BpmTaskService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
@@ -24,7 +23,7 @@ import java.util.Map;
  */
 @Service
 @Transactional(rollbackFor = Throwable.class)
-public class BpmProcessServiceImp extends FlowableAbstract implements BpmProcessService {
+public class BpmProcessServiceImp extends AbstractFlowableService implements BpmProcessService {
     protected Logger logger = LoggerFactory.getLogger(this.getClass());
 
     @Resource
@@ -42,7 +41,7 @@ public class BpmProcessServiceImp extends FlowableAbstract implements BpmProcess
                                                 String nextClaim,
                                                 String businessKey,
                                                 Map<String, Object> variables){
-        logger.debug("start flow :", procDefKey);
+        logger.debug("start flow :{}", procDefKey);
         ProcessInstance processInstance = null;
         try{
             // 用来设置启动流程的人员ID,引擎会自动把用户ID保存到activiti:initiator中

+ 11 - 26
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/service/imp/BpmTaskServiceImp.java

@@ -1,10 +1,9 @@
-package org.hswebframework.web.workflow.flowable.service.imp;
+package org.hswebframework.web.workflow.service.imp;
 
 import org.activiti.engine.history.HistoricProcessInstance;
 import org.activiti.engine.history.HistoricTaskInstance;
 import org.activiti.engine.impl.RepositoryServiceImpl;
 import org.activiti.engine.impl.TaskServiceImpl;
-import org.activiti.engine.impl.persistence.entity.IdentityLinkEntity;
 import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity;
 import org.activiti.engine.impl.pvm.PvmActivity;
 import org.activiti.engine.impl.pvm.PvmTransition;
@@ -14,21 +13,11 @@ import org.activiti.engine.impl.pvm.process.TransitionImpl;
 import org.activiti.engine.runtime.Execution;
 import org.activiti.engine.runtime.ProcessInstance;
 import org.activiti.engine.task.Task;
-import org.hswebframework.utils.ClassUtils;
 import org.hswebframework.utils.StringUtils;
 import org.hswebframework.web.NotFoundException;
-import org.hswebframework.web.entity.organizational.PersonEntity;
-import org.hswebframework.web.entity.workflow.ActDefEntity;
-import org.hswebframework.web.organizational.authorization.Personnel;
-import org.hswebframework.web.organizational.authorization.relation.Relation;
-import org.hswebframework.web.service.organizational.PersonService;
-import org.hswebframework.web.service.organizational.RelationDefineService;
-import org.hswebframework.web.service.organizational.RelationInfoService;
-import org.hswebframework.web.service.workflow.ActDefService;
-import org.hswebframework.web.workflow.flowable.service.BpmActivityService;
-import org.hswebframework.web.workflow.flowable.service.BpmTaskService;
-import org.hswebframework.web.workflow.flowable.service.BpmUtilsService;
-import org.hswebframework.web.workflow.flowable.utils.FlowableAbstract;
+import org.hswebframework.web.workflow.service.BpmActivityService;
+import org.hswebframework.web.workflow.service.BpmTaskService;
+import org.hswebframework.web.workflow.service.BpmUtilsService;
 import org.hswebframework.web.workflow.flowable.utils.JumpTaskCmd;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -38,8 +27,6 @@ import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.*;
-import java.util.stream.Collector;
-import java.util.stream.Collectors;
 
 import static org.hswebframework.web.commons.entity.param.QueryParamEntity.single;
 
@@ -49,15 +36,13 @@ import static org.hswebframework.web.commons.entity.param.QueryParamEntity.singl
  */
 @Service
 @Transactional(rollbackFor = Throwable.class)
-public class BpmTaskServiceImp extends FlowableAbstract implements BpmTaskService {
+public class BpmTaskServiceImp extends AbstractFlowableService implements BpmTaskService {
 
     protected Logger logger = LoggerFactory.getLogger(this.getClass());
 
     @Resource
     private BpmActivityService bpmActivityService;
     @Autowired
-    ActDefService actDefService;
-    @Autowired
     BpmUtilsService bpmUtilsService;
 
     @Override
@@ -277,19 +262,19 @@ public class BpmTaskServiceImp extends FlowableAbstract implements BpmTaskServic
     public void addCandidateUser(String taskId, String actId, String userId) {
         if (!StringUtils.isNullOrEmpty(actId)) {
             // 获取节点配置信息
-            ActDefEntity actDefEntity = actDefService.selectSingle(single(ActDefEntity.actId, actId));
+//            ActDefEntity actDefEntity = actDefService.selectSingle(single(ActDefEntity.actId, actId));
             // 根据配置类型  获取人员信息 设置待办人
-            if (actDefEntity!=null) {
-                List<String> list = bpmUtilsService.selectUserIdsBy(userId,actDefEntity);
-                list.forEach(uId -> taskService.addCandidateUser(taskId,uId));
-            } else {
+//            if (actDefEntity!=null) {
+//                List<String> list = bpmUtilsService.selectUserIdsBy(userId,actDefEntity);
+//                list.forEach(uId -> taskService.addCandidateUser(taskId,uId));
+//            } else {
                 taskService.addCandidateUser(taskId,
                         runtimeService.getIdentityLinksForProcessInstance(selectTaskByTaskId(taskId).getProcessInstanceId())
                         .stream()
                         .filter(linkEntity -> "starter".equals(linkEntity.getType()))
                         .findFirst().orElseThrow(()-> new NotFoundException("发起人获取失败")).getUserId()
                 );
-            }
+//            }
         } else {
             taskService.addCandidateUser(taskId, userId);
         }

+ 62 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/service/imp/BpmUtilsServiceImp.java

@@ -0,0 +1,62 @@
+package org.hswebframework.web.workflow.service.imp;
+
+import org.hswebframework.web.entity.organizational.PersonEntity;
+import org.hswebframework.web.organizational.authorization.relation.Relation;
+import org.hswebframework.web.service.organizational.PersonService;
+import org.hswebframework.web.service.organizational.RelationInfoService;
+import org.hswebframework.web.workflow.service.BpmUtilsService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.Assert;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Author wangwei
+ * @Date 2017/9/13.
+ */
+@Service
+@Transactional(rollbackFor = Throwable.class)
+public class BpmUtilsServiceImp implements BpmUtilsService {
+
+    protected Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    @Autowired(required = false)
+    PersonService personService;
+    @Autowired(required = false)
+    RelationInfoService relationInfoService;
+
+    public void assertOrgModuleReady(){
+        Assert.notNull(personService,"未引入组织架构模块依赖");
+        Assert.notNull(relationInfoService,"未引入组织架构模块依赖");
+
+    }
+
+//    @Override
+//    public List<String> selectUserIdsBy(String userId, ActDefEntity actDefEntity) {
+//        assertOrgModuleReady();
+//        List<String> list = new ArrayList<>();
+//        // 根据配置类型  获取人员信息 设置待办人
+//        if ("person".equals(actDefEntity.getType())) { // 矩阵
+//            List<Relation> relations = relationInfoService.getRelations(actDefEntity.getType(), userId).findPos(actDefEntity.getDefId());
+//            for (Relation relation : relations) {
+//                list.add(relation.getTarget());
+//            }
+//        } else if ("position".equals(actDefEntity.getType())) { // 岗位
+//            List<PersonEntity> personEntities = personService.selectByPositionId(actDefEntity.getDefId());
+//            for(PersonEntity personEntity:personEntities){
+//                list.add(personEntity.getUserId());
+//            }
+//        } else if ("role".equals(actDefEntity.getType())) {  // 角色
+//            List<PersonEntity> personEntities = personService.selectByRoleId(actDefEntity.getDefId());
+//            for(PersonEntity personEntity:personEntities){
+//                list.add(personEntity.getUserId());
+//            }
+//        }
+//        return list;
+//    }
+}

+ 51 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/service/request/CompleteTaskRequest.java

@@ -0,0 +1,51 @@
+package org.hswebframework.web.workflow.service.request;
+
+import lombok.*;
+
+import java.util.Map;
+
+/**
+ * @author zhouhao
+ * @since 3.0.0-RC
+ */
+@Getter
+@Setter
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class CompleteTaskRequest {
+    /**
+     * 任务ID
+     */
+    private String taskId;
+
+    /**
+     * 完成此任务的用户ID
+     */
+    private String completeUserId;
+
+    /**
+     * 完成此任务的用户姓名
+     */
+    private String completeUserName;
+
+    /**
+     * 下一环节的ID
+     */
+    private String nextActivityId;
+
+    /**
+     * 下一环节办理的用户ID
+     */
+    private String nextClaimUserId;
+
+    /**
+     * 变量
+     */
+    private Map<String, Object> variables;
+
+    /**
+     * 表单数据
+     */
+    private Map<String, Object> formData;
+}

+ 68 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/service/request/StartProcessRequest.java

@@ -0,0 +1,68 @@
+package org.hswebframework.web.workflow.service.request;
+
+import lombok.*;
+import org.activiti.engine.repository.ProcessDefinition;
+import org.hibernate.validator.constraints.NotBlank;
+import org.hswebframework.web.authorization.Authentication;
+import org.hswebframework.web.authorization.User;
+
+import java.util.Map;
+
+/**
+ * 启动流程请求
+ *
+ * @author zhouhao
+ * @since 3.0.0-RC
+ */
+@Getter
+@Setter
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class StartProcessRequest {
+    /**
+     * 流程定义KEY
+     *
+     * @see ProcessDefinition#getId()
+     */
+    @NotBlank
+    private String processDefineId;
+
+    /**
+     * 流程发起人ID
+     *
+     * @see Authentication#current()
+     * @see Authentication#getUser()
+     * @see User#getId()
+     */
+    @NotBlank
+    private String creatorId;
+
+    /**
+     * 流程发起人姓名
+     *
+     * @see User#getName()
+     */
+    @NotBlank
+    private String creatorName;
+
+    /**
+     * 下一环节的办理人ID
+     */
+    private String nextClaimUserId;
+
+    /**
+     * 下一环节的ID,如果指定了此属性,则流程启动后自动跳转到该环节
+     */
+    private String nextActivityId;
+
+    /**
+     * 流程变量
+     */
+    private Map<String, Object> variables;
+
+    /**
+     * 表单数据
+     */
+    private Map<String, Object> formData;
+}

+ 8 - 14
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/controller/FlowableCoreController.java

@@ -1,4 +1,4 @@
-package org.hswebframework.web.workflow.flowable.controller;
+package org.hswebframework.web.workflow.web;
 
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -11,13 +11,11 @@ import org.hswebframework.web.authorization.annotation.Authorize;
 import org.hswebframework.web.commons.entity.PagerResult;
 import org.hswebframework.web.commons.entity.param.QueryParamEntity;
 import org.hswebframework.web.controller.message.ResponseMessage;
-import org.hswebframework.web.entity.workflow.ActDefEntity;
 import org.hswebframework.web.organizational.authorization.PersonnelAuthentication;
 import org.hswebframework.web.service.form.DynamicFormOperationService;
-import org.hswebframework.web.service.workflow.ActDefService;
-import org.hswebframework.web.workflow.flowable.service.BpmActivityService;
-import org.hswebframework.web.workflow.flowable.service.BpmProcessService;
-import org.hswebframework.web.workflow.flowable.service.BpmTaskService;
+import org.hswebframework.web.workflow.service.BpmActivityService;
+import org.hswebframework.web.workflow.service.BpmProcessService;
+import org.hswebframework.web.workflow.service.BpmTaskService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.Assert;
 import org.springframework.web.bind.annotation.*;
@@ -27,8 +25,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
 
-import static org.hswebframework.web.commons.entity.param.QueryParamEntity.single;
-
 /**
  * @Author wangwei
  * @Date 2017/9/5.
@@ -44,8 +40,6 @@ public class FlowableCoreController {
     BpmProcessService bpmProcessService;
     @Autowired
     BpmActivityService bpmActivityService;
-    @Autowired
-    ActDefService actDefService;
     @Autowired(required = false)
     DynamicFormOperationService dynamicFormOperationService;
 
@@ -78,10 +72,10 @@ public class FlowableCoreController {
         Map<String,PagerResult<Object>> map = new HashMap<>();
         ActivityImpl activity = bpmActivityService.getStartEvent(procDefId);
 
-        ActDefEntity actDefEntity = actDefService.selectSingle(single(ActDefEntity.actId,activity.getId()));
-        if(actDefEntity!=null){
-            return ResponseMessage.ok(dynamicFormOperationService.selectPager(actDefEntity.getFormId(),param));
-        }
+//        ActDefEntity actDefEntity = actDefService.selectSingle(single(ActDefEntity.actId,activity.getId()));
+//        if(actDefEntity!=null){
+//            return ResponseMessage.ok(dynamicFormOperationService.selectPager(actDefEntity.getFormId(),param));
+//        }
         throw new NotFoundException("表单不存在");
     }
 

+ 7 - 10
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/controller/FlowableDeploymentController.java

@@ -1,4 +1,4 @@
-package org.hswebframework.web.workflow.flowable.controller;
+package org.hswebframework.web.workflow.web;
 
 import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -10,7 +10,6 @@ import org.activiti.bpmn.model.BpmnModel;
 import org.activiti.editor.constants.ModelDataJsonConstants;
 import org.activiti.editor.language.json.converter.BpmnJsonConverter;
 import org.activiti.engine.history.HistoricProcessInstance;
-import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity;
 import org.activiti.engine.impl.pvm.process.ActivityImpl;
 import org.activiti.engine.repository.Deployment;
 import org.activiti.engine.repository.DeploymentBuilder;
@@ -26,11 +25,11 @@ import org.hswebframework.web.authorization.annotation.Authorize;
 import org.hswebframework.web.commons.entity.PagerResult;
 import org.hswebframework.web.commons.entity.param.QueryParamEntity;
 import org.hswebframework.web.controller.message.ResponseMessage;
-import org.hswebframework.web.workflow.flowable.entity.SimpleProcessDefinition;
-import org.hswebframework.web.workflow.flowable.service.BpmActivityService;
-import org.hswebframework.web.workflow.flowable.service.BpmProcessService;
-import org.hswebframework.web.workflow.flowable.service.BpmTaskService;
-import org.hswebframework.web.workflow.flowable.utils.FlowableAbstract;
+import org.hswebframework.web.workflow.entity.SimpleProcessDefinition;
+import org.hswebframework.web.workflow.service.BpmActivityService;
+import org.hswebframework.web.workflow.service.BpmProcessService;
+import org.hswebframework.web.workflow.service.BpmTaskService;
+import org.hswebframework.web.workflow.service.imp.AbstractFlowableService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.MediaType;
 import org.springframework.util.StreamUtils;
@@ -46,8 +45,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.UnsupportedEncodingException;
-import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
@@ -61,7 +58,7 @@ import java.util.zip.ZipInputStream;
 @RequestMapping("/workflow/process/definition")
 @Api(tags = "工作流-流程定义管理", description = "工作流流程定义管理")
 @Authorize(permission = "workflow-definition", description = "工作流-流程定义管理")
-public class FlowableDeploymentController extends FlowableAbstract {
+public class FlowableDeploymentController extends AbstractFlowableService {
 
     private final static String MODEL_ID = "modelId";
 

+ 2 - 2
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/controller/FlowableModelManagerController.java

@@ -1,4 +1,4 @@
-package org.hswebframework.web.workflow.flowable.controller;
+package org.hswebframework.web.workflow.web;
 
 import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.databind.JsonNode;
@@ -25,7 +25,7 @@ import org.hswebframework.web.authorization.annotation.Authorize;
 import org.hswebframework.web.commons.entity.PagerResult;
 import org.hswebframework.web.commons.entity.param.QueryParamEntity;
 import org.hswebframework.web.controller.message.ResponseMessage;
-import org.hswebframework.web.workflow.flowable.entity.ModelCreateRequest;
+import org.hswebframework.web.workflow.web.request.ModelCreateRequest;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.web.bind.annotation.*;

+ 8 - 14
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/controller/FlowableUtilsController.java

@@ -1,12 +1,10 @@
-package org.hswebframework.web.workflow.flowable.controller;
+package org.hswebframework.web.workflow.web;
 
 import io.swagger.annotations.Api;
 import org.activiti.engine.impl.pvm.process.ActivityImpl;
 import org.hswebframework.web.authorization.annotation.Authorize;
 import org.hswebframework.web.controller.message.ResponseMessage;
-import org.hswebframework.web.entity.workflow.ActDefEntity;
-import org.hswebframework.web.service.workflow.ActDefService;
-import org.hswebframework.web.workflow.flowable.service.BpmActivityService;
+import org.hswebframework.web.workflow.service.BpmActivityService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -15,8 +13,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import static org.hswebframework.web.commons.entity.param.QueryParamEntity.single;
-
 /**
  * @Author wangwei
  * @Date 2017/9/4.
@@ -30,8 +26,6 @@ public class FlowableUtilsController {
     @Autowired
     BpmActivityService bpmActivityService;
 
-    @Autowired
-    ActDefService actDefService;
 
     /**
      * 获取流程所有配置节点
@@ -48,11 +42,11 @@ public class FlowableUtilsController {
             if ("startEvent".equals(activity.getProperty("type"))) {
                 map.put("id", activity.getId());
                 map.put("name", "流程发起者");
-                map.put("info", actDefService.selectSingle(single(ActDefEntity.actId, activity.getId())));
+//                map.put("info", actDefService.selectSingle(single(ActDefEntity.actId, activity.getId())));
             } else if ("userTask".equals(activity.getProperty("type"))) {
                 map.put("id", activity.getId());
                 map.put("name", activity.getProperty("name").toString());
-                map.put("info", actDefService.selectSingle(single(ActDefEntity.actId, activity.getId())));
+//                map.put("info", actDefService.selectSingle(single(ActDefEntity.actId, activity.getId())));
             }
             if (map.size() > 0) {
                 list.add(map);
@@ -67,9 +61,9 @@ public class FlowableUtilsController {
      * @param actDefEntity
      * @return
      */
-    @PostMapping("act")
-    public ResponseMessage<String> setActClaimDef(@RequestBody ActDefEntity actDefEntity) {
-        return ResponseMessage.ok(actDefService.saveOrUpdate(actDefEntity));
-    }
+//    @PostMapping("act")
+//    public ResponseMessage<String> setActClaimDef(@RequestBody ActDefEntity actDefEntity) {
+//        return ResponseMessage.ok(actDefService.saveOrUpdate(actDefEntity));
+//    }
 
 }

+ 4 - 1
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/java/org/hswebframework/web/workflow/flowable/entity/ModelCreateRequest.java

@@ -1,17 +1,20 @@
-package org.hswebframework.web.workflow.flowable.entity;
+package org.hswebframework.web.workflow.web.request;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.hibernate.validator.constraints.NotBlank;
 
 @Data
 @ApiModel("工作流模型创建请求")
 public class ModelCreateRequest {
 
     @ApiModelProperty(value = "模型标识",example = "test_model")
+    @NotBlank
     private String key;
 
     @ApiModelProperty(value = "模型名称",example = "测试模型")
+    @NotBlank
     private String name;
 
     @ApiModelProperty(value = "模型说明")

+ 1 - 1
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/resources/META-INF/spring.factories

@@ -1,3 +1,3 @@
 # Auto Configure
 org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.hswebframework.web.workflow.flowable.FlowableAutoConfiguration
+org.hswebframework.web.workflow.starter.WorkFlowAutoConfiguration

hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-mybatis/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/workflow/ActDefMapper.xml → hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/workflow/ActDefMapper.xml


hsweb-system/hsweb-system-workflow/hsweb-system-workflow-dao/hsweb-system-workflow-dao-mybatis/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/workflow/ProcDefFormMapper.xml → hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/workflow/ProcDefFormMapper.xml


hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable/src/main/resources/processes/README.md → hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/resources/processes/README.md


+ 57 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/java/org/hswebframework/web/workflow/flowable/ControllerTest.java

@@ -0,0 +1,57 @@
+package org.hswebframework.web.workflow.flowable;
+
+
+import com.alibaba.fastjson.JSONObject;
+import org.activiti.engine.impl.interceptor.SessionFactory;
+import org.activiti.spring.boot.ProcessEngineConfigurationConfigurer;
+import org.hswebframework.web.tests.SimpleWebApplicationTests;
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.List;
+
+/**
+ * @Author wangwei
+ * @Date 2017/8/1.
+ */
+@Configuration
+@ComponentScan("org.hswebframework.web.workflow")
+public class ControllerTest extends SimpleWebApplicationTests {
+
+    @Test
+    public void testRest() throws Exception {
+        //todo 获取所有可办理流程
+        JSONObject result = testGet("/workflow/process/definition").exec().resultAsJson();
+        Assert.assertNotNull( result.getJSONObject("result"));
+        Assert.assertEquals(200, result.get("status"));
+        System.out.println(result);
+    }
+
+
+    @Configuration
+    public static class config {
+        @Autowired(required = false)
+        private List<SessionFactory> sessionFactories;
+
+        @Bean
+        public ProcessEngineConfigurationConfigurer processEngineConfigurationConfigurer() {
+            return configuration -> {
+                configuration
+                        .setAsyncExecutorActivate(false)
+                        .setJobExecutorActivate(false)
+                        .setDatabaseSchemaUpdate("false")
+                        .setActivityFontName("宋体")
+                        .setLabelFontName("宋体")
+                        .setAnnotationFontName("宋体");
+
+                if (sessionFactories != null) {
+                    configuration.setCustomSessionFactories(sessionFactories);
+                }
+            };
+        }
+    }
+}

+ 25 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/java/org/hswebframework/web/workflow/flowable/TestApplication.java

@@ -0,0 +1,25 @@
+package org.hswebframework.web.workflow.flowable;
+
+import org.hswebframework.web.service.organizational.RelationDefineService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.test.context.ActiveProfiles;
+
+/**
+ * TODO 完成注释
+ *
+ * @author zhouhao
+ */
+@SpringBootApplication
+@ActiveProfiles("dev")
+public class TestApplication {
+    @Autowired
+    RelationDefineService relationDefineService;
+
+    public static void main(String[] args) {
+        SpringApplication application = new SpringApplication(TestApplication.class);
+        application.setAdditionalProfiles("dev");
+        application.run(args);
+    }
+}

+ 6 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/resources/application-dev.yml

@@ -0,0 +1,6 @@
+spring:
+    datasource:
+       url : jdbc:mysql://localhost:3306/hsweb?useSSL=false&useUnicode=true&characterEncoding=utf8&autoReconnect=true&failOverReadOnly=false
+       username : root
+       password : root
+       type: com.alibaba.druid.pool.DruidDataSource

+ 21 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/resources/application.yml

@@ -0,0 +1,21 @@
+spring:
+    aop:
+        auto: true
+        proxy-target-class: true
+    datasource:
+       url : jdbc:h2:file:./target/workflow-test
+       username : sa
+       password :
+       type: com.alibaba.druid.pool.DruidDataSource
+    cache:
+       type: simple
+
+logging:
+  level:
+      org.flowable: debug
+      org.hswebframework.web: debug
+#      org.activiti: debug
+mybatis:
+  dynamic-datasource: false
+server:
+  port: 8088

+ 0 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/resources/processes/README.md


+ 0 - 43
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/hsweb-system-workflow-service-api/pom.xml

@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2016 http://www.hswebframework.org
-  ~
-  ~ 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.
-  ~
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-system-workflow-service</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-workflow-service-api</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-commons-service-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-workflow-dao-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-</project>

+ 0 - 11
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/hsweb-system-workflow-service-api/src/main/java/org/hswebframework/web/service/workflow/ActDefService.java

@@ -1,11 +0,0 @@
-package org.hswebframework.web.service.workflow;
-
-import org.hswebframework.web.entity.workflow.ActDefEntity;
-import org.hswebframework.web.service.CrudService;
-
-/**
- * @Author wangwei
- * @Date 2017/9/5.
- */
-public interface ActDefService extends CrudService<ActDefEntity,String> {
-}

+ 0 - 48
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/hsweb-system-workflow-service-simple/pom.xml

@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2016 http://www.hswebframework.org
-  ~
-  ~ 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.
-  ~
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-system-workflow-service</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-workflow-service-simple</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-commons-service-simple</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-workflow-service-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-authorization-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-</project>

+ 0 - 31
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/hsweb-system-workflow-service-simple/src/main/java/org/hswebframework/web/service/workflow/simple/SimpleActDefService.java

@@ -1,31 +0,0 @@
-package org.hswebframework.web.service.workflow.simple;
-
-import org.hswebframework.web.dao.CrudDao;
-import org.hswebframework.web.dao.workflow.ActDefDao;
-import org.hswebframework.web.entity.workflow.ActDefEntity;
-import org.hswebframework.web.id.IDGenerator;
-import org.hswebframework.web.service.GenericEntityService;
-import org.hswebframework.web.service.workflow.ActDefService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-/**
- * @Author wangwei
- * @Date 2017/9/5.
- */
-@Service
-public class SimpleActDefService extends GenericEntityService<ActDefEntity,String> implements ActDefService {
-
-    @Autowired
-    private ActDefDao actDefDao;
-
-    @Override
-    protected IDGenerator<String> getIDGenerator() {
-        return IDGenerator.MD5;
-    }
-
-    @Override
-    public CrudDao<ActDefEntity, String> getDao() {
-        return actDefDao;
-    }
-}

+ 0 - 34
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-service/pom.xml

@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2016 http://www.hswebframework.org
-  ~
-  ~ 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.
-  ~
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-system-workflow</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-workflow-service</artifactId>
-    <packaging>pom</packaging>
-    <modules>
-        <module>hsweb-system-workflow-service-api</module>
-        <module>hsweb-system-workflow-service-simple</module>
-    </modules>
-</project>

+ 1 - 11
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-starter/pom.xml

@@ -15,17 +15,7 @@
     <dependencies>
         <dependency>
             <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-workflow-dao-mybatis</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-workflow-flowable</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-system-workflow-service-simple</artifactId>
+            <artifactId>hsweb-system-workflow-local</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>

+ 1 - 4
hsweb-system/hsweb-system-workflow/pom.xml

@@ -16,11 +16,8 @@
         <flowable.version>5.23.0</flowable.version>
     </properties>
     <modules>
-        <module>hsweb-system-workflow-flowable</module>
-        <module>hsweb-system-workflow-dao</module>
-        <module>hsweb-system-workflow-entity</module>
-        <module>hsweb-system-workflow-service</module>
         <module>hsweb-system-workflow-starter</module>
+        <module>hsweb-system-workflow-local</module>
     </modules>