Search in sources :

Example 1 with BaseStartEventExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.event.BaseStartEventExecutionSet in project kie-wb-common by kiegroup.

the class StartEventConverter method noneEvent.

private PropertyWriter noneEvent(Node<View<StartNoneEvent>, ?> n) {
    StartEvent event = bpmn2.createStartEvent();
    event.setId(n.getUUID());
    StartNoneEvent definition = n.getContent().getDefinition();
    CatchEventPropertyWriter p = propertyWriterFactory.of(event);
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
    p.setSimulationSet(definition.getSimulationSet());
    BaseStartEventExecutionSet executionSet = definition.getExecutionSet();
    event.setIsInterrupting(executionSet.getIsInterrupting().getValue());
    p.addSlaDueDate(executionSet.getSlaDueDate());
    p.setAbsoluteBounds(n);
    return p;
}
Also used : BaseStartEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.BaseStartEventExecutionSet) CatchEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter) StartEvent(org.eclipse.bpmn2.StartEvent) BaseStartEvent(org.kie.workbench.common.stunner.bpmn.definition.BaseStartEvent) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) StartNoneEvent(org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent)

Example 2 with BaseStartEventExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.event.BaseStartEventExecutionSet in project kie-wb-common by kiegroup.

the class StartEventConverter method noneEvent.

private BpmnNode noneEvent(StartEvent event) {
    Node<View<StartNoneEvent>, Edge> node = factoryManager.newNode(event.getId(), StartNoneEvent.class);
    StartNoneEvent definition = node.getContent().getDefinition();
    EventPropertyReader p = propertyReaderFactory.of(event);
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setBackgroundSet(p.getBackgroundSet());
    definition.setFontSet(p.getFontSet());
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setSimulationSet(p.getSimulationSet());
    definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    IsInterrupting isInterrupting = new IsInterrupting(event.isIsInterrupting());
    SLADueDate slaDueDate = new SLADueDate(p.getSlaDueDate());
    BaseStartEventExecutionSet baseStartEventExecutionSet = new BaseStartEventExecutionSet(isInterrupting, slaDueDate);
    definition.setExecutionSet(baseStartEventExecutionSet);
    node.getContent().setBounds(p.getBounds());
    return BpmnNode.of(node, p);
}
Also used : SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) BaseStartEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.BaseStartEventExecutionSet) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) IsInterrupting(org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting) StartNoneEvent(org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Edge(org.kie.workbench.common.stunner.core.graph.Edge) EventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader) CatchEventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)

Example 3 with BaseStartEventExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.event.BaseStartEventExecutionSet in project kie-wb-common by kiegroup.

the class StartEventConverter method compensationEvent.

private BpmnNode compensationEvent(StartEvent event, CompensateEventDefinition e) {
    Node<View<StartCompensationEvent>, Edge> node = factoryManager.newNode(event.getId(), StartCompensationEvent.class);
    StartCompensationEvent definition = node.getContent().getDefinition();
    EventPropertyReader p = propertyReaderFactory.of(event);
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setBackgroundSet(p.getBackgroundSet());
    definition.setFontSet(p.getFontSet());
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setSimulationSet(p.getSimulationSet());
    definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    IsInterrupting isInterrupting = new IsInterrupting(event.isIsInterrupting());
    SLADueDate slaDueDate = new SLADueDate(p.getSlaDueDate());
    BaseStartEventExecutionSet baseStartEventExecutionSet = new BaseStartEventExecutionSet(isInterrupting, slaDueDate);
    definition.setExecutionSet(baseStartEventExecutionSet);
    node.getContent().setBounds(p.getBounds());
    return BpmnNode.of(node, p);
}
Also used : SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) BaseStartEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.BaseStartEventExecutionSet) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) IsInterrupting(org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Edge(org.kie.workbench.common.stunner.core.graph.Edge) StartCompensationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartCompensationEvent) EventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader) CatchEventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)

Example 4 with BaseStartEventExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.event.BaseStartEventExecutionSet in project kie-wb-common by kiegroup.

the class StartEventConverter method compensationEvent.

private PropertyWriter compensationEvent(Node<View<StartCompensationEvent>, ?> n) {
    StartEvent event = bpmn2.createStartEvent();
    event.setId(n.getUUID());
    StartCompensationEvent definition = n.getContent().getDefinition();
    CatchEventPropertyWriter p = propertyWriterFactory.of(event);
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
    p.setSimulationSet(definition.getSimulationSet());
    BaseStartEventExecutionSet executionSet = definition.getExecutionSet();
    event.setIsInterrupting(executionSet.getIsInterrupting().getValue());
    p.addSlaDueDate(executionSet.getSlaDueDate());
    p.setAbsoluteBounds(n);
    p.addCompensation();
    return p;
}
Also used : BaseStartEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.BaseStartEventExecutionSet) CatchEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter) StartEvent(org.eclipse.bpmn2.StartEvent) BaseStartEvent(org.kie.workbench.common.stunner.bpmn.definition.BaseStartEvent) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) StartCompensationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartCompensationEvent)

Aggregations

BaseStartEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.BaseStartEventExecutionSet)4 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)4 StartEvent (org.eclipse.bpmn2.StartEvent)2 CatchEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter)2 CatchEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader)2 EventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader)2 BaseStartEvent (org.kie.workbench.common.stunner.bpmn.definition.BaseStartEvent)2 StartCompensationEvent (org.kie.workbench.common.stunner.bpmn.definition.StartCompensationEvent)2 StartNoneEvent (org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent)2 IsInterrupting (org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting)2 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)2 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)2 SLADueDate (org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate)2 AdvancedData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData)2 Edge (org.kie.workbench.common.stunner.core.graph.Edge)2 View (org.kie.workbench.common.stunner.core.graph.content.view.View)2