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

Examples of com.founder.fix.fixflow.core.model.ProcessDefinitionQuery


    //发布
    String deploymentIdTemp = deploymentBuilder.deploy().getId();
    //验证是否发布成功
    assertNotNull(deploymentIdTemp);
    //定义一个流程定义查询
    ProcessDefinitionQuery processDefinitionQuery=modelService.createProcessDefinitionQuery();
    //查询刚发布的流程定义
    processDefinitionQuery.processDefinitionKey("Process_TaskServiceTest");
    ProcessDefinitionBehavior processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证是否得到流程定义
    assertNotNull(processDefinitionBehavior);
   
    //定义部署资源的字节流
    ResourceEntity resourceEntity = modelService.getResourceAsStream(processDefinitionBehavior.getResourceId());
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);
   
    //根据流程定义号获得流程定义
    ProcessDefinitionBehavior processDefinitionBehavior2 = modelService.getProcessDefinition(processDefinitionBehavior.getProcessDefinitionId());
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);
    //获得流程图节点的位置信息
    Map<String,Map<String,Object>> map = modelService.GetFlowGraphicsElementPosition(processDefinitionBehavior.getProcessDefinitionId());
    //验证是否含有UserTask_1,UserTask_4,EndEvent_1等节点
View Full Code Here

    deploymentBuilder.addZipInputStream(new ZipInputStream(inputStream));
    String deploymentId = deploymentBuilder.deploy().getId();
    //验证是否发布成功
    assertNotNull(deploymentId);
    //创建流程定义查询
    ProcessDefinitionQuery processDefinitionQuery = modelService.createProcessDefinitionQuery();
    //查询刚发布的流程定义
    processDefinitionQuery.processDefinitionKey("Process_TaskServiceTest");
    ProcessDefinitionBehavior processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证是否查询到
    assertNotNull(processDefinitionBehavior);
  }
View Full Code Here

    deploymentBuilder.addZipInputStream(new ZipInputStream(inputStream));
    String deploymentId = deploymentBuilder.deploy().getId();
    //验证是否发布成功
    assertNotNull(deploymentId);
    //创建流程定义查询
    ProcessDefinitionQuery processDefinitionQuery = modelService.createProcessDefinitionQuery();
    //查询刚发布的流程定义
    processDefinitionQuery.processDefinitionKey("Process_TaskServiceTest");
    ProcessDefinitionBehavior processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证是否查询到
    assertNotNull(processDefinitionBehavior);
   
    //获取流程定义编号
    String processDefinitionId = processDefinitionBehavior.getProcessDefinitionId();
View Full Code Here

    deploymentBuilder.addZipInputStream(new ZipInputStream(inputStream));
    String deploymentId = deploymentBuilder.deploy().getId();
    //验证是否发布成功
    assertNotNull(deploymentId);
    //创建流程定义查询
    ProcessDefinitionQuery processDefinitionQuery = modelService.createProcessDefinitionQuery();
    //查询刚发布的流程定义
    processDefinitionQuery.processDefinitionKey("Process_TaskServiceTest");
    ProcessDefinitionBehavior processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证是否查询到
    assertNotNull(processDefinitionBehavior);
   
    String deployId = processDefinitionBehavior.getDeploymentId();
    deploymentBuilder = processEngine.getModelService().createDeployment().name("测试名称");
    //获取zip文件的inputStream流
    inputStream = ReflectUtil.getResourceAsStream("com/founder/fix/fixflow/test/engine/api/model/Process_TaskServiceTest_new.zip");
    //发布流程定义
    deploymentBuilder.addZipInputStream(new ZipInputStream(inputStream));
    //设置需要更新的发布号
    deploymentBuilder.updateDeploymentId(deployId);
    //更新流程定义
    deploymentId = deploymentBuilder.deploy().getId();
    //重置流程定义查询
    processDefinitionQuery = modelService.createProcessDefinitionQuery();
    //查询刚发布的流程定义
    processDefinitionQuery.processDefinitionKey("Process_TaskServiceTest");
    //获取查询到的流程定义
    processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证是否查询到
    assertNotNull(processDefinitionBehavior);
   
    //查询新的流程定义中有没有ScriptTask_1
    FlowElement flowElement = processDefinitionBehavior.getFlowElement("ScriptTask_1");
View Full Code Here

    //通过zip文件的path发布流程
    String deploymentId = modelService.deploymentByZip("com/founder/fix/fixflow/test/engine/api/model/Process_TaskServiceTest.zip");
    assertNotNull(deploymentId);

    //创建流程定义查询
    ProcessDefinitionQuery processDefinitionQuery = modelService.createProcessDefinitionQuery();
    //查询刚发布的流程定义
    processDefinitionQuery.processDefinitionKey("Process_TaskServiceTest");
    ProcessDefinitionBehavior processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证是否查询到
    assertNotNull(processDefinitionBehavior);
   
    String deployId = processDefinitionBehavior.getDeploymentId();
   
    //更新流程定义
    deploymentId = modelService.updateDeploymentByZip("com/founder/fix/fixflow/test/engine/api/model/Process_TaskServiceTest_new.zip", deployId);
    //重置流程定义查询
    processDefinitionQuery = modelService.createProcessDefinitionQuery();
    //查询刚发布的流程定义
    processDefinitionQuery.processDefinitionKey("Process_TaskServiceTest");
    //获取查询到的流程定义
    processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证是否查询到
    assertNotNull(processDefinitionBehavior);
   
    //查询新的流程定义中有没有ScriptTask_1
    FlowElement flowElement = processDefinitionBehavior.getFlowElement("ScriptTask_1");
View Full Code Here

    //验证是否为配置的add
    assertEquals("add", taskFormUrl);
   
    /*********6.获取第二个任务节点toolbar***********************/
    //创建流程定义查询
    ProcessDefinitionQuery processDefinitionQuery = modelService.createProcessDefinitionQuery();
    //获取流程定义
    ProcessDefinitionBehavior processDefinition = processDefinitionQuery.processDefinitionKey("TaskServiceNewTest").singleResult();
    //获取流程定义编号   页面上用的时候应该能拿到流程定义号,就不用这样取了。
    String processDefinitionId = processDefinition.getProcessDefinitionId();
    //获取节点上的处理命令
    List<TaskCommandInst> taskCommandList= taskService.getTaskCommandById(processDefinitionId, nodeId);
    assertNotNull(taskCommandList);
View Full Code Here

   * 测试非开始节点的toolbar
   */
  @Deployment(resources = { "com/founder/fix/fixflow/test/engine/api/task/TaskServiceTest.bpmn"})
  public void testUserTaskToolBar(){
    //获取流程定义查询
    ProcessDefinitionQuery processDefinitionQuery = modelService.createProcessDefinitionQuery();
    //获得发布的流程定义
    ProcessDefinitionBehavior processDefinitionBehavior  = processDefinitionQuery.processDefinitionKey("Process_TaskServiceTest").singleResult();
    //获取此流程的开始节点可显示的命令
    List<TaskCommandInst> commands = taskService.getTaskCommandById(processDefinitionBehavior.getProcessDefinitionId(), "UserTask_3");
    //验证是否为7个命令,详见流程定义
    assertEquals(7, commands.size());
  }
View Full Code Here

TOP

Related Classes of com.founder.fix.fixflow.core.model.ProcessDefinitionQuery

Copyright © 2018 www.massapicom. 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.