org.activiti.engine.task.Task.getProcessInstanceId()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(272)

本文整理了Java中org.activiti.engine.task.Task.getProcessInstanceId()方法的一些代码示例,展示了Task.getProcessInstanceId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getProcessInstanceId()方法的具体详情如下:
包路径:org.activiti.engine.task.Task
类名称:Task
方法名:getProcessInstanceId

Task.getProcessInstanceId介绍

[英]Reference to the process instance or null if it is not related to a process instance.
[中]对流程实例的引用,如果与流程实例无关,则为null。

代码示例

代码示例来源:origin: hs-web/hsweb-framework

.processInstanceId(task.getProcessInstanceId())
.activityId(task.getTaskDefinitionKey())
.singleResult();

代码示例来源:origin: hs-web/hsweb-framework

.processInstanceId(task.getProcessInstanceId())
        .activityId(pvmTransition.getId())
        .list();
taskServiceImpl.getCommandExecutor().execute(new JumpTaskCmd(task.getExecutionId(), activityId));
selectNowTask(task.getProcessInstanceId())
    .forEach(t -> {

代码示例来源:origin: hs-web/hsweb-framework

.processInstanceId(curTask.getProcessInstanceId())
.singleResult();

代码示例来源:origin: hs-web/hsweb-framework

.processInstanceId(task.getProcessInstanceId())
.singleResult();

代码示例来源:origin: hs-web/hsweb-framework

.processInstanceId(task.getProcessInstanceId())
    .singleResult();
List<Task> tasks = selectNowTask(task.getProcessInstanceId());
for (Task next : tasks) {
  setVariablesLocal(next.getId(), variable);

代码示例来源:origin: Activiti/Activiti

if (task != null) {
 processDefinitionId = task.getProcessDefinitionId();
 processInstanceId = task.getProcessInstanceId();
 executionId = task.getExecutionId();

代码示例来源:origin: Activiti/Activiti

public Task from(org.activiti.engine.task.Task internalTask,
             Task.TaskStatus status) {
  TaskImpl task = new TaskImpl(internalTask.getId(),
                 internalTask.getName(),
                 status);
  task.setProcessDefinitionId(internalTask.getProcessDefinitionId());
  task.setProcessInstanceId(internalTask.getProcessInstanceId());
  task.setAssignee(internalTask.getAssignee());
  task.setClaimedDate(internalTask.getClaimTime());
  task.setCreatedDate(internalTask.getCreateTime());
  task.setDueDate(internalTask.getDueDate());
  task.setDescription(internalTask.getDescription());
  task.setOwner(internalTask.getOwner());
  task.setParentTaskId(internalTask.getParentTaskId());
  task.setPriority(internalTask.getPriority());
  task.setFormKey(internalTask.getFormKey());
  return task;
}

代码示例来源:origin: Activiti/Activiti

event.setProcessInstanceId(((Task) persistedObject).getProcessInstanceId());
event.setExecutionId(((Task) persistedObject).getExecutionId());
event.setProcessDefinitionId(((Task) persistedObject).getProcessDefinitionId());

代码示例来源:origin: bill1012/AdminEAP

Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
request.setAttribute("processInstanceId", task.getProcessInstanceId());
    .getProcessInstanceId()).singleResult();
String businessKey = processInstance.getBusinessKey();

代码示例来源:origin: bill1012/AdminEAP

@Override
public String getStartUserId(String taskId) {
  Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
  HistoricProcessInstance historicProcessInstance =
      historyService.createHistoricProcessInstanceQuery()
          .processInstanceId(task.getProcessInstanceId())
          .singleResult();
  return historicProcessInstance.getStartUserId();
}

代码示例来源:origin: org.flowable/flowable5-compatibility

@Override
public String getProcessInstanceId() {
  return activiti5Task.getProcessInstanceId();
}

代码示例来源:origin: bill1012/AdminEAP

.getProcessInstanceId()).singleResult();
vo.setProcessInstanceName(processInstance.getName());

代码示例来源:origin: org.alfresco/alfresco-repository

/**
* {@inheritDoc}
*/
@Override
protected Object handleTaskProperty(Task task, TypeDefinition type, QName key, Serializable value)
{
  return handlePackage(value, task.getProcessInstanceId());
}

代码示例来源:origin: Alfresco/alfresco-repository

/**
* {@inheritDoc}
*/
@Override
protected Object handleTaskProperty(Task task, TypeDefinition type, QName key, Serializable value)
{
  return handlePackage(value, task.getProcessInstanceId());
}

代码示例来源:origin: org.activiti/activiti-explorer

public void buttonClick(ClickEvent event) {
  viewManager.showMyProcessInstancesPage(task.getProcessInstanceId());
 }
});

代码示例来源:origin: org.aperteworkflow/activiti-context

@Override
  public ProcessInstance lambda(Task task) {
    ProcessInstance pi = instances.get(task.getProcessInstanceId());
    if (pi == null) {
      log.warning("process " + task.getProcessInstanceId() + " not found");
      return null;
    }
    pi.setState(task.getName());
    pi.setTaskId(task.getId());
    return pi;
  }
}.go();

代码示例来源:origin: com.quhaodian.discover/discover-workflow

@RequestMapping(value = "/admin/flow/task")
public String task(Model model, String taskid, HttpServletRequest request, Integer type) {
 Task task = taskService.createTaskQuery().taskId(taskid).singleResult();
 model.addAttribute("task", task);
 model.addAttribute("type", type);
 
 model.addAttribute("model", taskService.getVariables(taskid));
 
 ProcessInstance processInstance = runtimeService.createProcessInstanceQuery()
   .processInstanceId(task.getProcessInstanceId()).singleResult();
 model.addAttribute("records", flowService.records(processInstance.getBusinessKey()));
 
 return "/admin/flow/taskview";
}

代码示例来源:origin: com.bbossgroups.pdp/pdp-workflow

/**
 * 根据任务ID查询任务的待办人
 * 
 * @param taskId
 * @return
 */
@SuppressWarnings("unchecked")
public List<String> getUsersByTaskId(String taskId) {
  Task task = this.getTaskById(taskId);
  return (List<String>) this.getRuntimeService().getVariable(
      task.getProcessInstanceId(),
      task.getTaskDefinitionKey() + "_users");
}

代码示例来源:origin: org.toxos.process-assertions.activiti/activiti-6_0_0

@Override
public void taskIsUncompleted(final String taskId) {
  // Assert a task exists
  callback.trace(LogMessage.TASK_3, taskId);
  final Task task = getTaskService().createTaskQuery().taskId(taskId).active().singleResult();
  Assert.assertThat(task, is(notNullValue()));
  // Assert the process is not completed
  getAssertFactory().getProcessInstanceAssertable(callback).processIsActive(task.getProcessInstanceId());
}

代码示例来源:origin: org.activiti/activiti-rest

protected AttachmentResponse createSimpleAttachment(AttachmentRequest attachmentRequest, Task task) {
 if (attachmentRequest.getName() == null) {
  throw new ActivitiIllegalArgumentException("Attachment name is required.");
 }
 Attachment createdAttachment = taskService.createAttachment(attachmentRequest.getType(), task.getId(), task.getProcessInstanceId(), attachmentRequest.getName(),
   attachmentRequest.getDescription(), attachmentRequest.getExternalUrl());
 return restResponseFactory.createAttachmentResponse(createdAttachment);
}

相关文章