Search in sources :

Example 6 with CompensationEventExecutionSet

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

the class EndCompensationEventPostConverterTest method createEvent.

@Override
public EndCompensationEvent createEvent() {
    CompensationEventExecutionSet executionSet = new CompensationEventExecutionSet();
    when(endCompensationEvent.getExecutionSet()).thenReturn(executionSet);
    return endCompensationEvent;
}
Also used : CompensationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.CompensationEventExecutionSet)

Example 7 with CompensationEventExecutionSet

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

the class EndEventConverter method compensationEventDefinition.

private BpmnNode compensationEventDefinition(EndEvent event, CompensateEventDefinition eventDefinition) {
    Node<View<EndCompensationEvent>, Edge> node = factoryManager.newNode(event.getId(), EndCompensationEvent.class);
    EndCompensationEvent definition = node.getContent().getDefinition();
    EventPropertyReader p = propertyReaderFactory.of(event);
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    definition.setExecutionSet(new CompensationEventExecutionSet(new ActivityRef(EventDefinitionReader.activityRefOf(eventDefinition))));
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    return BpmnNode.of(node, p);
}
Also used : AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) ActivityRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.ActivityRef) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) CompensationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.CompensationEventExecutionSet) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Edge(org.kie.workbench.common.stunner.core.graph.Edge) EndCompensationEvent(org.kie.workbench.common.stunner.bpmn.definition.EndCompensationEvent) EventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader) ThrowEventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)

Aggregations

CompensationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.CompensationEventExecutionSet)7 ActivityRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.ActivityRef)4 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)4 AdvancedData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData)4 BackgroundSet (org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet)3 CircleDimensionSet (org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.CircleDimensionSet)3 FontSet (org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet)3 Test (org.junit.Test)2 EventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader)2 ThrowEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader)2 IntermediateCompensationEventThrowing (org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEventThrowing)2 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)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 Edge (org.kie.workbench.common.stunner.core.graph.Edge)2 View (org.kie.workbench.common.stunner.core.graph.content.view.View)2 EndCompensationEvent (org.kie.workbench.common.stunner.bpmn.definition.EndCompensationEvent)1 Node (org.kie.workbench.common.stunner.core.graph.Node)1