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