当前位置: 首页>>代码示例>>Java>>正文


Java Task.getName方法代码示例

本文整理汇总了Java中org.camunda.bpm.engine.task.Task.getName方法的典型用法代码示例。如果您正苦于以下问题:Java Task.getName方法的具体用法?Java Task.getName怎么用?Java Task.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.camunda.bpm.engine.task.Task的用法示例。


在下文中一共展示了Task.getName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: get

import org.camunda.bpm.engine.task.Task; //导入方法依赖的package包/类
/**
 * Gets one task for specified id.
 *
 * <p>
 *     Task must be assigned or assignable to calling user (directly or via candidate group).
 * </p>
 * <p>
 *     This method will fail if no user is logged in.
 * </p>
 *
 * @param id Id of the task
 * @return A task
 */
public TaskDto get(String id) {
    Task task = getOwnTask(id);

    if (task == null) {
        task = getUnassignedTask(id);
    }

    if (task == null) {
        task = getUnassignedGroupTask(id);
    }

    if (task != null) {
        Map<String, String> businessKeys = getProcessBusinessKeys(asSet(task.getProcessInstanceId()));

        return new TaskDto(task.getId(), task.getTaskDefinitionKey(), task.getName(),
                task.getDescription(), task.getProcessInstanceId(),
                toInstant(task.getDueDate()), toInstant(task.getCreateTime()), null,
                businessKeys.get(task.getProcessInstanceId()),
                task.getAssignee(), null);
    } else {
        throw new MissingObject(TaskDto.class, id);
    }
}
 
开发者ID:LIBCAS,项目名称:ARCLib,代码行数:37,代码来源:TaskList.java

示例2: doExecute

