Search in sources :

Example 1 with TimeCycle

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();
}
Also used : TimeCycle(org.camunda.bpm.model.bpmn.instance.TimeCycle) Expression(org.camunda.bpm.model.bpmn.instance.Expression) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Example 2 with TimeCycle

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;
}
Also used : TimeCycle(org.camunda.bpm.model.bpmn.instance.TimeCycle) TimerEventDefinition(org.camunda.bpm.model.bpmn.instance.TimerEventDefinition)

Aggregations

TimeCycle (org.camunda.bpm.model.bpmn.instance.TimeCycle)2 Expression (org.camunda.bpm.model.bpmn.instance.Expression)1 TimerEventDefinition (org.camunda.bpm.model.bpmn.instance.TimerEventDefinition)1 ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)1 ModelElementTypeBuilder (org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)1