protected void propagateBpmnError(BpmnError error, ActivityExecution execution) throws Exception { propagateError(error.getErrorCode(), error.getMessage(), null, execution); }
protected void propagateBpmnError(BpmnError error, ActivityExecution execution) throws Exception { propagateError(error.getErrorCode(), error.getMessage(), null, execution); }
@Deployment(resources = { "org/camunda/bpm/engine/test/bpmn/event/error/BoundaryErrorEventTest.testCatchErrorThrownByJavaDelegateOnCallActivity-child.bpmn20.xml" }) public void testUncaughtErrorThrownByJavaDelegateOnServiceTask() { try { runtimeService.startProcessInstanceByKey("catchErrorThrownByJavaDelegateOnCallActivity-child"); } catch (BpmnError e) { assertTextPresent("No catching boundary event found for error with errorCode '23', neither in same process nor in parent process", e.getMessage()); } }
@Deployment(resources = { "org/camunda/bpm/engine/test/bpmn/event/error/BoundaryErrorEventTest.testUncaughtErrorThrownByJavaDelegateOnCallActivity-parent.bpmn20.xml", "org/camunda/bpm/engine/test/bpmn/event/error/BoundaryErrorEventTest.testCatchErrorThrownByJavaDelegateOnCallActivity-child.bpmn20.xml" }) public void testUncaughtErrorThrownByJavaDelegateOnCallActivity() { try { runtimeService.startProcessInstanceByKey("uncaughtErrorThrownByJavaDelegateOnCallActivity-parent"); } catch (BpmnError e) { assertTextPresent("No catching boundary event found for error with errorCode '23', neither in same process nor in parent process", e.getMessage()); } }
@Deployment(resources = { "org/camunda/bpm/engine/test/bpmn/event/error/BoundaryErrorEventTest.subprocess.bpmn20.xml" }) public void testUncaughtError() { runtimeService.startProcessInstanceByKey("simpleSubProcess"); Task task = taskService.createTaskQuery().singleResult(); assertEquals("Task in subprocess", task.getName()); try { // Completing the task will reach the end error event, // which is never caught in the process taskService.complete(task.getId()); } catch (BpmnError e) { assertTextPresent("No catching boundary event found for error with errorCode 'myError', neither in same process nor in parent process", e.getMessage()); } }
@Deployment(resources = { "org/camunda/bpm/engine/test/bpmn/event/error/BoundaryErrorEventTest.testUncaughtErrorOnCallActivity-parent.bpmn20.xml", "org/camunda/bpm/engine/test/bpmn/event/error/BoundaryErrorEventTest.subprocess.bpmn20.xml" }) public void testUncaughtErrorOnCallActivity() { runtimeService.startProcessInstanceByKey("uncaughtErrorOnCallActivity"); Task task = taskService.createTaskQuery().singleResult(); assertEquals("Task in subprocess", task.getName()); try { // Completing the task will reach the end error event, // which is never caught in the process taskService.complete(task.getId()); } catch (BpmnError e) { assertTextPresent("No catching boundary event found for error with errorCode 'myError', neither in same process nor in parent process", e.getMessage()); } }
protected void propagateBpmnError(BpmnError error, ActivityExecution execution) throws Exception { propagateError(error.getErrorCode(), error.getMessage(), null, execution); }
@Deployment(resources = { "org/camunda/bpm/engine/test/bpmn/event/error/BoundaryErrorEventTest.testCatchErrorThrownByJavaDelegateOnCallActivity-child.bpmn20.xml" }) public void testUncaughtErrorThrownByJavaDelegateOnServiceTask() { try { runtimeService.startProcessInstanceByKey("catchErrorThrownByJavaDelegateOnCallActivity-child"); } catch (BpmnError e) { assertTextPresent("No catching boundary event found for error with errorCode '23', neither in same process nor in parent process", e.getMessage()); } }
@Deployment(resources = { "org/camunda/bpm/engine/test/bpmn/event/error/BoundaryErrorEventTest.testUncaughtErrorThrownByJavaDelegateOnCallActivity-parent.bpmn20.xml", "org/camunda/bpm/engine/test/bpmn/event/error/BoundaryErrorEventTest.testCatchErrorThrownByJavaDelegateOnCallActivity-child.bpmn20.xml" }) public void testUncaughtErrorThrownByJavaDelegateOnCallActivity() { try { runtimeService.startProcessInstanceByKey("uncaughtErrorThrownByJavaDelegateOnCallActivity-parent"); } catch (BpmnError e) { assertTextPresent("No catching boundary event found for error with errorCode '23', neither in same process nor in parent process", e.getMessage()); } }
@Deployment(resources = { "org/camunda/bpm/engine/test/bpmn/event/error/BoundaryErrorEventTest.subprocess.bpmn20.xml" }) public void testUncaughtError() { runtimeService.startProcessInstanceByKey("simpleSubProcess"); Task task = taskService.createTaskQuery().singleResult(); assertEquals("Task in subprocess", task.getName()); try { // Completing the task will reach the end error event, // which is never caught in the process taskService.complete(task.getId()); } catch (BpmnError e) { assertTextPresent("No catching boundary event found for error with errorCode 'myError', neither in same process nor in parent process", e.getMessage()); } }
@Deployment(resources = { "org/camunda/bpm/engine/test/bpmn/event/error/BoundaryErrorEventTest.testUncaughtErrorOnCallActivity-parent.bpmn20.xml", "org/camunda/bpm/engine/test/bpmn/event/error/BoundaryErrorEventTest.subprocess.bpmn20.xml" }) public void testUncaughtErrorOnCallActivity() { runtimeService.startProcessInstanceByKey("uncaughtErrorOnCallActivity"); Task task = taskService.createTaskQuery().singleResult(); assertEquals("Task in subprocess", task.getName()); try { // Completing the task will reach the end error event, // which is never caught in the process taskService.complete(task.getId()); } catch (BpmnError e) { assertTextPresent("No catching boundary event found for error with errorCode 'myError', neither in same process nor in parent process", e.getMessage()); } }