Search in sources :

Example 1 with BPMNGeneralSet

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

the class CallActivityConverter method convert.

public BpmnNode convert(CallActivity activity) {
    Node<View<ReusableSubprocess>, Edge> node = factoryManager.newNode(activity.getId(), ReusableSubprocess.class);
    ReusableSubprocess definition = node.getContent().getDefinition();
    ActivityPropertyReader p = propertyReaderFactory.of(activity);
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setExecutionSet(new ReusableSubprocessTaskExecutionSet(new CalledElement(activity.getCalledElement()), new Independent(p.isIndependent()), new WaitForCompletion(p.isWaitForCompletion()), new IsAsync(p.isAsync())));
    definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
    node.getContent().setBounds(p.getBounds());
    definition.setSimulationSet(p.getSimulationSet());
    definition.setDimensionsSet(p.getRectangleDimensionsSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    return BpmnNode.of(node);
}
Also used : Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) WaitForCompletion(org.kie.workbench.common.stunner.bpmn.definition.property.task.WaitForCompletion) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) Independent(org.kie.workbench.common.stunner.bpmn.definition.property.task.Independent) ReusableSubprocess(org.kie.workbench.common.stunner.bpmn.definition.ReusableSubprocess) ActivityPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ActivityPropertyReader) IsAsync(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync) Edge(org.kie.workbench.common.stunner.core.graph.Edge) ReusableSubprocessTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.ReusableSubprocessTaskExecutionSet) CalledElement(org.kie.workbench.common.stunner.bpmn.definition.property.task.CalledElement)

Example 2 with BPMNGeneralSet

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

the class EndEventConverter method terminateEndEvent.

private BpmnNode terminateEndEvent(EndEvent event, TerminateEventDefinition e) {
    Node<View<EndTerminateEvent>, Edge> node = factoryManager.newNode(event.getId(), EndTerminateEvent.class);
    EndTerminateEvent definition = node.getContent().getDefinition();
    EventPropertyReader p = propertyReaderFactory.of(event);
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    return BpmnNode.of(node);
}
Also used : Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) EndTerminateEvent(org.kie.workbench.common.stunner.bpmn.definition.EndTerminateEvent) 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) ThrowEventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)

Example 3 with BPMNGeneralSet

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

the class EndEventConverter method messageEventDefinition.

private BpmnNode messageEventDefinition(EndEvent event, MessageEventDefinition e) {
    Node<View<EndMessageEvent>, Edge> node = factoryManager.newNode(event.getId(), EndMessageEvent.class);
    EndMessageEvent definition = node.getContent().getDefinition();
    EventPropertyReader p = propertyReaderFactory.of(event);
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
    definition.setExecutionSet(new MessageEventExecutionSet(new MessageRef(e.getMessageRef().getName())));
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    return BpmnNode.of(node);
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) MessageRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef) EndMessageEvent(org.kie.workbench.common.stunner.bpmn.definition.EndMessageEvent) 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) MessageEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageEventExecutionSet) 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)

Example 4 with BPMNGeneralSet

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

the class EndEventConverter method signalEventDefinition.

private BpmnNode signalEventDefinition(EndEvent event, SignalEventDefinition nodeId) {
    Node<View<EndSignalEvent>, Edge> node = factoryManager.newNode(event.getId(), EndSignalEvent.class);
    EndSignalEvent definition = node.getContent().getDefinition();
    EventPropertyReader p = propertyReaderFactory.of(event);
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
    definition.setExecutionSet(new ScopedSignalEventExecutionSet(new SignalRef(p.getSignalRef()), new SignalScope(p.getSignalScope())));
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    return BpmnNode.of(node);
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) SignalRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalRef) ScopedSignalEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.ScopedSignalEventExecutionSet) EndSignalEvent(org.kie.workbench.common.stunner.bpmn.definition.EndSignalEvent) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) SignalScope(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalScope) 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) ThrowEventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)

Example 5 with BPMNGeneralSet

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

the class IntermediateCatchEventConverter method messageEvent.

private BpmnNode messageEvent(CatchEvent event, MessageEventDefinition e) {
    String nodeId = event.getId();
    Node<View<IntermediateMessageEventCatching>, Edge> node = factoryManager.newNode(nodeId, IntermediateMessageEventCatching.class);
    IntermediateMessageEventCatching definition = node.getContent().getDefinition();
    EventPropertyReader p = propertyReaderFactory.of(event);
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
    definition.setExecutionSet(new CancellingMessageEventExecutionSet(new CancelActivity(p.isCancelActivity()), new MessageRef(e.getMessageRef().getName())));
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    return BpmnNode.of(node);
}
Also used : Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) MessageRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) View(org.kie.workbench.common.stunner.core.graph.content.view.View) CancellingMessageEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.CancellingMessageEventExecutionSet) 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) IntermediateMessageEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateMessageEventCatching) Edge(org.kie.workbench.common.stunner.core.graph.Edge) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)

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