Package org.activiti.engine

Examples of org.activiti.engine.TaskService.complete()


    taskService.complete(task.getId(), variableMap);
   
    task = taskService.createTaskQuery().taskAssignee("bb").singleResult();
    variableMap = new HashMap<String, Object>();
    variableMap.put("reApply", false);
    taskService.complete(task.getId(), variableMap);
   
    HistoryService historyService = activitiRule.getHistoryService();
    long count = historyService.createHistoricProcessInstanceQuery().finished().count();
    assertEquals(1, count);
  }
View Full Code Here


    taskService.claim(task.getId(), "aa");
   
    variableMap = new HashMap<String, Object>();
    variableMap.put("approved", false);
    variableMap.put("applyer", "bb");
    taskService.complete(task.getId(), variableMap);
   
    task = taskService.createTaskQuery().taskAssignee("bb").singleResult();
    variableMap = new HashMap<String, Object>();
    variableMap.put("reApply", true);
    taskService.complete(task.getId(), variableMap);
View Full Code Here

    taskService.complete(task.getId(), variableMap);
   
    task = taskService.createTaskQuery().taskAssignee("bb").singleResult();
    variableMap = new HashMap<String, Object>();
    variableMap.put("reApply", true);
    taskService.complete(task.getId(), variableMap);
   
    task = taskService.createTaskQuery().taskCandidateGroup("drawer").singleResult();
    assertNotNull(task);
  }
 
View Full Code Here

        multiinstance = true;
      }
      System.out.println(String.format("activiti id: %s, behavior type: %s, multiinstance: %b", activity.getId(), activityBehavior, multiinstance));
    }

    taskService.complete(task.getId());

    task = taskService.createTaskQuery().taskAssignee("henryyan").listPage(0, 1).get(0);
    taskService.complete(task.getId());
  }
}
View Full Code Here

    }

    taskService.complete(task.getId());

    task = taskService.createTaskQuery().taskAssignee("henryyan").listPage(0, 1).get(0);
    taskService.complete(task.getId());
  }
}
View Full Code Here

    HistoryService historyService = activitiRule.getHistoryService();
    List<HistoricProcessInstance> list2 = historyService.createHistoricProcessInstanceQuery().startedBy("henryyan").list();
    assertEquals(false, list2.isEmpty());

    Task task = taskService.createTaskQuery().taskAssignee("henryyan").singleResult();
    taskService.complete(task.getId());

    List<HistoricProcessInstance> list = historyService.createHistoricProcessInstanceQuery().finished().list();
    assertEquals(false, list.isEmpty());

    list2 = historyService.createHistoricProcessInstanceQuery().startedBy("henryyan").list();
View Full Code Here

    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("MultiInstanceBreakOnConditions", variableMap);
    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " " + processInstance.getProcessDefinitionId());
    TaskService taskService = activitiRule.getTaskService();
    Task task = taskService.createTaskQuery().singleResult();
    taskService.complete(task.getId());
   
    task = taskService.createTaskQuery().singleResult();
    taskService.complete(task.getId());
   
    long count = activitiRule.getHistoryService().createHistoricProcessInstanceQuery().finished().count();
View Full Code Here

    TaskService taskService = activitiRule.getTaskService();
    Task task = taskService.createTaskQuery().singleResult();
    taskService.complete(task.getId());
   
    task = taskService.createTaskQuery().singleResult();
    taskService.complete(task.getId());
   
    long count = activitiRule.getHistoryService().createHistoricProcessInstanceQuery().finished().count();
    assertEquals(1, count);
  }
}
View Full Code Here

    System.out.println("id " + processInstance.getId() + " " + processInstance.getProcessDefinitionId());
    TaskService taskService = activitiRule.getTaskService();
    Task task = taskService.createTaskQuery().singleResult();
    variableMap = new HashMap<String, Object>();
    variableMap.put("task2Users", new ArrayList<String>());
    taskService.complete(task.getId(), variableMap);
   
    task = taskService.createTaskQuery().singleResult();
    variableMap = new HashMap<String, Object>();
    variableMap.put("multiUsers", new ArrayList<String>());
    taskService.complete(task.getId(), variableMap);
View Full Code Here

    taskService.complete(task.getId(), variableMap);
   
    task = taskService.createTaskQuery().singleResult();
    variableMap = new HashMap<String, Object>();
    variableMap.put("multiUsers", new ArrayList<String>());
    taskService.complete(task.getId(), variableMap);
   
   
    HistoryService historyService = activitiRule.getHistoryService();
    long count = historyService.createHistoricProcessInstanceQuery().finished().count();
    assertEquals(1, count);
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.