Search in sources :

Example 1 with EventSubprocessExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.subProcess.execution.EventSubprocessExecutionSet in project kie-wb-common by kiegroup.

the class SubProcessConverter method convertEventSubprocessNode.

protected SubProcessPropertyWriter convertEventSubprocessNode(Node<View<EventSubprocess>, ?> n) {
    SubProcess process = bpmn2.createSubProcess();
    process.setId(n.getUUID());
    SubProcessPropertyWriter p = propertyWriterFactory.of(process);
    EventSubprocess definition = n.getContent().getDefinition();
    process.setTriggeredByEvent(true);
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    ProcessData processData = definition.getProcessData();
    p.setProcessVariables(processData.getProcessVariables());
    EventSubprocessExecutionSet executionSet = definition.getExecutionSet();
    p.setAsync(executionSet.getIsAsync().getValue());
    p.setSlaDueDate(executionSet.getSlaDueDate());
    p.setSimulationSet(definition.getSimulationSet());
    p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
    p.setAbsoluteBounds(n);
    return p;
}
Also used : SubProcess(org.eclipse.bpmn2.SubProcess) EventSubprocess(org.kie.workbench.common.stunner.bpmn.definition.EventSubprocess) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) EventSubprocessExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.subProcess.execution.EventSubprocessExecutionSet) SubProcessPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.SubProcessPropertyWriter) AdHocSubProcessPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.AdHocSubProcessPropertyWriter) MultipleInstanceSubProcessPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.MultipleInstanceSubProcessPropertyWriter) BaseProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.BaseProcessData) ProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData)

Example 2 with EventSubprocessExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.subProcess.execution.EventSubprocessExecutionSet in project kie-wb-common by kiegroup.

the class BaseSubProcessConverter method convertEventSubprocessNode.

private BpmnNode convertEventSubprocessNode(SubProcess subProcess) {
    Node<View<EventSubprocess>, Edge> node = delegate.factoryManager.newNode(subProcess.getId(), EventSubprocess.class);
    EventSubprocess definition = node.getContent().getDefinition();
    SubProcessPropertyReader p = delegate.propertyReaderFactory.of(subProcess);
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setExecutionSet(new EventSubprocessExecutionSet(new IsAsync(p.isAsync()), new SLADueDate(p.getSlaDueDate())));
    definition.setProcessData(new ProcessData(new ProcessVariables(p.getProcessVariables())));
    definition.setSimulationSet(p.getSimulationSet());
    definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    definition.setDimensionsSet(p.getRectangleDimensionsSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    node.getContent().setBounds(p.getBounds());
    return BpmnNode.of(node, p);
}
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) BaseProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.BaseProcessData) ProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) SubProcessPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.SubProcessPropertyReader) MultipleInstanceSubProcessPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.MultipleInstanceSubProcessPropertyReader) AdHocSubProcessPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.AdHocSubProcessPropertyReader) ProcessVariables(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) EventSubprocess(org.kie.workbench.common.stunner.bpmn.definition.EventSubprocess) EventSubprocessExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.subProcess.execution.EventSubprocessExecutionSet) IsAsync(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync) Edge(org.kie.workbench.common.stunner.core.graph.Edge)

Aggregations

EventSubprocess (org.kie.workbench.common.stunner.bpmn.definition.EventSubprocess)2 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)2 EventSubprocessExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.subProcess.execution.EventSubprocessExecutionSet)2 BaseProcessData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.BaseProcessData)2 ProcessData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData)2 SubProcess (org.eclipse.bpmn2.SubProcess)1 AdHocSubProcessPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.AdHocSubProcessPropertyWriter)1 MultipleInstanceSubProcessPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.MultipleInstanceSubProcessPropertyWriter)1 SubProcessPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.SubProcessPropertyWriter)1 AdHocSubProcessPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.AdHocSubProcessPropertyReader)1 MultipleInstanceSubProcessPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.MultipleInstanceSubProcessPropertyReader)1 SubProcessPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.SubProcessPropertyReader)1 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)1 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)1 SLADueDate (org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate)1 IsAsync (org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync)1 AdvancedData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData)1 ProcessVariables (org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables)1 Edge (org.kie.workbench.common.stunner.core.graph.Edge)1 View (org.kie.workbench.common.stunner.core.graph.content.view.View)1