Search in sources :

Example 46 with BPMNGeneralSet

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

the class ReusableSubprocessConverter method toFlowElement.

public PropertyWriter toFlowElement(Node<View<ReusableSubprocess>, ?> n) {
    CallActivity activity = bpmn2.createCallActivity();
    activity.setId(n.getUUID());
    CallActivityPropertyWriter p = propertyWriterFactory.of(activity);
    ReusableSubprocess definition = n.getContent().getDefinition();
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    ReusableSubprocessTaskExecutionSet executionSet = definition.getExecutionSet();
    p.setCalledElement(executionSet.getCalledElement().getValue());
    p.setAsync(executionSet.getIsAsync().getValue());
    p.setIndependent(executionSet.getIndependent().getValue());
    p.setWaitForCompletion(executionSet.getIndependent().getValue());
    p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
    p.setSimulationSet(definition.getSimulationSet());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : CallActivityPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CallActivityPropertyWriter) ReusableSubprocess(org.kie.workbench.common.stunner.bpmn.definition.ReusableSubprocess) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) CallActivity(org.eclipse.bpmn2.CallActivity) ReusableSubprocessTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.ReusableSubprocessTaskExecutionSet)

Example 47 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 errorEvent.

private PropertyWriter errorEvent(Node<View<EndErrorEvent>, ?> n) {
    EndEvent event = bpmn2.createEndEvent();
    event.setId(n.getUUID());
    EndErrorEvent definition = n.getContent().getDefinition();
    ThrowEventPropertyWriter p = propertyWriterFactory.of(event);
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
    ErrorEventExecutionSet executionSet = definition.getExecutionSet();
    p.addError(executionSet.getErrorRef());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : BaseEndEvent(org.kie.workbench.common.stunner.bpmn.definition.BaseEndEvent) EndEvent(org.eclipse.bpmn2.EndEvent) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) EndErrorEvent(org.kie.workbench.common.stunner.bpmn.definition.EndErrorEvent) ErrorEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.error.ErrorEventExecutionSet) ThrowEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ThrowEventPropertyWriter)

Example 48 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 messageEvent.

private PropertyWriter messageEvent(Node<View<EndMessageEvent>, ?> n) {
    EndEvent event = bpmn2.createEndEvent();
    event.setId(n.getUUID());
    EndMessageEvent definition = n.getContent().getDefinition();
    ThrowEventPropertyWriter p = propertyWriterFactory.of(event);
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
    MessageEventExecutionSet executionSet = definition.getExecutionSet();
    p.addMessage(executionSet.getMessageRef());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : BaseEndEvent(org.kie.workbench.common.stunner.bpmn.definition.BaseEndEvent) EndEvent(org.eclipse.bpmn2.EndEvent) EndMessageEvent(org.kie.workbench.common.stunner.bpmn.definition.EndMessageEvent) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) MessageEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageEventExecutionSet) ThrowEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ThrowEventPropertyWriter)

Example 49 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 signalEvent.

private PropertyWriter signalEvent(Node<View<EndSignalEvent>, ?> n) {
    EndEvent event = bpmn2.createEndEvent();
    event.setId(n.getUUID());
    EndSignalEvent definition = n.getContent().getDefinition();
    ThrowEventPropertyWriter p = propertyWriterFactory.of(event);
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
    p.addSignal(definition.getExecutionSet().getSignalRef());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : EndSignalEvent(org.kie.workbench.common.stunner.bpmn.definition.EndSignalEvent) BaseEndEvent(org.kie.workbench.common.stunner.bpmn.definition.BaseEndEvent) EndEvent(org.eclipse.bpmn2.EndEvent) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) ThrowEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ThrowEventPropertyWriter)

Example 50 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 timerEvent.

private PropertyWriter timerEvent(Node<View<IntermediateTimerEvent>, ?> n) {
    CatchEventPropertyWriter p = createCatchEventPropertyWriter(n);
    p.getFlowElement().setId(n.getUUID());
    IntermediateTimerEvent definition = n.getContent().getDefinition();
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    CancellingTimerEventExecutionSet executionSet = definition.getExecutionSet();
    p.addTimer(executionSet.getTimerSettings());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : CancellingTimerEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.timer.CancellingTimerEventExecutionSet) CatchEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter) IntermediateTimerEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateTimerEvent) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)

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