Search in sources :

Example 56 with BPMNGeneralSet

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

the class StartEventConverter method signalEvent.

private PropertyWriter signalEvent(Node<View<StartSignalEvent>, ?> n) {
    StartEvent event = bpmn2.createStartEvent();
    event.setId(n.getUUID());
    StartSignalEvent definition = n.getContent().getDefinition();
    CatchEventPropertyWriter p = propertyWriterFactory.of(event);
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getName().getValue());
    p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
    InterruptingSignalEventExecutionSet executionSet = definition.getExecutionSet();
    p.addSignal(executionSet.getSignalRef());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : StartSignalEvent(org.kie.workbench.common.stunner.bpmn.definition.StartSignalEvent) 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) InterruptingSignalEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.InterruptingSignalEventExecutionSet)

Example 57 with BPMNGeneralSet

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

the class GatewayConverter method exclusive.

private PropertyWriter exclusive(Node<View<ExclusiveGateway>, ?> n) {
    org.eclipse.bpmn2.ExclusiveGateway gateway = bpmn2.createExclusiveGateway();
    GatewayPropertyWriter p = propertyWriterFactory.of(gateway);
    gateway.setId(n.getUUID());
    ExclusiveGateway definition = n.getContent().getDefinition();
    p.setGatewayDirection(n);
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    GatewayExecutionSet executionSet = definition.getExecutionSet();
    p.setDefaultRoute(executionSet.getDefaultRoute().getValue());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : ExclusiveGateway(org.kie.workbench.common.stunner.bpmn.definition.ExclusiveGateway) GatewayPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.GatewayPropertyWriter) Factories.bpmn2(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) GatewayExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.gateway.GatewayExecutionSet)

Example 58 with BPMNGeneralSet

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

the class GatewayConverter method parallel.

private PropertyWriter parallel(Node<View<ParallelGateway>, ?> n) {
    org.eclipse.bpmn2.ParallelGateway gateway = bpmn2.createParallelGateway();
    GatewayPropertyWriter p = propertyWriterFactory.of(gateway);
    gateway.setId(n.getUUID());
    ParallelGateway definition = n.getContent().getDefinition();
    p.setGatewayDirection(n);
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : GatewayPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.GatewayPropertyWriter) ParallelGateway(org.kie.workbench.common.stunner.bpmn.definition.ParallelGateway) Factories.bpmn2(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)

Example 59 with BPMNGeneralSet

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

the class LaneConverter method toElement.

public Result<LanePropertyWriter> toElement(Node<View<? extends BPMNViewDefinition>, ?> node) {
    return NodeMatch.fromNode(BPMNViewDefinition.class, LanePropertyWriter.class).when(Lane.class, n -> {
        org.eclipse.bpmn2.Lane lane = bpmn2.createLane();
        lane.setId(n.getUUID());
        LanePropertyWriter p = propertyWriterFactory.of(lane);
        Lane definition = n.getContent().getDefinition();
        BPMNGeneralSet general = definition.getGeneral();
        lane.setName(general.getName().getValue());
        p.setDocumentation(general.getName().getValue());
        p.setBounds(n.getContent().getBounds());
        return p;
    }).ignore(Object.class).apply(node);
}
Also used : LanePropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.LanePropertyWriter) Lane(org.kie.workbench.common.stunner.bpmn.definition.Lane) Factories.bpmn2(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) BPMNViewDefinition(org.kie.workbench.common.stunner.bpmn.definition.BPMNViewDefinition)

Example 60 with BPMNGeneralSet

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

the class SubProcessConverter method convertAdHocSubprocessNode.

private SubProcessPropertyWriter convertAdHocSubprocessNode(Node<View<AdHocSubprocess>, ?> n) {
    org.eclipse.bpmn2.AdHocSubProcess process = bpmn2.createAdHocSubProcess();
    process.setId(n.getUUID());
    AdHocSubProcessPropertyWriter p = propertyWriterFactory.of(process);
    AdHocSubprocess definition = n.getContent().getDefinition();
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    ProcessData processData = definition.getProcessData();
    p.setProcessVariables(processData.getProcessVariables());
    AdHocSubprocessTaskExecutionSet executionSet = definition.getExecutionSet();
    p.setAdHocCompletionCondition(executionSet.getAdHocCompletionCondition());
    p.setAdHocOrdering(executionSet.getAdHocOrdering());
    p.setOnEntryAction(executionSet.getOnEntryAction());
    p.setOnExitAction(executionSet.getOnExitAction());
    p.setSimulationSet(definition.getSimulationSet());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : AdHocSubProcessPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.AdHocSubProcessPropertyWriter) AdHocSubprocessTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocSubprocessTaskExecutionSet) AdHocSubprocess(org.kie.workbench.common.stunner.bpmn.definition.AdHocSubprocess) Factories.bpmn2(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) ProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData)

Aggregations

BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)61 View (org.kie.workbench.common.stunner.core.graph.content.view.View)29 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)28 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)25 Edge (org.kie.workbench.common.stunner.core.graph.Edge)24 EventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader)16 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)15 Test (org.junit.Test)11 CatchEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter)9 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)9 Graph (org.kie.workbench.common.stunner.core.graph.Graph)9 CatchEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader)8 ProcessData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData)8 ThrowEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ThrowEventPropertyWriter)7 ThrowEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader)7 EndEvent (org.eclipse.bpmn2.EndEvent)5 StartEvent (org.eclipse.bpmn2.StartEvent)5 BaseEndEvent (org.kie.workbench.common.stunner.bpmn.definition.BaseEndEvent)5 BaseStartEvent (org.kie.workbench.common.stunner.bpmn.definition.BaseStartEvent)5 IsInterrupting (org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting)5