use of org.kie.workbench.common.stunner.bpmn.definition.property.cm.CaseFileVariables 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;
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.cm.CaseFileVariables in project kie-wb-common by kiegroup.
the class VariableSearchServiceTest method mockBPMNDiagram.
protected BPMNDiagramImpl mockBPMNDiagram(String variables, String caseVariables) {
BPMNDiagramImpl bpmnDiagram = mock(BPMNDiagramImpl.class);
ProcessData processData = mockProcessData(variables);
when(bpmnDiagram.getProcessData()).thenReturn(processData);
CaseManagementSet caseManagementSet = mock(CaseManagementSet.class);
CaseFileVariables caseFileVariables = mock(CaseFileVariables.class);
when(caseManagementSet.getCaseFileVariables()).thenReturn(caseFileVariables);
when(caseFileVariables.getValue()).thenReturn(caseVariables);
when(bpmnDiagram.getCaseManagementSet()).thenReturn(caseManagementSet);
return bpmnDiagram;
}
Aggregations