Explorar el Código

优化以来和test

zhouhao hace 6 años
padre
commit
60635e6778

+ 1 - 0
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/pom.xml

@@ -6,6 +6,7 @@
         <artifactId>hsweb-system-workflow</artifactId>
         <groupId>org.hswebframework.web</groupId>
         <version>3.0.0-RC-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 1 - 1
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/dimension/DefaultCandidateDimensionParser.java

@@ -39,7 +39,7 @@ public class DefaultCandidateDimensionParser implements CandidateDimensionParser
                     List<String> list = strategies
                             .stream()
                             .filter(strategy -> strategy.support(type))
-                            .map(strategy -> strategy.parse(config))
+                            .map(strategy -> strategy.parse(context,config))
                             .filter(CollectionUtils::isNotEmpty)
                             .flatMap(Collection::stream)
                             .collect(Collectors.toList());

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

@@ -6,6 +6,7 @@
         <artifactId>hsweb-system-workflow</artifactId>
         <groupId>org.hswebframework.web</groupId>
         <version>3.0.0-RC-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 0 - 9
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-starter/src/main/java/org/hswebframework/web/workflow/starter/WorkFlowAutoConfiguration.java

@@ -1,9 +1,5 @@
 package org.hswebframework.web.workflow.starter;
 
-import org.hswebframework.web.service.workflow.ActDefService;
-import org.hswebframework.web.service.workflow.simple.SimpleActDefService;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
 
@@ -11,9 +7,4 @@ import org.springframework.context.annotation.Configuration;
 @ComponentScan("org.hswebframework.web.workflow")
 public class WorkFlowAutoConfiguration {
 
-    @Bean
-    @ConditionalOnMissingBean(ActDefService.class)
-    public SimpleActDefService simpleActDefService(){
-        return new SimpleActDefService();
-    }
 }

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

@@ -1,57 +0,0 @@
-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);
-                }
-            };
-        }
-    }
-}

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

@@ -1,25 +0,0 @@
-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);
-    }
-}

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

@@ -1,6 +0,0 @@
-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

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

@@ -1,21 +0,0 @@
-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-starter/src/test/resources/processes/README.md


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

@@ -6,6 +6,7 @@
         <artifactId>hsweb-system</artifactId>
         <groupId>org.hswebframework.web</groupId>
         <version>3.0.0-RC-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>