Search in sources :

Example 1 with AdHocSubProcessPropertyWriter

use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.AdHocSubProcessPropertyWriter 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

Factories.bpmn2 (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2)1 AdHocSubProcessPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.AdHocSubProcessPropertyWriter)1 AdHocSubprocess (org.kie.workbench.common.stunner.bpmn.definition.AdHocSubprocess)1 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)1 AdHocSubprocessTaskExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocSubprocessTaskExecutionSet)1 ProcessData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData)1