Search in sources :

Example 6 with TimerSettingsTypeSerializer

use of org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.property.TimerSettingsTypeSerializer in project kie-wb-common by kiegroup.

the class TimerSettingsTypeSerializerTest method setUp.

@Before
public void setUp() {
    timerSettings = new TimerSettingsValue(TIME_DATE, TIME_DURATION, TIME_CYCLE, TIME_CYCLE_LANGUAGE);
    serializer = new TimerSettingsTypeSerializer();
}
Also used : TimerSettingsTypeSerializer(org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.property.TimerSettingsTypeSerializer) TimerSettingsValue(org.kie.workbench.common.stunner.bpmn.definition.property.event.timer.TimerSettingsValue) Before(org.junit.Before)

Example 7 with TimerSettingsTypeSerializer

use of org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.property.TimerSettingsTypeSerializer in project kie-wb-common by kiegroup.

the class Bpmn2JsonMarshaller method setTimerEventProperties.

private void setTimerEventProperties(TimerEventDefinition timerEventDef, Map<String, Object> properties) {
    final TimerSettingsValue timerSettings = new TimerSettingsValue();
    if (timerEventDef.getTimeDate() != null) {
        timerSettings.setTimeDate(((FormalExpression) timerEventDef.getTimeDate()).getBody());
    }
    if (timerEventDef.getTimeDuration() != null) {
        timerSettings.setTimeDuration(((FormalExpression) timerEventDef.getTimeDuration()).getBody());
    }
    if (timerEventDef.getTimeCycle() != null) {
        timerSettings.setTimeCycle(((FormalExpression) timerEventDef.getTimeCycle()).getBody());
        if (((FormalExpression) timerEventDef.getTimeCycle()).getLanguage() != null) {
            timerSettings.setTimeCycleLanguage(((FormalExpression) timerEventDef.getTimeCycle()).getLanguage());
        }
    }
    properties.put(TIMERSETTINGS, new TimerSettingsTypeSerializer().serialize(timerSettings));
}
Also used : TimerSettingsTypeSerializer(org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.property.TimerSettingsTypeSerializer) TimerSettingsValue(org.kie.workbench.common.stunner.bpmn.definition.property.event.timer.TimerSettingsValue)

Aggregations

TimerSettingsTypeSerializer (org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.property.TimerSettingsTypeSerializer)7 LinkedList (java.util.LinkedList)4 Bpmn2OryxIdMappings (org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.Bpmn2OryxIdMappings)4 Bpmn2OryxManager (org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.Bpmn2OryxManager)4 AssignmentsTypeSerializer (org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.property.AssignmentsTypeSerializer)4 BooleanTypeSerializer (org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.property.BooleanTypeSerializer)4 Bpmn2OryxPropertyManager (org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.property.Bpmn2OryxPropertyManager)4 Bpmn2OryxPropertySerializer (org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.property.Bpmn2OryxPropertySerializer)4 ColorTypeSerializer (org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.property.ColorTypeSerializer)4 DoubleTypeSerializer (org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.property.DoubleTypeSerializer)4 EnumTypeSerializer (org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.property.EnumTypeSerializer)4 IntegerTypeSerializer (org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.property.IntegerTypeSerializer)4 StringTypeSerializer (org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.property.StringTypeSerializer)4 VariablesTypeSerializer (org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.property.VariablesTypeSerializer)4 ArrayList (java.util.ArrayList)3 Before (org.junit.Before)3 BPMNDefinitionSet (org.kie.workbench.common.stunner.bpmn.BPMNDefinitionSet)3 BPMNDiagramMarshaller (org.kie.workbench.common.stunner.bpmn.backend.BPMNDiagramMarshaller)3 BPMNGraphObjectBuilderFactory (org.kie.workbench.common.stunner.bpmn.backend.marshall.json.builder.BPMNGraphObjectBuilderFactory)3 ScriptTypeListTypeSerializer (org.kie.workbench.common.stunner.bpmn.backend.marshall.json.oryx.property.ScriptTypeListTypeSerializer)3