Search in sources :

Example 61 with AdvancedData

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

the class GatewayConverter method inclusiveGateway.

private Result<BpmnNode> inclusiveGateway(Gateway gateway) {
    Node<View<InclusiveGateway>, Edge> node = factoryManager.newNode(gateway.getId(), InclusiveGateway.class);
    InclusiveGateway definition = node.getContent().getDefinition();
    GatewayPropertyReader p = propertyReaderFactory.of(gateway);
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    definition.setExecutionSet(new GatewayExecutionSet(new DefaultRoute(p.getDefaultRoute())));
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    return Result.success(BpmnNode.of(node, p));
}
Also used : AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) InclusiveGateway(org.kie.workbench.common.stunner.bpmn.definition.InclusiveGateway) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) DefaultRoute(org.kie.workbench.common.stunner.bpmn.definition.property.gateway.DefaultRoute) GatewayPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.GatewayPropertyReader) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Edge(org.kie.workbench.common.stunner.core.graph.Edge) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) GatewayExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.gateway.GatewayExecutionSet)

Example 62 with AdvancedData

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

the class GatewayConverter method eventGateway.

private Result<BpmnNode> eventGateway(EventBasedGateway eventGateway) {
    Node<View<EventGateway>, Edge> node = factoryManager.newNode(eventGateway.getId(), EventGateway.class);
    GatewayPropertyReader p = propertyReaderFactory.of(eventGateway);
    node.getContent().setBounds(p.getBounds());
    EventGateway definition = node.getContent().getDefinition();
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    return Result.success(BpmnNode.of(node, p));
}
Also used : EventGateway(org.kie.workbench.common.stunner.bpmn.definition.EventGateway) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) GatewayPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.GatewayPropertyReader) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Edge(org.kie.workbench.common.stunner.core.graph.Edge) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)

Example 63 with AdvancedData

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

the class StartEventConverter method escalationEvent.

private BpmnNode escalationEvent(StartEvent event, EscalationEventDefinition e) {
    Node<View<StartEscalationEvent>, Edge> node = factoryManager.newNode(event.getId(), StartEscalationEvent.class);
    StartEscalationEvent 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()));
    definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
    IsInterrupting isInterrupting = new IsInterrupting(event.isIsInterrupting());
    SLADueDate slaDueDate = new SLADueDate(p.getSlaDueDate());
    EscalationRef escalationRef = new EscalationRef(EventDefinitionReader.escalationRefOf(e));
    InterruptingEscalationEventExecutionSet executionSet = new InterruptingEscalationEventExecutionSet(isInterrupting, slaDueDate, escalationRef);
    definition.setExecutionSet(executionSet);
    node.getContent().setBounds(p.getBounds());
    return BpmnNode.of(node, p);
}
Also used : InterruptingEscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.InterruptingEscalationEventExecutionSet) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) StartEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent) 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) 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) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) Edge(org.kie.workbench.common.stunner.core.graph.Edge) EscalationRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef)

Example 64 with AdvancedData

use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData 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 65 with AdvancedData

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

the class StartEventConverter method conditionalEvent.

private BpmnNode conditionalEvent(StartEvent event, ConditionalEventDefinition e) {
    Node<View<StartConditionalEvent>, Edge> node = factoryManager.newNode(event.getId(), StartConditionalEvent.class);
    StartConditionalEvent 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());
    InterruptingConditionalEventExecutionSet executionSet = new InterruptingConditionalEventExecutionSet(isInterrupting, slaDueDate, p.getConditionExpression(e));
    definition.setExecutionSet(executionSet);
    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) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) StartConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.StartConditionalEvent) 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) InterruptingConditionalEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.conditional.InterruptingConditionalEventExecutionSet) 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)

Aggregations

AdvancedData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData)70 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)51 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)50 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)49 Edge (org.kie.workbench.common.stunner.core.graph.Edge)47 View (org.kie.workbench.common.stunner.core.graph.content.view.View)47 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)34 SLADueDate (org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate)28 EventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader)20 Test (org.junit.Test)18 CatchEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader)16 ThrowEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader)12 BackgroundSet (org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet)11 FontSet (org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet)11 IsAsync (org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync)11 EscalationRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef)10 IsInterrupting (org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting)9 TaskName (org.kie.workbench.common.stunner.bpmn.definition.property.task.TaskName)9 CancelActivity (org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)8 TaskGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet)8