提交 32a692e9 authored 作者: zhoushaopan's avatar zhoushaopan

Merge branch 'master' of F:\workflow with conflicts.

上级 47afe3db
......@@ -212,9 +212,9 @@ public class WorkFlowServiceImpl implements WorkFlowService {
startFlowVo.getMap());
//存储流程实例id
//根据flowKey查询出一个FlowInfo
FlowsInfo flowsInfo = flowsInfoMapper.findByFlowKey(startFlowVo.getFlowKey());
flowsInfo.setProcessInstanceId(processInstance.getProcessInstanceId());
flowsInfoMapper.save(flowsInfo);
// FlowsInfo flowsInfo = flowsInfoMapper.findByFlowKey(startFlowVo.getFlowKey());
// flowsInfo.setProcessInstanceId(processInstance.getProcessInstanceId());
// flowsInfoMapper.save(flowsInfo);
}
......
package com.tykj.workflowcore;
import com.tykj.workflowcore.model_layer.controller.ModelController;
import com.tykj.workflowcore.model_layer.dao.TableInfoDao;
import com.tykj.workflowcore.model_layer.entity.TableInfo;
import org.aspectj.lang.annotation.Before;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
......@@ -26,7 +26,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@AutoConfigureMockMvc
class WorkflowCoreApplicationTests {
......
......@@ -48,6 +48,74 @@ class WorkflowCoreApplicationTests_workflow {
//部署流程
void deployFlow() throws Exception {
String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<bpmn2:definitions xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:bpmn2=\"http://www" +
".omg.org/spec/BPMN/20100524/MODEL\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" " +
"xmlns:dc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:di=\"http://www.omg" +
".org/spec/DD/20100524/DI\" targetNamespace=\"http://bpmn.io/schema/bpmn\">\n" +
" <bpmn2:process id=\"processId_26246e2b-2f1a-46a5-b2f1-f3df8109d06b\" name=\"processName_1\" " +
"isExecutable=\"true\">\n" +
" <bpmn2:documentation>description_1</bpmn2:documentation>\n" +
" <bpmn2:startEvent id=\"StartEvent_30cf7590-b7a4-4b17-ab9b-e1d1af577c77\" name=\"1\">\n" +
" <bpmn2:outgoing>Flow_0mknr4h</bpmn2:outgoing>\n" +
" </bpmn2:startEvent>\n" +
" <bpmn2:endEvent id=\"Event_1790b5c6-cb47-4193-8ffa-c721812850cf\" name=\"4\">\n" +
" <bpmn2:incoming>Flow_01cdmlh</bpmn2:incoming>\n" +
" </bpmn2:endEvent>\n" +
" <bpmn2:sequenceFlow id=\"Flow_01cdmlh\" " +
"sourceRef=\"Activity_305965ea-f523-4891-a0e1-9024412c83b3\" " +
"targetRef=\"Event_1790b5c6-cb47-4193-8ffa-c721812850cf\" />\n" +
" <bpmn2:sequenceFlow id=\"Flow_0mknr4h\" " +
"sourceRef=\"StartEvent_30cf7590-b7a4-4b17-ab9b-e1d1af577c77\" " +
"targetRef=\"Activity_9ce9cc86-6a7d-48a7-833d-72a1bcb526b1\" />\n" +
" <bpmn2:sequenceFlow id=\"Flow_0is5s56\" " +
"sourceRef=\"Activity_9ce9cc86-6a7d-48a7-833d-72a1bcb526b1\" " +
"targetRef=\"Activity_305965ea-f523-4891-a0e1-9024412c83b3\" />\n" +
" <bpmn2:userTask id=\"Activity_9ce9cc86-6a7d-48a7-833d-72a1bcb526b1\" name=\"2\">\n" +
" <bpmn2:incoming>Flow_0mknr4h</bpmn2:incoming>\n" +
" <bpmn2:outgoing>Flow_0is5s56</bpmn2:outgoing>\n" +
" </bpmn2:userTask>\n" +
" <bpmn2:userTask id=\"Activity_305965ea-f523-4891-a0e1-9024412c83b3\" name=\"3\">\n" +
" <bpmn2:incoming>Flow_0is5s56</bpmn2:incoming>\n" +
" <bpmn2:outgoing>Flow_01cdmlh</bpmn2:outgoing>\n" +
" </bpmn2:userTask>\n" +
" </bpmn2:process>\n" +
" <bpmndi:BPMNDiagram id=\"BPMNDiagram_1\">\n" +
" <bpmndi:BPMNPlane id=\"BPMNPlane_1\" " +
"bpmnElement=\"processId_8b17c25a-db3c-4392-bc3c-c4d3e6af8ba8\">\n" +
" <bpmndi:BPMNEdge id=\"Flow_01cdmlh_di\" bpmnElement=\"Flow_01cdmlh\">\n" +
" <di:waypoint x=\"510\" y=\"178\" />\n" +
" <di:waypoint x=\"562\" y=\"178\" />\n" +
" </bpmndi:BPMNEdge>\n" +
" <bpmndi:BPMNEdge id=\"Flow_0mknr4h_di\" bpmnElement=\"Flow_0mknr4h\">\n" +
" <di:waypoint x=\"196\" y=\"178\" />\n" +
" <di:waypoint x=\"250\" y=\"178\" />\n" +
" </bpmndi:BPMNEdge>\n" +
" <bpmndi:BPMNEdge id=\"Flow_0is5s56_di\" bpmnElement=\"Flow_0is5s56\">\n" +
" <di:waypoint x=\"350\" y=\"178\" />\n" +
" <di:waypoint x=\"410\" y=\"178\" />\n" +
" </bpmndi:BPMNEdge>\n" +
" <bpmndi:BPMNShape id=\"_BPMNShape_StartEvent_2\" " +
"bpmnElement=\"StartEvent_30cf7590-b7a4-4b17-ab9b-e1d1af577c77\">\n" +
" <dc:Bounds x=\"160\" y=\"160\" width=\"36\" height=\"36\" />\n" +
" <bpmndi:BPMNLabel>\n" +
" <dc:Bounds x=\"175\" y=\"203\" width=\"7\" height=\"14\" />\n" +
" </bpmndi:BPMNLabel>\n" +
" </bpmndi:BPMNShape>\n" +
" <bpmndi:BPMNShape id=\"Event_0blwxcq_di\" " +
"bpmnElement=\"Event_1790b5c6-cb47-4193-8ffa-c721812850cf\">\n" +
" <dc:Bounds x=\"562\" y=\"160\" width=\"36\" height=\"36\" />\n" +
" <bpmndi:BPMNLabel>\n" +
" <dc:Bounds x=\"577\" y=\"203\" width=\"7\" height=\"14\" />\n" +
" </bpmndi:BPMNLabel>\n" +
" </bpmndi:BPMNShape>\n" +
" <bpmndi:BPMNShape id=\"Activity_05096b4_di\" " +
"bpmnElement=\"Activity_9ce9cc86-6a7d-48a7-833d-72a1bcb526b1\">\n" +
" <dc:Bounds x=\"250\" y=\"138\" width=\"100\" height=\"80\" />\n" +
" </bpmndi:BPMNShape>\n" +
" <bpmndi:BPMNShape id=\"Activity_1iwz5sx_di\" " +
"bpmnElement=\"Activity_305965ea-f523-4891-a0e1-9024412c83b3\">\n" +
" <dc:Bounds x=\"410\" y=\"138\" width=\"100\" height=\"80\" />\n" +
" </bpmndi:BPMNShape>\n" +
"<bpmn2:definitions xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:bpmn2=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:dc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:di=\"http://www.omg.org/spec/DD/20100524/DI\" xmlns:flowable=\"http://flowable.org/bpmn\" targetNamespace=\"http://bpmn.io/schema/bpmn\">\n" +
" <bpmn2:process id=\"processId_26246e2b-2f1a-46a5-b2f1-f3df8109d06b\" name=\"测试流程1\" isExecutable=\"true\">\n" +
" <bpmn2:documentation>这是一个测试流程1</bpmn2:documentation>\n" +
......@@ -141,12 +209,14 @@ class WorkflowCoreApplicationTests_workflow {
// 设置返回值类型为utf-8,否则默认为ISO-8859-1
.accept(MediaType.APPLICATION_JSON_UTF8_VALUE);
mockMvc.perform(request).andExpect(status().isOk())
.andExpect(content().string(not(""))) //条件
// .andExpect(content().string(not(""))) //条件
.andExpect(content().string(not("[]")))
.andDo(print());//打印输出结果
}
@Test
//查询代办
//开启流程
void findUserTask() throws Exception {
JSONObject jsonObject = new JSONObject();
......@@ -159,6 +229,7 @@ class WorkflowCoreApplicationTests_workflow {
.accept(MediaType.APPLICATION_JSON_UTF8_VALUE);
mockMvc.perform(request).andExpect(status().isOk())
.andExpect(content().string(not(""))) //条件
.andExpect(content().string(not("[]")))
// .andExpect(content().string(not("[]")))
.andDo(print());//打印输出结果
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论