Package org.activiti.engine

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


    TaskService taskService = activitiRule.getTaskService();
    Task task = taskService.createTaskQuery().taskAssignee("henryyan").singleResult();
   
    variableMap = new HashMap<String, Object>();
    variableMap.put("amount", 328d);
    taskService.complete(task.getId(), variableMap);
   
    task = taskService.createTaskQuery().taskAssignee("henryyan").singleResult();
    assertEquals("银行付款", task.getName());
    Object variable = taskService.getVariable(task.getId(), "amount");
    assertNotNull(variable);
View Full Code Here


        // 完成第一个任务
        TaskService taskService = activitiRule.getTaskService();
        Task task = taskService.createTaskQuery().singleResult();
        assertEquals("user1", task.getAssignee());
        taskService.complete(task.getId());
        System.out.println("完成任务:usertask1");

        // 查询任务,通过调用
        task = taskService.createTaskQuery().singleResult();
        assertEquals("usertask3", task.getTaskDefinitionKey());
View Full Code Here

        // 查询任务,通过调用
        task = taskService.createTaskQuery().singleResult();
        assertEquals("usertask3", task.getTaskDefinitionKey());

        taskService.complete(task.getId());
        System.out.println("完成任务:usertask3");

        // 任务达到usertask4
        task = taskService.createTaskQuery().singleResult();
        assertEquals("usertask4", task.getTaskDefinitionKey());
View Full Code Here

    Task task = taskService.createTaskQuery().taskDefinitionKey("userTask").singleResult();
    TimeUnit.MILLISECONDS.sleep(50);
    variables = new HashMap<String, Object>();
    variables.put(TASK_TEST_VARIABLE, TASK_TEST_VALUE);
    taskService.complete(task.getId(), variables);

    // transform log events
    List<EventLogEntry> eventLogEntries = managementService.getEventLogEntries(null, null);

    EventLogTransformer transformer = new EventLogTransformer(getTransformers());
View Full Code Here

    variables.put(TEST_VARIABLE, TEST_VALUE);
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(USERTASK_PROCESS, BUSINESS_KEY, variables);

    Task task = taskService.createTaskQuery().taskDefinitionKey("userTask").singleResult();
    TimeUnit.MILLISECONDS.sleep(50);
    taskService.complete(task.getId());

    final SimulationDebugger simRun = new ReplaySimulationRun(processEngine, getReplayHandlers(processInstance.getId()));

    simRun.init(new NoExecutionVariableScope());
View Full Code Here

    }
   
    // In between task should be active
    Task task = taskService.createTaskQuery().singleResult();
    assertEquals("Task in between", task.getName());
    taskService.complete(task.getId());
   
    // There should be two task open now for gonzo
    assertEquals(2, taskService.createTaskQuery().taskAssignee("gonzo").count());
  }
 
View Full Code Here

    assertEquals(1, taskService.createTaskQuery().taskAssignee("kermit").count());
    assertEquals(0, taskService.createTaskQuery().taskAssignee("gonzo").count());
   
    Task task = taskService.createTaskQuery().singleResult();
    assertEquals("first task", task.getName());
    taskService.complete(task.getId());
   
    task = taskService.createTaskQuery().singleResult();
    assertEquals("second task", task.getName());
    taskService.complete(task.getId());
   
View Full Code Here

    assertEquals("first task", task.getName());
    taskService.complete(task.getId());
   
    task = taskService.createTaskQuery().singleResult();
    assertEquals("second task", task.getName());
    taskService.complete(task.getId());
   
    task = taskService.createTaskQuery().singleResult();
    assertEquals("last task", task.getName());
    taskService.complete(task.getId());
   
View Full Code Here

    assertEquals("second task", task.getName());
    taskService.complete(task.getId());
   
    task = taskService.createTaskQuery().singleResult();
    assertEquals("last task", task.getName());
    taskService.complete(task.getId());
   
    assertEquals(0, activitiRule.getRuntimeService().createProcessInstanceQuery().processInstanceId(instance.getId()).count());
   
    varMap = new HashMap<String, Object>();
    varMap.put("test", "world");
View Full Code Here

    assertEquals(0, taskService.createTaskQuery().taskAssignee("kermit").count());
    assertEquals(1, taskService.createTaskQuery().taskAssignee("gonzo").count());
   
    task = taskService.createTaskQuery().singleResult();
    assertEquals("gonzo task", task.getName());
    taskService.complete(task.getId());
   
    task = taskService.createTaskQuery().singleResult();
    assertEquals("last task", task.getName());
    taskService.complete(task.getId());
   
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.