Search in sources :

Example 1 with BaseRootProcessAdvancedData

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

the class RootProcessConverter method convertProcessNode.

private ProcessPropertyWriter convertProcessNode(Node<Definition<BPMNDiagram>, ?> node) {
    Process process = bpmn2.createProcess();
    BPMNDiagram definition = node.getContent().getDefinition();
    ProcessPropertyWriter p = propertyWriterFactory.of(process);
    BaseDiagramSet diagramSet = definition.getDiagramSet();
    p.setName(replaceIllegalCharsAttribute(diagramSet.getName().getValue()));
    p.setDocumentation(diagramSet.getDocumentation().getValue());
    p.setId(replaceIllegalCharsAttribute(diagramSet.getId().getValue()));
    p.setPackage(diagramSet.getPackageProperty().getValue());
    p.setType(diagramSet.getProcessType().getValue());
    p.setVersion(diagramSet.getVersion().getValue());
    p.setAdHoc(diagramSet.getAdHoc().getValue());
    p.setDescription(diagramSet.getProcessInstanceDescription().getValue());
    p.setDefaultImports(diagramSet.getImports().getValue().getDefaultImports());
    p.setExecutable(diagramSet.getExecutable().getValue());
    p.setSlaDueDate(diagramSet.getSlaDueDate());
    BaseProcessData processData = definition.getProcessData();
    p.setProcessVariables(processData.getProcessVariables());
    BaseRootProcessAdvancedData advancedData = definition.getAdvancedData();
    p.setGlobalVariables(advancedData.getGlobalVariables());
    p.setMetaData(advancedData.getMetaDataAttributes());
    // Case Management
    final CaseIdPrefix caseIdPrefix = definition.getCaseManagementSet().getCaseIdPrefix();
    p.setCaseIdPrefix(caseIdPrefix);
    final CaseRoles caseRoles = definition.getCaseManagementSet().getCaseRoles();
    p.setCaseRoles(caseRoles);
    final CaseFileVariables caseFileVariables = definition.getCaseManagementSet().getCaseFileVariables();
    p.setCaseFileVariables(caseFileVariables);
    return p;
}
Also used : BPMNDiagram(org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagram) CaseFileVariables(org.kie.workbench.common.stunner.bpmn.definition.property.cm.CaseFileVariables) BaseDiagramSet(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.BaseDiagramSet) CaseRoles(org.kie.workbench.common.stunner.bpmn.definition.property.cm.CaseRoles) BaseProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.BaseProcessData) Process(org.eclipse.bpmn2.Process) ProcessPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ProcessPropertyWriter) BaseRootProcessAdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.BaseRootProcessAdvancedData) CaseIdPrefix(org.kie.workbench.common.stunner.bpmn.definition.property.cm.CaseIdPrefix)

Aggregations

Process (org.eclipse.bpmn2.Process)1 ProcessPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ProcessPropertyWriter)1 BPMNDiagram (org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagram)1 CaseFileVariables (org.kie.workbench.common.stunner.bpmn.definition.property.cm.CaseFileVariables)1 CaseIdPrefix (org.kie.workbench.common.stunner.bpmn.definition.property.cm.CaseIdPrefix)1 CaseRoles (org.kie.workbench.common.stunner.bpmn.definition.property.cm.CaseRoles)1 BaseDiagramSet (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.BaseDiagramSet)1 BaseProcessData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.BaseProcessData)1 BaseRootProcessAdvancedData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.BaseRootProcessAdvancedData)1