import org.camunda.bpm.engine.task.Task; //导入方法依赖的package包/类
@Override
protected Object doExecute() throws Exception {
  TaskQuery taskQuery = engine.getTaskService().createTaskQuery();
  if (processId != null) {
    taskQuery.processDefinitionId(processId);
  }
  List<Task> tasks = taskQuery.orderByTaskCreateTime().asc().list();
  int i = 0;
  String[][] data = new String[tasks.size()][HEADER.length];
  for (Task task : tasks) {
    data[i++] = new String[]{
        task.getId(),
        task.getProcessInstanceId(),
        task.getProcessDefinitionId(),
        task.getAssignee(),
        task.getName()};
  }
  return null;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform-osgi,代码行数:20,代码来源:TaskList.java

示例3: shipmentTaskFromTask

import org.camunda.bpm.engine.task.Task; //导入方法依赖的package包/类
private  List<ShipmentTaskDS> shipmentTaskFromTask(Collection<Task> tasks) {
    List<ShipmentTaskDS> shipmentTasks = new ArrayList<ShipmentTaskDS>();
    for (Task task : tasks) {
        CaseInstance caseInstance = caseService.createCaseInstanceQuery().caseInstanceId(task.getCaseInstanceId()).active().singleResult();
        Shipment shipment = shipmentRepository.findOneBytrackingId(caseInstance.getBusinessKey());

        ShipmentTaskDS shipmentTaskDS = new ShipmentTaskDS(task.getDescription(), task.getId(), task.getName(), shipment.trackingId,
                task.getCreateTime(), task.getDueDate(), task.getAssignee(), shipment.sender, shipment.receiver);
        shipmentTasks.add(shipmentTaskDS);
    }
    return shipmentTasks;
}
 
开发者ID:Educama,项目名称:Showcase,代码行数:13,代码来源:ShipmentTaskBoundaryServiceImpl.java

示例4: assertTaskNames

import org.camunda.bpm.engine.task.Task; //导入方法依赖的package包/类
public static void assertTaskNames(List<Task> actualTasks, String ... expectedTaskNames ) {
  List<String> expectedNames = new ArrayList<String>(Arrays.asList(expectedTaskNames));
  for (Task task : actualTasks) {
    String actualTaskName = task.getName();
    if (expectedNames.contains(actualTaskName)) {
      expectedNames.remove(actualTaskName);
    }
  }
  assertTrue(expectedNames.isEmpty());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:11,代码来源:AbstractConditionalEventTestCase.java

示例5: fromEntity

import org.camunda.bpm.engine.task.Task; //导入方法依赖的package包/类
public static TaskDto fromEntity(Task task) {
  TaskDto dto = new TaskDto();
  dto.id = task.getId();
  dto.name = task.getName();
  dto.assignee = task.getAssignee();
  dto.created = task.getCreateTime();
  dto.due = task.getDueDate();
  dto.followUp = task.getFollowUpDate();

  if (task.getDelegationState() != null) {
    dto.delegationState = task.getDelegationState().toString();
  }

  dto.description = task.getDescription();
  dto.executionId = task.getExecutionId();
  dto.owner = task.getOwner();
  dto.parentTaskId = task.getParentTaskId();
  dto.priority = task.getPriority();
  dto.processDefinitionId = task.getProcessDefinitionId();
  dto.processInstanceId = task.getProcessInstanceId();
  dto.taskDefinitionKey = task.getTaskDefinitionKey();
  dto.caseDefinitionId = task.getCaseDefinitionId();
  dto.caseExecutionId = task.getCaseExecutionId();
  dto.caseInstanceId = task.getCaseInstanceId();
  dto.suspended = task.isSuspended();
  dto.tenantId = task.getTenantId();

  try {
    dto.formKey = task.getFormKey();
  }
  catch (BadUserRequestException e) {
    // ignore (initializeFormKeys was not called)
  }
  return dto;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:36,代码来源:TaskDto.java

示例6: fromTask

import org.camunda.bpm.engine.task.Task; //导入方法依赖的package包/类
public static HalTask fromTask(Task task) {
  HalTask dto = new HalTask();

  // task state
  dto.id = task.getId();
  dto.name = task.getName();
  dto.assignee = task.getAssignee();
  dto.created = task.getCreateTime();
  dto.due = task.getDueDate();
  dto.followUp = task.getFollowUpDate();
  dto.delegationState = task.getDelegationState();
  dto.description = task.getDescription();
  dto.executionId = task.getExecutionId();
  dto.owner = task.getOwner();
  dto.parentTaskId = task.getParentTaskId();
  dto.priority = task.getPriority();
  dto.processDefinitionId = task.getProcessDefinitionId();
  dto.processInstanceId = task.getProcessInstanceId();
  dto.taskDefinitionKey = task.getTaskDefinitionKey();
  dto.caseDefinitionId = task.getCaseDefinitionId();
  dto.caseExecutionId = task.getCaseExecutionId();
  dto.caseInstanceId = task.getCaseInstanceId();
  dto.suspended = task.isSuspended();
  dto.tenantId = task.getTenantId();
  try {
    dto.formKey = task.getFormKey();
  }
  catch (BadUserRequestException e) {
    // ignore (initializeFormKeys was not called)
  }

  // links
  dto.linker.createLink(REL_SELF, task.getId());
  dto.linker.createLink(REL_ASSIGNEE, task.getAssignee());
  dto.linker.createLink(REL_OWNER, task.getOwner());
  dto.linker.createLink(REL_EXECUTION,task.getExecutionId());
  dto.linker.createLink(REL_PARENT_TASK, task.getParentTaskId());
  dto.linker.createLink(REL_PROCESS_DEFINITION, task.getProcessDefinitionId());
  dto.linker.createLink(REL_PROCESS_INSTANCE, task.getProcessInstanceId());
  dto.linker.createLink(REL_CASE_INSTANCE, task.getCaseInstanceId());
  dto.linker.createLink(REL_CASE_EXECUTION, task.getCaseExecutionId());
  dto.linker.createLink(REL_CASE_DEFINITION, task.getCaseDefinitionId());
  dto.linker.createLink(REL_IDENTITY_LINKS, task.getId());

  return dto;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:47,代码来源:HalTask.java


注:本文中的org.camunda.bpm.engine.task.Task.getName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。