Search in sources :

Example 1 with TimeDate

use of org.camunda.bpm.model.bpmn.instance.TimeDate in project camunda-bpmn-model by camunda.

the class AbstractCatchEventBuilder method timerWithDate.

/**
 * Sets an event definition for the timer with a time date.
 *
 * @param timerDate the time date of the timer
 * @return the builder object
 */
public B timerWithDate(String timerDate) {
    TimeDate timeDate = createInstance(TimeDate.class);
    timeDate.setTextContent(timerDate);
    TimerEventDefinition timerEventDefinition = createInstance(TimerEventDefinition.class);
    timerEventDefinition.setTimeDate(timeDate);
    element.getEventDefinitions().add(timerEventDefinition);
    return myself;
}
Also used : TimeDate(org.camunda.bpm.model.bpmn.instance.TimeDate) TimerEventDefinition(org.camunda.bpm.model.bpmn.instance.TimerEventDefinition)

Example 2 with TimeDate

use of org.camunda.bpm.model.bpmn.instance.TimeDate in project camunda-bpmn-model by camunda.

the class TimeDateImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(TimeDate.class, BPMN_ELEMENT_TIME_DATE).namespaceUri(BPMN20_NS).extendsType(Expression.class).instanceProvider(new ModelTypeInstanceProvider<TimeDate>() {

        public TimeDate newInstance(ModelTypeInstanceContext instanceContext) {
            return new TimeDateImpl(instanceContext);
        }
    });
    typeBuilder.build();
}
Also used : Expression(org.camunda.bpm.model.bpmn.instance.Expression) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) TimeDate(org.camunda.bpm.model.bpmn.instance.TimeDate) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Aggregations

TimeDate (org.camunda.bpm.model.bpmn.instance.TimeDate)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