use of org.camunda.bpm.model.bpmn.instance.TimeDuration in project camunda-bpmn-model by camunda.
the class TimeDurationImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(TimeDuration.class, BPMN_ELEMENT_TIME_DURATION).namespaceUri(BPMN20_NS).extendsType(Expression.class).instanceProvider(new ModelTypeInstanceProvider<TimeDuration>() {
public TimeDuration newInstance(ModelTypeInstanceContext instanceContext) {
return new TimeDurationImpl(instanceContext);
}
});
typeBuilder.build();
}
use of org.camunda.bpm.model.bpmn.instance.TimeDuration in project camunda-bpmn-model by camunda.
the class AbstractCatchEventBuilder method timerWithDuration.
/**
* Sets an event definition for the timer with a time duration.
*
* @param timerDuration the time duration of the timer
* @return the builder object
*/
public B timerWithDuration(String timerDuration) {
TimeDuration timeDuration = createInstance(TimeDuration.class);
timeDuration.setTextContent(timerDuration);
TimerEventDefinition timerEventDefinition = createInstance(TimerEventDefinition.class);
timerEventDefinition.setTimeDuration(timeDuration);
element.getEventDefinitions().add(timerEventDefinition);
return myself;
}
Aggregations