本文整理了Java中org.camunda.bpm.engine.task.Task.getExecutionId()
方法的一些代码示例,展示了Task.getExecutionId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getExecutionId()
方法的具体详情如下:
包路径:org.camunda.bpm.engine.task.Task
类名称:Task
方法名:getExecutionId
[英]Reference to the path of execution or null if it is not related to a process instance.
[中]引用执行路径,如果与流程实例无关,则为null。
代码示例来源:origin: camunda/camunda-bpm-platform
@Override
public String getProperty(Task obj) {
return obj.getExecutionId();
}
});
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = {"org/camunda/bpm/engine/test/bpmn/event/escalation/EscalationEventTest.throwEscalationEvent.bpmn20.xml",
"org/camunda/bpm/engine/test/bpmn/event/escalation/EscalationEventSubprocessTest.testNonInterruptingRetrieveEscalationCodeInSuperProcess.bpmn20.xml"})
public void testNonInterruptingRetrieveEscalationCodeInSuperProcess() {
runtimeService.startProcessInstanceByKey("catchEscalationProcess");
// the event subprocess without escalationCode should catch the escalation event
Task task = taskService.createTaskQuery().taskDefinitionKey("taskAfterCatchedEscalation").singleResult();
assertNotNull(task);
// and set the escalationCode of the escalation event to the declared variable
assertEquals("escalationCode", runtimeService.getVariable(task.getExecutionId(), "escalationCodeVar"));
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = {"org/camunda/bpm/engine/test/bpmn/event/escalation/EscalationEventTest.throwEscalationEvent.bpmn20.xml",
"org/camunda/bpm/engine/test/bpmn/event/escalation/EscalationEventSubprocessTest.testNonInterruptingRetrieveEscalationCodeInSuperProcessWithoutEscalationCode.bpmn20.xml"})
public void testNonInterruptingRetrieveEscalationCodeInSuperProcessWithoutEscalationCode() {
runtimeService.startProcessInstanceByKey("catchEscalationProcess");
// the event subprocess without escalationCode should catch the escalation event
Task task = taskService.createTaskQuery().taskDefinitionKey("taskAfterCatchedEscalation").singleResult();
assertNotNull(task);
// and set the escalationCode of the escalation event to the declared variable
assertEquals("escalationCode", runtimeService.getVariable(task.getExecutionId(), "escalationCodeVar"));
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment
public void testRetrieveEscalationCodeVariableOnEventSubprocess() {
runtimeService.startProcessInstanceByKey("escalationProcess");
// when throw an escalation event inside the subprocess
// the event subprocess should catch the escalation event
Task task = taskService.createTaskQuery().taskName("task after catched escalation").singleResult();
assertNotNull(task);
// and set the escalationCode of the escalation event to the declared variable
assertEquals("escalationCode", runtimeService.getVariable(task.getExecutionId(), "escalationCodeVar"));
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testMessageEventReceivedByExecutionIdWithUpdateInstancesPermissionOnProcessDefinition() {
// given
startProcessInstanceByKey(MESSAGE_BOUNDARY_PROCESS_KEY);
createGrantAuthorization(PROCESS_DEFINITION, MESSAGE_BOUNDARY_PROCESS_KEY, userId, UPDATE_INSTANCE);
String executionId = selectSingleTask().getExecutionId();
// when
runtimeService.messageEventReceived("boundaryInvoiceMessage", executionId);
// then
Task task = selectSingleTask();
assertNotNull(task);
assertEquals("taskAfterBoundaryEvent", task.getTaskDefinitionKey());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment
public void testRetrieveEscalationCodeVariableOnBoundaryEvent() {
runtimeService.startProcessInstanceByKey("escalationProcess");
// when throw an escalation event inside the subprocess
// the boundary event should catch the escalation event
Task task = taskService.createTaskQuery().taskName("task after catched escalation").singleResult();
assertNotNull(task);
// and set the escalationCode of the escalation event to the declared variable
assertEquals("escalationCode", runtimeService.getVariable(task.getExecutionId(), "escalationCodeVar"));
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment
public void testRetrieveEscalationCodeVariableOnBoundaryEventWithoutEscalationCode() {
runtimeService.startProcessInstanceByKey("escalationProcess");
// when throw an escalation event inside the subprocess
// the boundary event without escalationCode should catch the escalation event
Task task = taskService.createTaskQuery().taskName("task after catched escalation").singleResult();
assertNotNull(task);
// and set the escalationCode of the escalation event to the declared variable
assertEquals("escalationCode", runtimeService.getVariable(task.getExecutionId(), "escalationCodeVar"));
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = {"org/camunda/bpm/engine/test/bpmn/event/escalation/EscalationEventTest.throwEscalationEvent.bpmn20.xml",
"org/camunda/bpm/engine/test/bpmn/event/escalation/EscalationEventTest.testInterruptingRetrieveEscalationCodeInSuperProcessWithoutEscalationCode.bpmn20.xml"})
public void testInterruptingRetrieveEscalationCodeInSuperProcessWithoutEscalationCode() {
runtimeService.startProcessInstanceByKey("catchEscalationProcess");
// the event subprocess without escalationCode should catch the escalation event
Task task = taskService.createTaskQuery().taskDefinitionKey("taskAfterCatchedEscalation").singleResult();
assertNotNull(task);
// and set the escalationCode of the escalation event to the declared variable
assertEquals("escalationCode", runtimeService.getVariable(task.getExecutionId(), "escalationCodeVar"));
}
@Deployment(resources = {"org/camunda/bpm/engine/test/bpmn/event/escalation/EscalationEventTest.throwEscalationEvent.bpmn20.xml",
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment
public void testRetrieveEscalationCodeVariableOnEventSubprocessWithoutEscalationCode() {
runtimeService.startProcessInstanceByKey("escalationProcess");
// when throw an escalation event inside the subprocess
// the event subprocess without escalationCode should catch the escalation event
Task task = taskService.createTaskQuery().taskName("task after catched escalation").singleResult();
assertNotNull(task);
// and set the escalationCode of the escalation event to the declared variable
assertEquals("escalationCode", runtimeService.getVariable(task.getExecutionId(), "escalationCodeVar"));
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testMessageEventReceivedByExecutionIdWithUpdatePermissionOnAnyProcessInstance() {
// given
startProcessInstanceByKey(MESSAGE_BOUNDARY_PROCESS_KEY);
createGrantAuthorization(PROCESS_INSTANCE, ANY, userId, UPDATE);
String executionId = selectSingleTask().getExecutionId();
// when
runtimeService.messageEventReceived("boundaryInvoiceMessage", executionId);
// then
Task task = selectSingleTask();
assertNotNull(task);
assertEquals("taskAfterBoundaryEvent", task.getTaskDefinitionKey());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = {"org/camunda/bpm/engine/test/bpmn/event/escalation/EscalationEventTest.throwEscalationEvent.bpmn20.xml",
"org/camunda/bpm/engine/test/bpmn/event/escalation/EscalationEventTest.testInterruptingRetrieveEscalationCodeInSuperProcess.bpmn20.xml"})
public void testInterruptingRetrieveEscalationCodeInSuperProcess() {
runtimeService.startProcessInstanceByKey("catchEscalationProcess");
// the event subprocess without escalationCode should catch the escalation event
Task task = taskService.createTaskQuery().taskDefinitionKey("taskAfterCatchedEscalation").singleResult();
assertNotNull(task);
// and set the escalationCode of the escalation event to the declared variable
assertEquals("escalationCode", runtimeService.getVariable(task.getExecutionId(), "escalationCodeVar"));
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = {"org/camunda/bpm/engine/test/bpmn/event/escalation/EscalationEventTest.throwEscalationEvent.bpmn20.xml",
"org/camunda/bpm/engine/test/bpmn/event/escalation/EscalationEventTest.testNonInterruptingRetrieveEscalationCodeInSuperProcess.bpmn20.xml"})
public void testNonInterruptingRetrieveEscalationCodeInSuperProcess() {
runtimeService.startProcessInstanceByKey("catchEscalationProcess");
// the event subprocess without escalationCode should catch the escalation event
Task task = taskService.createTaskQuery().taskDefinitionKey("taskAfterCatchedEscalation").singleResult();
assertNotNull(task);
// and set the escalationCode of the escalation event to the declared variable
assertEquals("escalationCode", runtimeService.getVariable(task.getExecutionId(), "escalationCodeVar"));
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = {"org/camunda/bpm/engine/test/bpmn/event/escalation/EscalationEventTest.throwEscalationEvent.bpmn20.xml",
"org/camunda/bpm/engine/test/bpmn/event/escalation/EscalationEventTest.testNonInterruptingRetrieveEscalationCodeInSuperProcessWithoutEscalationCode.bpmn20.xml"})
public void testNonInterruptingRetrieveEscalationCodeInSuperProcessWithoutEscalationCode() {
runtimeService.startProcessInstanceByKey("catchEscalationProcess");
// the event subprocess without escalationCode should catch the escalation event
Task task = taskService.createTaskQuery().taskDefinitionKey("taskAfterCatchedEscalation").singleResult();
assertNotNull(task);
// and set the escalationCode of the escalation event to the declared variable
assertEquals("escalationCode", runtimeService.getVariable(task.getExecutionId(), "escalationCodeVar"));
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = {"org/camunda/bpm/engine/test/bpmn/event/escalation/EscalationEventTest.throwEscalationEvent.bpmn20.xml",
"org/camunda/bpm/engine/test/bpmn/event/escalation/EscalationEventSubprocessTest.testInterruptingRetrieveEscalationCodeInSuperProcessWithoutEscalationCode.bpmn20.xml"})
public void testInterruptingRetrieveEscalationCodeInSuperProcessWithoutEscalationCode() {
runtimeService.startProcessInstanceByKey("catchEscalationProcess");
// the event subprocess without escalationCode should catch the escalation event
Task task = taskService.createTaskQuery().taskDefinitionKey("taskAfterCatchedEscalation").singleResult();
assertNotNull(task);
// and set the escalationCode of the escalation event to the declared variable
assertEquals("escalationCode", runtimeService.getVariable(task.getExecutionId(), "escalationCodeVar"));
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testSignalEventReceivedByExecutionIdWithUpdatePermissionOnAnyProcessInstance() {
// given
startProcessInstanceByKey(SIGNAL_BOUNDARY_PROCESS_KEY);
createGrantAuthorization(PROCESS_INSTANCE, ANY, userId, UPDATE);
String executionId = selectSingleTask().getExecutionId();
// when
runtimeService.signalEventReceived("alert", executionId);
// then
Task task = selectSingleTask();
assertNotNull(task);
assertEquals("taskAfterBoundaryEvent", task.getTaskDefinitionKey());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = {"org/camunda/bpm/engine/test/bpmn/event/escalation/EscalationEventTest.throwEscalationEvent.bpmn20.xml",
"org/camunda/bpm/engine/test/bpmn/event/escalation/EscalationEventSubprocessTest.testInterruptingRetrieveEscalationCodeInSuperProcess.bpmn20.xml"})
public void testInterruptingRetrieveEscalationCodeInSuperProcess() {
runtimeService.startProcessInstanceByKey("catchEscalationProcess");
// the event subprocess without escalationCode should catch the escalation event
Task task = taskService.createTaskQuery().taskDefinitionKey("taskAfterCatchedEscalation").singleResult();
assertNotNull(task);
// and set the escalationCode of the escalation event to the declared variable
assertEquals("escalationCode", runtimeService.getVariable(task.getExecutionId(), "escalationCodeVar"));
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testSignalEventReceivedByExecutionIdWithUpdateInstancesPermissionOnProcessDefinition() {
// given
startProcessInstanceByKey(SIGNAL_BOUNDARY_PROCESS_KEY);
createGrantAuthorization(PROCESS_DEFINITION, SIGNAL_BOUNDARY_PROCESS_KEY, userId, UPDATE_INSTANCE);
String executionId = selectSingleTask().getExecutionId();
// when
runtimeService.signalEventReceived("alert", executionId);
// then
Task task = selectSingleTask();
assertNotNull(task);
assertEquals("taskAfterBoundaryEvent", task.getTaskDefinitionKey());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testSignalEventReceivedByExecutionIdWithUpdatePermissionOnProcessInstance() {
// given
String processInstanceId = startProcessInstanceByKey(SIGNAL_BOUNDARY_PROCESS_KEY).getId();
createGrantAuthorization(PROCESS_INSTANCE, processInstanceId, userId, UPDATE);
String executionId = selectSingleTask().getExecutionId();
// when
runtimeService.signalEventReceived("alert", executionId);
// then
Task task = selectSingleTask();
assertNotNull(task);
assertEquals("taskAfterBoundaryEvent", task.getTaskDefinitionKey());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testMessageEventReceivedByExecutionIdWithUpdatePermissionOnProcessInstance() {
// given
String processInstanceId = startProcessInstanceByKey(MESSAGE_BOUNDARY_PROCESS_KEY).getId();
createGrantAuthorization(PROCESS_INSTANCE, processInstanceId, userId, UPDATE);
String executionId = selectSingleTask().getExecutionId();
// when
runtimeService.messageEventReceived("boundaryInvoiceMessage", executionId);
// then
Task task = selectSingleTask();
assertNotNull(task);
assertEquals("taskAfterBoundaryEvent", task.getTaskDefinitionKey());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testMessageEventReceivedByExecutionId() {
// given
String processInstanceId = startProcessInstanceByKey(MESSAGE_BOUNDARY_PROCESS_KEY).getId();
createGrantAuthorization(PROCESS_INSTANCE, processInstanceId, userId, UPDATE);
createGrantAuthorization(PROCESS_DEFINITION, MESSAGE_BOUNDARY_PROCESS_KEY, userId, UPDATE_INSTANCE);
String executionId = selectSingleTask().getExecutionId();
// when
runtimeService.messageEventReceived("boundaryInvoiceMessage", executionId);
// then
Task task = selectSingleTask();
assertNotNull(task);
assertEquals("taskAfterBoundaryEvent", task.getTaskDefinitionKey());
}
内容来源于网络,如有侵权,请联系作者删除!