Package com.founder.fix.fixflow.core.model

Examples of com.founder.fix.fixflow.core.model.ProcessDefinitionQuery.processDefinitionKey()


      List<Map<String, Object>> resultMaps = new ArrayList<Map<String,Object>>();
      ProcessEngine processEngine = getProcessEngine(userId);
      if(processEngine != null){
        ModelService modelService = processEngine.getModelService();
        ProcessDefinitionQuery processDefinitionQuery = modelService.createProcessDefinitionQuery();
        processDefinitionQuery.processDefinitionKey(processKey);
        processDefinitionQuery.orderByProcessDefinitionVersion().desc();
        List<ProcessDefinitionBehavior> processDefinitionBehaviors = processDefinitionQuery.list();
        for(ProcessDefinitionBehavior processDefinitionBehavior :processDefinitionBehaviors){
          resultMaps.add(processDefinitionBehavior.getPersistentState());
        }
View Full Code Here


    assertEquals(1, processDefinitionBehaviors.size());
   
    //创建流程定义查询
    processDefinitionQuery = modelService.createProcessDefinitionQuery();
    //查询startProcessByUser的版本号为1的流程定义
    processDefinitionBehaviors = processDefinitionQuery.processDefinitionKey("startProcessByUser").processDefinitionVersion(1).list();
    //验证是否为1个
    assertEquals(1, processDefinitionBehaviors.size());
   
    //创建流程定义查询
    processDefinitionQuery = modelService.createProcessDefinitionQuery();
View Full Code Here

  @Deployment(resources = { "com/founder/fix/fixflow/test/engine/api/task/TaskServiceTest.bpmn" })
  public void testProcessDefinitionQuery() {
    //创建一个查询
    ProcessDefinitionQuery processDefinitionQuery=modelService.createProcessDefinitionQuery();
    //因为方法上面的声明会自动发布流程,所以此刻可以查到这个流程信息
    processDefinitionQuery.processDefinitionKey("Process_TaskServiceTest");
    ProcessDefinitionBehavior processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证是否查到此流程发布的信息
    assertNotNull(processDefinitionBehavior);
  }
View Full Code Here

    String deploymentIdTemp = deploymentBuilder.deploy().getId();
    assertNotNull(deploymentIdTemp);
    //创建一个查询
    ProcessDefinitionQuery processDefinitionQuery=modelService.createProcessDefinitionQuery();
    //查询上面发布的流程
    processDefinitionQuery.processDefinitionKey("Process_TaskServiceTest");
    ProcessDefinitionBehavior processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证是否发布成功
    assertNotNull(processDefinitionBehavior);
   
  }
View Full Code Here

    String deploymentIdTemp = deploymentBuilder.deploy().getId();
    assertNotNull(deploymentIdTemp);
    //创建一个流程定义查询
    ProcessDefinitionQuery processDefinitionQuery=modelService.createProcessDefinitionQuery();
    //查询上面发布的流程定义
    processDefinitionQuery.processDefinitionKey("Process_TaskServiceTest");
    //获得刚发布的流程定义
    ProcessDefinitionBehavior processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证流程定义存在
    assertNotNull(processDefinitionBehavior);
    //删除定义部署,并级联删除其下的所有流程定义
View Full Code Here

    //删除定义部署,并级联删除其下的所有流程定义
    modelService.deleteDeployment(deploymentIdTemp, true);
    //重置流程定义查询
    processDefinitionQuery=modelService.createProcessDefinitionQuery();
    //查询上面发布的流程定义
    processDefinitionQuery.processDefinitionKey("Process_TaskServiceTest");
    //查找刚发布的流程定义
    processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证流程定义已经被删除
    assertNull(processDefinitionBehavior);
   
View Full Code Here

    String deploymentIdTemp = deploymentBuilder.deploy().getId();
    assertNotNull(deploymentIdTemp);
    //创建一个流程定义查询
    ProcessDefinitionQuery processDefinitionQuery=modelService.createProcessDefinitionQuery();
    //查询刚刚发布的流程定义
    processDefinitionQuery.processDefinitionKey("Process_TaskServiceTest");
    ProcessDefinitionBehavior processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证是否发布成功
    assertNotNull(processDefinitionBehavior);
   
    //根据流程定义唯一编号获取流程图SVG
View Full Code Here

    String deploymentIdTemp = deploymentBuilder.deploy().getId();
    assertNotNull(deploymentIdTemp);
    //创建一个流程定义查询
    ProcessDefinitionQuery processDefinitionQuery=modelService.createProcessDefinitionQuery();
    //查询Process_TaskServiceTest的流程定义
    processDefinitionQuery.processDefinitionKey("Process_TaskServiceTest");
    //获取流程定义
    ProcessDefinitionBehavior processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证是否为空
    assertNotNull(processDefinitionBehavior);
   
View Full Code Here

    //验证是否发布成功
    assertNotNull(deploymentIdTemp);
    //创建一个流程定义查询
    ProcessDefinitionQuery processDefinitionQuery=modelService.createProcessDefinitionQuery();
    //查询刚发布的流程定义
    processDefinitionQuery.processDefinitionKey("Process_TaskServiceTest");
    ProcessDefinitionBehavior processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证是否得到
    assertNotNull(processDefinitionBehavior);
   
    //根据流程定义唯一编号获取流程图img
View Full Code Here

    //验证是否发布成功
    assertNotNull(deploymentIdTemp);
    //定义一个流程定义查询
    ProcessDefinitionQuery processDefinitionQuery=modelService.createProcessDefinitionQuery();
    //查询刚发布的流程定义
    processDefinitionQuery.processDefinitionKey("Process_TaskServiceTest");
    ProcessDefinitionBehavior processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证是否得到流程定义
    assertNotNull(processDefinitionBehavior);
   
    //定义部署资源的字节流
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.