@Test public void testCamundaTimeoutDurationTaskListenerByExpression() { modelInstance = Bpmn.createProcess() .startEvent() .userTask("task") .camundaTaskListenerExpressionTimeoutWithDuration("timeout-1", "anExpression", "PT1H") .endEvent() .done(); UserTask userTask = modelInstance.getModelElementById("task"); ExtensionElements extensionElements = userTask.getExtensionElements(); Collection<CamundaTaskListener> taskListeners = extensionElements.getChildElementsByType(CamundaTaskListener.class); assertThat(taskListeners).hasSize(1); CamundaTaskListener taskListener = taskListeners.iterator().next(); assertThat(taskListener.getCamundaExpression()).isEqualTo("anExpression"); assertThat(taskListener.getCamundaEvent()).isEqualTo("timeout"); Collection<TimerEventDefinition> timeouts = taskListener.getTimeouts(); assertThat(timeouts.size()).isEqualTo(1); TimerEventDefinition timeout = timeouts.iterator().next(); assertThat(timeout.getTimeCycle()).isNull(); assertThat(timeout.getTimeDate()).isNull(); assertThat(timeout.getTimeDuration()).isNotNull(); assertThat(timeout.getTimeDuration().getRawTextContent()).isEqualTo("PT1H"); }
public StartEventBuilder startEvent() { return startEvent(null); }
ProcessBuilder extends AbstractProcessBuilder<ProcessBuilder> { public StartEventBuilder startEvent() { return startEvent(null); } }
ProcessBuilder extends AbstractProcessBuilder<ProcessBuilder> { public StartEventBuilder startEvent() { return startEvent(null); } ProcessBuilder(BpmnModelInstance modelInstance, Process process); }
ProcessBuilder extends AbstractProcessBuilder<ProcessBuilder> { public StartEventBuilder startEvent() { return startEvent(null); } ProcessBuilder(BpmnModelInstance modelInstance, Process process); StartEventBuilder startEvent(); StartEventBuilder startEvent(String id); EventSubProcessBuilder eventSubProcess(); EventSubProcessBuilder eventSubProcess(String id); }
ProcessBuilder extends AbstractProcessBuilder<ProcessBuilder> { public StartEventBuilder startEvent() { return startEvent(null); } ProcessBuilder(BpmnModelInstance modelInstance, Process process); StartEventBuilder startEvent(); StartEventBuilder startEvent(String id); EventSubProcessBuilder eventSubProcess(); EventSubProcessBuilder eventSubProcess(String id);  }