Package org.activiti.engine

Examples of org.activiti.engine.EngineServices


public class AutoListener implements ExecutionListener {

  @Override
  public void notify(DelegateExecution execution) throws Exception {
    // TODO Auto-generated method stub
    EngineServices engineServices = execution.getEngineServices();
    RuntimeService runtimeService = engineServices.getRuntimeService();
    runtimeService.signal(execution.getId());
  }
View Full Code Here


                skipTasks.put("usertask2", "user1"); // 预先设定
                skipTasks.put("usertask4", "user1"); // 动态设定以
                skipTasks.put("usertask5", "user1"); // 候选人
                skipTasks.put("usertask6", "user1"); // 候选组

                EngineServices engineServices = entityEvent.getEngineServices();
                IdentityService identityService = engineServices.getIdentityService();
                TaskService taskService = engineServices.getTaskService();

                String taskDefinitionKey = taskEntity.getTaskDefinitionKey();
                String userId = skipTasks.get(taskDefinitionKey);

                if (userId == null) {
View Full Code Here

public class AutoCompleteTaskListener implements TaskListener {

  @Override
  public void notify(DelegateTask delegateTask) {
    EngineServices engineServices = delegateTask.getExecution()
        .getEngineServices();
    TaskService taskService = engineServices.getTaskService();
    List<IdentityLink> identityLinksForTask = taskService.getIdentityLinksForTask(delegateTask.getId());
    for (IdentityLink identityLink : identityLinksForTask) {
      taskService.deleteCandidateGroup(delegateTask.getId(), identityLink.getGroupId());
    }
    taskService.complete(delegateTask.getId());
View Full Code Here

TOP

Related Classes of org.activiti.engine.EngineServices

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.