use of org.camunda.bpm.model.cmmn.instance.TimerEvent in project camunda-cmmn-model by camunda.
the class TimerEventImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(TimerEvent.class, CMMN_ELEMENT_TIMER_EVENT).namespaceUri(CMMN10_NS).extendsType(Event.class).instanceProvider(new ModelTypeInstanceProvider<TimerEvent>() {
public TimerEvent newInstance(ModelTypeInstanceContext instanceContext) {
return new TimerEventImpl(instanceContext);
}
});
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
timerExpressionChild = sequenceBuilder.element(TimerExpression.class).build();
timerStartChild = sequenceBuilder.element(StartTrigger.class).build();
typeBuilder.build();
}
use of org.camunda.bpm.model.cmmn.instance.TimerEvent in project camunda-cmmn-model by camunda.
the class Cmmn10Test method shouldGetEvents.
@Test
public void shouldGetEvents() {
CmmnModelInstance modelInstance = getCmmnModelInstance();
Event event = modelInstance.getModelElementsByType(Event.class).iterator().next();
assertThat(event).isNotNull();
UserEvent userEvent = modelInstance.getModelElementsByType(UserEvent.class).iterator().next();
assertThat(userEvent).isNotNull();
TimerEvent timerEvent = modelInstance.getModelElementsByType(TimerEvent.class).iterator().next();
assertThat(timerEvent).isNotNull();
}
Aggregations