本文整理汇总了Java中org.camunda.bpm.engine.task.Task.getExecutionId方法的典型用法代码示例。如果您正苦于以下问题:Java Task.getExecutionId方法的具体用法?Java Task.getExecutionId怎么用?Java Task.getExecutionId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.camunda.bpm.engine.task.Task
的用法示例。
在下文中一共展示了Task.getExecutionId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateFollowUpDate
import org.camunda.bpm.engine.task.Task; //导入方法依赖的package包/类
/**
* Test to update the followUp date of a given user task instance. Also check of task scope
* variables are not changed.
*/
@Test
public void updateFollowUpDate() {
ProcessInstance processInstance =
runtimeService.startProcessInstanceByKey("demoProcessWithTimerCycle");
Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId())
.singleResult();
runtimeService.setVariableLocal(task.getExecutionId(), "foo", "bar");
String taskInstanceId = task.getId();
String taskExecutionId = task.getExecutionId();
// followUpDate is set in BPM diagram
assertNotNull(task.getFollowUpDate());
// now unset followUpDate
task.setFollowUpDate(null);
taskService.saveTask(task);
// request task
Task task1 = taskService.createTaskQuery().processInstanceId(processInstance.getId())
.singleResult();
// check task properties
assertEquals(taskInstanceId, task1.getId());
assertEquals(taskExecutionId, task1.getExecutionId());
assertNull(task.getFollowUpDate());
// check task scope variable
assertEquals("bar", runtimeService.getVariableLocal(task.getExecutionId(), "foo"));
// cleanup after test
runtimeService.deleteProcessInstance(processInstance.getId(), "JUnit test");
}
示例2: 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;
}
示例3: 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;
}